100% found this document useful (2 votes)
5K views

Conversion of E-R Diagram To Tables

Each entity, relationship, and attribute from the E-R diagram is represented as a table with columns. Primary keys allow uniform representation of entities and relationships as tables containing database contents. Composite attributes are separated into individual columns. Generalization can be modeled with either separate tables for each subclass joined on the primary key, or with single tables containing redundant attributes from the superclass.

Uploaded by

eumine
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
5K views

Conversion of E-R Diagram To Tables

Each entity, relationship, and attribute from the E-R diagram is represented as a table with columns. Primary keys allow uniform representation of entities and relationships as tables containing database contents. Composite attributes are separated into individual columns. Generalization can be modeled with either separate tables for each subclass joined on the primary key, or with single tables containing redundant attributes from the superclass.

Uploaded by

eumine
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 18

Conversion of E-R Diagram to

Tables
• For each entity set and relationship set
there is a unique table, which is assigned
the name of the corresponding entity set
or relationship set. Each table has a
number of columns (generally
corresponding to attributes), which have
unique names. Primary keys allow entity
sets and relationship sets to be expressed
uniformly as tables, which represent the
contents of the database.
Representing Entity sets as
Tables
Composite and Multi-Value
Attributes
• In order to convert an entity having
composite attributes, the composite
attributes are flattened out by creating a
separate attribute for each component
attribute.
Representing Generalization as
Tables
• There are two approaches to convert an E-R diagram
representing generalization.
• Method 1
• E-R diagram containing generalization as shown in figure
4.20 can be converted in following tables:
• Account: Account_Number, Balance
• Saving_Account: Account_Number, Interest_rate
• Checking _Account: Account_Number,
Overdraft_Amount
• The problem of this approach is that in order to obtain
Balance we have to join two tables.
• Method 2
• In second method we create only two
tables as shown below:
• Saving_Account: Account_Number,
Balance, Interest_rate
• Checking _Account: Account_Number,
Balance, Overdraft_Amount
• The problem of this is the redundancy of
Balance field.

You might also like