ER diagrams mainly comprise of −
- Entity and its attributes
- Relationship, which is association among entities.
Mapping Process
- Create table for a relationship.
- Add the primary keys of all participating Entities as fields of table with their respective data types.
- If relationship has any attribute, add each attribute as field of table.
- Declare a primary key composing all the primary keys of participating entities.
- Declare all foreign key constraints.