Wednesday, 11 February 2015

Entity Relationship Model or ER Model


We are developing the Project 'Survey Builder', and here we develop the Entity Relationship Model or in short ER Model of Survey Builder.
But the question is What is an Entity-Relationship Model, ER Modeling is a top down approach to database design, it is a detailed, logical representation of entities associations and data elements for an organization or business. 

Notation used for ER Modeling:
For designing the ER Modeling, a special notation or symbols are used. These notations are:
- Data entities
- Relationships
- Attributes




Examples of entities:
–Person: EMPLOYEE, STUDENT, PATIENT
–Place: STORE, WAREHOUSE
–Object: MACHINE, PRODUCT, CAR
–Event: SALE,REGISTRATION, RENEWAL
–Concept: ACCOUNT, COURSE
Guidelines for naming and defining entity types:
–An entity type name is a singular noun
–An entity type should be descriptive and specific
–An entity name should be concise

–Event entity types should be named for the result of the event, not the activity or process of the event.

Example of entity types and associated attributes:
          STUDENT: Student_ID, Student_Name, Home_Address, Phone_Number, Major


Guidelines for naming attributes:
       An attribute name is a noun.
An attribute name should be unique
To make an attribute name unique and clear, each attribute name should follow a standard format
Similar attributes of different entity types should use similar but distinguishing names. 

Candidate key
Attribute (or combination of attributes) that uniquely identifies each instance of an entity type
Some entities may have more than one candidate key
Ex: A candidate key for EMPLOYEE is Employee_ID, a second is the combination of Employee_Name and Address.
If there is more than one candidate key, need to make a choice.
Identifier

A candidate key that has been selected as the unique identifying characteristic for an entity type










In above diagram an entity named Staff that have four Attribute, where StaffID is the Candidate key or Primary key.



How to Evaluate a Data Model

A good data model has the following:
–Accuracy and completeness
–Non redundancy
–Enforcement of business rules
–Data Re-usability
–Stability and Flexibility
–Communication Effectiveness
–Simplicity

No comments:

Post a Comment