The document provides instructions for constructing an entity-relationship (ER) model. It outlines 7 steps: 1) identify entities, 2) remove duplicate entities, 3) list attributes for each entity, 4) mark primary keys, 5) define relationships, 6) describe cardinality and optionality, and 7) remove redundant relationships. ER modeling is iterative - create several versions, refining each time. The example constructs an ER diagram for a banking system, identifying entities like User, Account, ATM with attributes and relationships between them. Entities become tables in an unnormalized relational database.
The document provides instructions for constructing an entity-relationship (ER) model. It outlines 7 steps: 1) identify entities, 2) remove duplicate entities, 3) list attributes for each entity, 4) mark primary keys, 5) define relationships, 6) describe cardinality and optionality, and 7) remove redundant relationships. ER modeling is iterative - create several versions, refining each time. The example constructs an ER diagram for a banking system, identifying entities like User, Account, ATM with attributes and relationships between them. Entities become tables in an unnormalized relational database.
Before beginning to draw the ER model, read the requirements specification
carefully. Document any assumptions you need to make. 1. Identify entities – list all potential entity types. These are the object of interest in the system. It is better to put too many entities in at this stage and them discard them later if necessary. 2. Remove duplicate entities – Ensure that they really separate entity types or just two names for the same thing. ○ Also do not include the system as an entity type ○ e.g. if modeling a library, the entity types might be books, borrowers, etc. ○ The library is the system, thus should not be an entity type. 3. List the attributes of each entity (all properties to describe the entity which are relevant to the application). ○ Ensure that the entity types are really needed. ○ are any of them just attributes of another entity type? ○ if so keep them as attributes and cross them off the entity list. ○ Do not have attributes of one entity as attributes of another entity! 4. Mark the primary keys. ○ Which attributes uniquely identify instances of that entity type? ○ This may not be possible for some weak entities. 5. Define the relationships ○ Examine each entity type to see its relationship to the others. 6. Describe the cardinality and optionality of the relationships ○ Examine the constraints between participating entities. 7. Remove redundant relationships ○ Examine the ER model for redundant relationships. ER modeling is an iterative process, so draw several versions, refining each one until you are happy with it. Note that there is no one right answer to the problem, but some solutions are better than others! Example: Construct an ER diagram for a Banking System. Clearly indicate the entities, relationships, cardinality and the key constraints. Also, derive the un-normalized relational database tables with the help of this diagram. The General Things needed in a Banking System are: – 1. Person Opens an Account 2. Person using ATM for Transaction The person opens an Account in a Bank and gets an account number and ATM card. The person can make transactions in ATM centres. The Details of the Transaction has to be maintained Between Three Entities. i.e. User, Account, ATM Make a list of Entities with attributes Entity_Name
Attribute Data Type Description(If any Constraints
specific)
User
Attribute Data Type Description(If any Constraints
specific)
User_ID Number User ID Primary key
(auto increment) Not null
Name (First_Name, Last_Name) Varchar User Name Not null
Address Varchar User Address Not null
Contact_Number Varchar User contact number Not null
Account
Attribute Data Type Description(If any Constraints