0% found this document useful (0 votes)
338 views

Relational Modeling: 1 at Least One Key

This document provides exercises for converting entity-relationship (ER) diagrams into relational schemas. It includes 6 sample ER diagrams covering entities such as a library system, inheritance, football games, addresses for book copies, train stations and connections, and a hospital system. Students are instructed to convert each ER diagram into a relational schema as part of the exercise.

Uploaded by

eirton
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
338 views

Relational Modeling: 1 at Least One Key

This document provides exercises for converting entity-relationship (ER) diagrams into relational schemas. It includes 6 sample ER diagrams covering entities such as a library system, inheritance, football games, addresses for book copies, train stations and connections, and a hospital system. Students are instructed to convert each ER diagram into a relational schema as part of the exercise.

Uploaded by

eirton
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 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