ER-Model: Reduction of E-R Schema to Tables

A database that conforms to an E-R database schema can be represented by a collection of tables. For each entity set and for each relationship set, there is a unique table. A table is a chart with rows and columns. The set of all possible rows is the Cartesian product of all columns. 
A row is also known as a tuple or a record. A table has an unlimited number of rows. 
Each column is also known as a field.

Strong Entity Sets

It is common practice for the table to have the same name as the entity set. There is one column for each attribute.

Weak Entity Sets

There is one column for each attribute, plus the attribute(s) the form the primary key of the strong entity set that the weak entity set depends upon.

Relationship Sets

We represent a relationship with a table that includes the attributes of each of the primary keys plus any descriptive attributes (if any). 

There is a problem that if one of the entities in the relationship is a weak entity set, there would be no unique information in the relationship table, and therefore may be omitted. 
Another problem can occur if there is an existance dependency. In that case, you can combine the two tables.

Multivalued Attributes

When an attribute is multivalued, remove the attribute from the table and create a new table with the primary key and the attribute, but each value will be a separate row.

Generalization

Create a table for the higher-level entity set. For each lower-level entity set, create a table with the attributes for that specialization and include the primary key from the higher-level entity set.

One thought on “ER-Model: Reduction of E-R Schema to Tables

Leave a Reply

error: Content is protected !!
%d bloggers like this: