Database Question Students can lease University flats and some of the details of
ID: 3762640 • Letter: D
Question
Database Question
Students can lease University flats and some of the details of the leases held by students for places in University flats are shown in the table below. A place number uniquely identifies each single room in all flats and is used when leasing a room to student. Make suitable assumptions.
a. Identify the functional dependencies that exist between the columns
b. Identify primary key and alternate key if exists
c. Describe why the table is not in 3NF
d. Provide examples of update anomalies (insert, delete, update) and explain them.
Explanation / Answer
a) Funcational dependencies
leaseNo - student name (fname and lname)
leaseno - startdate
leaseno - finishdate
leaseno - flatno, placeno, address
fname - leanseno (identify number of leases of student and there by lease dates)
b) primary key is leaseno since it will be unique and not null and is indepent.
c) It will not be a 3NF because it not using any referencial integrity, example,
if student name changes in college records, this table would not be updated with
current name. Simple terms, no relationships to student details (name and id)
are provided, table only provides old/static information from date of entry.
d) If all action (update, insert, delete) are based on primary key, then no
anomalies would be there, however, if they are based on other columns then
anomalies will surly exits.
1. Insert and Update statement only checks for leaseno (which is primary key)
while performing action, it would not take into account if startdate and finish
date are overlapping for same student in another record example: by error one
can enter jane in lease no 10003 startdate as 01/09/201 and finish date as
06/30/2015 at the same time and another can enter same student for different
dates.
2. Inser and Update statement only checks for leaseno and not current occupancy,
by error placeno 78 could be assigned to two students on an overlapping date.
3. Fname and Lname could be same for few students, resulting in not being to
update/delete data for correct student it is intended to - because it is not in
3NF.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.