Databases

Table of Contents

Conceptual to relational models

entity sets and relationship sets are represented as tables

a strong entity set becomes a table with columns for the attributes.

a weak entity set becomes table with:

many-to-many relationship set becomes table with:

many-to-(zero or one) relations can be represented by adding extra attribute/column to the many-side with primary key of one-side

for one-to-one relationship sets, either side can have the key of the other.

if participation is partial (0..1), replacing table by an attribute will lead to null values for those that don't participate.

if participation is total, foreign key should be NOT NULL.

tables for relationship sets linking weak entity sets to identifying entity set can always be eliminated.o

when translating sets to tables:

composite attributes are flattened out by creating separate column for each component attribute.

multi-valued attribute A of entity set E is represented by separate table with:

Is-a to relational model:

recursive association: translates to foreign key that refers to the same table