LIS 558 - Example of relation generation from ER type diagrams

Suppose we have the following ER diagram:

Since neither of the exception conditions is met, there must be a relation for each relationship:

Since the Borrow relationship is many-to-one, the primary key in the BORROW relation is BooNo, the entity key on the many side. Since the Request relationship is many-to-many, the primary key in the REQUEST relation is a composite of the two entity keys BooNo and PatNo.

Since the exception condition for entity classes is not met, there must also be a relation for each entity class:

In each case, the entity key becomes the primary key of the relation.

Last updated July 5, 2001.
This page maintained by Prof. Tim Craven
E-mail (text/plain only):
Faculty of Information and Media Studies
University of Western Ontario,
London, Ontario
Canada, N6A 5B7