Description:
- Design a database
Database design process:
- Requirements analysis
- Sources: user interviews, forms, reports,…
- Component Design
- Implementation
Workflow:
-
For each strong entity, create a table comprising its attributes and designate the primary key
-
For each weak entity, create a table comprising its attributes and including the primary key of its owning entity
- absorb the attributes of the relationship
- If relationship with the owning entity has any attributes, add them to this table
-
For each One-to-one relationship between two entities, include the primary key of one entity as Foreign key in the table belonging to the other
-
For each non-identifying One-to-many relationship between two entities, include the primary key of the entity on the “1” side as a Foreign key in the table for the entity on the “N” side.
-
For each Many-to-many relationship between two entities:
- create a new table (Associative entity table) containing theprimary key of each entity as the primary key
- add any attributes of the relationship.
-
erDiagram STUDENT ||--|| COURSES: OK STUDENT{ string StudentID PK }