0% found this document useful (0 votes)
16 views5 pages

2022 11 05.midterm

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)
16 views5 pages

2022 11 05.midterm

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/ 5

Midterm Exam.

Fundamentals of Databases 1, Fall 2022

Midterm Exam, November 5th 2022

Please note the following instructions and conditions

- The exam includes 2 tasks and 1 bonus point question.

- You have 120 minutes to work on the exam tasks and an extra 15 minutes to upload your results files into Teams. Please note that result files sent per mail
cannot be accepted.

- You need to upload 2 files before the exam time is over:

o 1st file contains your EER model. It needs to be a PDF file or a .graphml file (if you use yEd). Other file formats or photos or screenshots will NOT be
accepted. Identical or nearly identical EER models will count as plagiarism.

o 2nd file contains the database structure you created in the 2nd task. It needs to be a SQL file exported from mariadb. Other file formats will NOT be
accepted. The database name and all table names need to carry your student ID as prefix. This allows us to uniquely identify each database. Databases
without student ID as prefix for these objects will not be accepted.

- You may upload a 3rd file (PDF or Word) for bonus point question and / or any additional remarks you want to make.

- Please, do NOT .zip or .rar your files. We cannot accept this format.

Good Luck!

1
Midterm Exam. Fundamentals of Databases 1, Fall 2022

Task 1: EER Model “Research Projects on water bodies in Georgia” 12 points

A research database on the protection of bodies of waters (rivers, streams, lakes) is to be set up in Georgia to monitor water quantity and quality and other water
criteria. The following requirements apply to the database:

1. The database stores the water bodies with a number and the name of the water body. A distinction is made between running waters (rivers, streams) and
standing waters (lakes).
2. For running waters, the length and average flow rate (meter per second) are stored. For running waters, it is also stored which (smaller) streams / rivers flow into
(larger) rivers and at what mileage point of the larger river this happens.
3. For standing waters, the surface is stored.
4. The database stores the research projects on the water bodies (ID, title and total cost). Projects can relate to multiple bodies of water and a body of water can be
research object in multiple projects.
5. The database keeps track of the organizations that are involved in the research projects. The name and address of each organization is stored. Organizations can
be involved in two ways:
a. Organizations can (partly) finance one or more projects. For each funding involvement, the database keeps track of the percentage of the
contribution to cover the total cost.
b. Organizations can provide researcher(s) for one or more projects.

The two types of involvement (financial or with researcher(s)) are independent of each other. Organizations can only finance or only provide researcher(s) or do
both for one or multiple projects.
6. Researchers are stored in the database with their name and email. The database keeps track to what organization a researcher belongs. For all researchers, the
database also stores on which project or projects they work on and in which function.

1. Create the associated EER model. Underline the keys. Write down standard cardinalities for all relationships.
2. Enter the following 2 additional requirements in the (min, max) notation:
a. A minimum of 3 and a maximum of 12 researchers can work on a project. Researchers do not have constraints as to the number of projects they work on.
b. A maximum of 6 organizations may be involved in the financing of a project. An organization does not need to be involved in funding.

2
Midterm Exam. Fundamentals of Databases 1, Fall 2022

Task 2: Train Connections 18 points


Given is the following ER-model of daily train connections. The model shows the stations that a connection starts and ends in. It also shows each segment of the
whole connection and the two stations involved in each segment. The model also stores the localities (that is cities or villages) that have one or more strain stations.
And it stores the trains that serve connections.

Example: A connection links Tbilisi with Zugdidi. The first segment connects Tbilisi with Gori. The second Gori with Zestaphoni. … The last segment connects Samtredia
with Zugdidi.

3
Midterm Exam. Fundamentals of Databases 1, Fall 2022

Create a database out of this ER model including

1. Use your studentID as prefix for your database name and all table names,

2. Check whether ER model is in 3rd NF / BCNF. If not, correctly map relations to a scheme with all tables in 3rd NF / BCNF,

3. Create database, tables and suitable columns with appropriate datatypes and attribute conditions,

4. Set correct PKs, FKs, correct indices, FK-PK references and appropriate FK constraints,

5. Write down where in the database we still have a bit of data redundancy. (You can use the database comment field for this.)

6. set the attribute “trainName” so that it defaults to your name,

If you have comments on your database, put them in the comment field of the database or in the comment fields of the attribute or put your
comments in a separate file and upload separately.

4
Midterm Exam. Fundamentals of Databases 1, Fall 2022

Bonus Task: SportsClub Database 3 bonus points

Let us assume that there is no flat membership fee but that a member has to pay for each reservation of a sports device or for each course enrollment. Now, let us
look at the ternary relationship reservation. We add the attribute ‘price’ into here.

Attributes {[timeslot, member, device, price]}

1. How would you implement the segment if the following FDs hold true:
 {timeslot, device}  {price}
 {timeslot, device}  {member}
 {timeslot, member}  {device}

2. How would you implement the segment if the following FDs hold true:
 {timeslot}  {price}
 {timeslot, device}  {member}
 {timeslot, member}  {device}

You might also like