conversion from er diagram to relational model
Download
Skip this Video
Download Presentation
Conversion from ER diagram to relational model

Loading in 2 Seconds...

play fullscreen
1 / 10

Conversion from ER diagram to relational model - PowerPoint PPT Presentation


  • 1138 Views
  • Uploaded on

Conversion from ER diagram to relational model. ER is a visual model The relational model is a matemathical model. Database development as part of systems development. Analysis phase Draw an ER-diagram Design phase Convert ER-diagram to relational model.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Conversion from ER diagram to relational model' - booker


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
conversion from er diagram to relational model

Conversion from ER diagram to relational model

ER is a visual model

The relational model is a matemathical model

Conversion from ER diagram to relational model

database development as part of systems development
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.

Conversion from ER diagram to relational model

procedure for conversion from er to relational model
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.

Conversion from ER diagram to relational model

converting weak entities
Converting weak entities
  • Weak entity types
    • have their own relation with all single-valued attributes
    • partial key transferred from ER to the relation
    • foreign key to referring to the “strong” entity (identifying relationship).
    • primary key = partial key + foreign key to “strong” entity.

Conversion from ER diagram to relational model

binary relationships 1 1
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 }

Conversion from ER diagram to relational model

binary relationships 1 n
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.

Conversion from ER diagram to relational model

binary relationships n m
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.

Conversion from ER diagram to relational model

multi valued attributes
Multi valued attributes
  • Multi valued attributes
    • Own relation
    • Foreign key to the “owning” relation.

Conversion from ER diagram to relational model

n ary relationships
N-ary relationships
  • Relationships with N (more than 2) entities
    • Own relation with N foreign keys (1 for each related entity)

Conversion from ER diagram to relational model

inheritance page 295
Inheritance, page 295
  • ER-modeling allows inheritance between entity types.
  • Problem
    • No inheritance in the relational model.
  • Solution
    • Try to avoid inheritance in ER.

Conversion from ER diagram to relational model

ad