Presentation is loading. Please wait.

Presentation is loading. Please wait.

Conversion from ER diagram to relational model 1 ER is a visual model The relational model is a matemathical model.

Similar presentations


Presentation on theme: "Conversion from ER diagram to relational model 1 ER is a visual model The relational model is a matemathical model."— Presentation transcript:

1 Conversion from ER diagram to relational model 1 ER is a visual model The relational model is a matemathical model

2 Conversion from ER diagram to relational model 2 Database development as part of systems development Analysis phase –Draw an ER-diagram Design phase –Convert ER-diagram to relational model. –Check if the relations are sufficiently normalized. Realization phase –Create tables in a DBMS.

3 Conversion from ER diagram to relational model 3 Procedure for conversion from ER to relational model Strong entity types –have their own relation with all the single- valued attributes. –composite attributes: Simple attributes (“leaves”) in the relations. –primary key transferred from ER to the relation.

4 Conversion from ER diagram to relational model 4 Binary relationships 1:1 Binary 1:1 relationships (rare) –data from the relationship (if any) integrated into one of the related entities [your choice]. –one of the related relations gets a foreign key to the other [your choice: easy to find a “way” from on to the other, but not vice versa] –1:1 relations are rare in ER-diagrams {they are usually modeled as a single entity }

5 Conversion from ER diagram to relational model 5 Binary relationships 1:N Binary relationships with cardinality 1:N –data from the relationship (if any) integrated into the relation with the “N” –The “N” relation has a foreign key to the “1” relation.

6 Conversion from ER diagram to relational model 6 Binary relationships N:M Binary relationships with cardinality N:M –Own relation with 2 foreign keys (1 for each of the relation entities) –Date (like timestamps, etc.) on the relationships goes into the relation.

7 Conversion from ER diagram to relational model 7 Multi valued attributes –Own relation –Foreign key to the “owning” relation.


Download ppt "Conversion from ER diagram to relational model 1 ER is a visual model The relational model is a matemathical model."

Similar presentations


Ads by Google