GITTA-Logo
PDF Version of this document Search Help Glossary

Lesson Navigation IconRelational database model

Unit Navigation IconConcepts

Unit Navigation IconTransforming ER-schema

LO Navigation IconERM concepts

LO Navigation IconRule 1

LO Navigation IconRule 2

LO Navigation IconRule 3

LO Navigation IconRule 4

LO Navigation IconRule 5

LO Navigation IconRule 6

LO Navigation IconRule 7

LO Navigation IconRule 8

LO Navigation IconUsing the 8 rules

LO Navigation IconExercise transformation

Unit Navigation IconData integrity

Unit Navigation IconNormalization

Unit Navigation IconSummary

Unit Navigation IconRecommended Reading

Unit Navigation IconGlossary

Unit Navigation IconBibliography

Unit Navigation IconMetadata


GITTA/CartouCHe news:


Go to previous page Go to next page

Rule 2

In this step the weak entity sets are transformed into the relational database scheme.

Definition rule 2

For each weak entity set S with owner G create a relational scheme R with the entity properties as attributes A. For multivalued attributes use rule 7. Use the primary key of G as foreign key in R. Choose a discriminator (combination of attributes) that, together with the foreign key, will act as primary key for R. Note that only the combination of the foreign key together with the discriminator can act as primary key for R.

IIn this example you can see the application of rule 2:

Rule 2

A weak entity set is taken for the creation of the relation:

Part

All entity properties are used as attributes for the relation:

Part(Name, Editor)

The primary key of the owner's relational scheme is taken and added as a foreign key to the relation. In this example the owner is Newspaper(Name, Circulation, Price) and the primary key is Name which we use in the relation as NewspaperName (since Part already has a Name):

Part(NewspaperName, Name, Editor)

The discriminator attribute Name (of Part) together with the foreign key NewspaperName form the primary key of the relation Part:

Part(NewspaperName, Name, Editor)

Top Go to previous page Go to next page