You are on page 1of 3

FS 2014

Data Modelling and Databases


Exercise Sheet 2
Discussion: March 11 / 14

ETH Zurich
Systems Group
Prof. D. Kossmann

Relational Modeling
1

At Least One Key

Why does every relation in a relational schema have at least one key?

Big Relation

What happens if you implement the ER diagram from exercise 1.1 (Library System) using a single
relation (instead of using one relation per entity)?

Schema Training

Convert the following ER diagrams into relational schemas.

3.1

Library System
ReaderNr

ReturnDate

Shelf

FamilyName

Position

Firstname

Reader

City

Borrows

Copy

CopyNr

Birthdate

Available
Catname

Contains

Category

InCat

ISBN

Book

PubYear

Title
N
Author
Publisher

Publishes

Pubname
Pubcity

NumPages

3.2

Inheritance
Man

Women
Father
1

Son
N

Mother
1

Father
1

Mother
1

Is Son

Is Daughter

Son
N

Man

Father
1

Is Son

Daughter
N

Mother
1

Women

Son
N

Is Son

3.3

Football
Team
Heim
M

Gast
N
Plays
1
Referee

3.4

Address
Appartement
Copy

Country

Located
Availablein

Located
Availablein

House
Copy

Copy
City

Located
Availablein

Located
Availablein
1

Street
Copy

3.5

Trains
Name

NumTracks

Trainstation

Start

LocatedIn

City

Destination

Departure
Arrival

Train

TrainNr

3.6

Canton

Connects

Name

Length

Hospital
Expertise
Name

Degree

PersNr
N

Doctor
Worker

Treats

is_a

Nurse

Works

Patient

Skills

Name
PatientNr
Illness

From
1

Station

At

Room

LocatedAt
To

StationNr

Name

RoomNr

#Beds

You might also like