Q. Describe how an ER schema can be represented by relation schemas and constraints arising from ER design can be mapped to constraints on a relation schema.
The entity relationship data model is based on a perception of a real world that consists of basic objects called entities and of relationships among these objects. An entity is thing or object in the real world that is distinguishable from other objects. For eg., each person is an entity and band accounts can be considered as entities. Entities are described in a database by set of attributes. For eg., the attributes account number and balance may describe one particular acconunt in a bank and they form attributes of the account entity set. An extra attribute customer id is used to uniquely identify customers. A relationship is an association among several entities. For eg., a depositor relationship associates a customer with each account that he has. The set of all entities of the same type and the set of all relationship of the same type are called entity set and relationship set respectively. The overall logical structure of a database can be expressed graphically by and ER diagram, which is buily up using : R ectangles - which represent entity sets Ellipses - which represent attributes Diamonds - which represent relationships Lines - which represent link attributes to entity sets. Each component is labelled with the entity or relationship that it represents. Constraints to which the contents of database must confirm. For eg., mapping cardinalities, which express the number of entities to which another entity can be asociated via a relationship set.