As Level Cs Marking Scheme Dbms Assignment
As Level Cs Marking Scheme Dbms Assignment
STUDENT STUDENT-
QUALIFICATION
QUALIFICATION
[2]
3(a) Many-to-one
3(c)(iii)
B-NURSE B-WARD
B-WARD-NURSE
4(b)(i)
• SHOP has primary key ShopID and SUPPLIER has primary key
SupplierID
• SHOP-SUPPLIER has primary key ShopID + SupplierID
• Both SHOP and SUPPLIER show foreign key as ‘None’
• SHOP-SUPPLIER shows foreign key ShopID or SupplierID
• Explanation for SHOP-SUPPLIER foreign key describes ShopID or
SupplierID creating a link
(b)
Table: Student Table: StudentSubjectChoices
StudentName TutorGroup Tutor Student Subject Level Subject
Name Teacher
Tom 6 SAN Tom Physics A SAN
Joe 7 MEB Tom Chemistry A MEB
Samir 6 SAN Tom General Studies AS DIL
Joe Geography AS ROG
Joe French AS HEN
Samir Computer Science A VAR
Samir Chemistry A MEB
Samir Maths A COR
Samir General Studies A DIL
(e) - there are dependent non-key attributes // there are non-key dependencies
- TutorGroup is dependent on Tutor // Tutor is dependent on TutorGroup
3 a (BookingNumber, Hotel, HotelAddress, Rating, (Date, RoomType,
NumberOfRooms, RoomRate)). (3 for all non-repeating attributes, 2 for all
repeating OR 1 mark each for any non-repeating and any repeating).
b (Booking(BookingNumber, Hotel, HotelAddress, Rating)
RoomTypebooking(BookingNumber(fk), RoomType, Date, NumberOfRooms,
RoomRate) (1 for two sensible tables, 1 for primary keys, 1 for other
attributes).
c To convert to 2NF only the repeating group data has to be changed. The
second table definition changes to the following two:
RoomTypebooking(BookingNumber(fk), RoomType(fk), Date,
NumberOfRooms)
RoomType(RoomType, RoomRate)
In the RoomTypebooking table a composite primary key is needed in which
both attributes are foreign keys. Note that this design assumes that the
RoomRate is the same for all rooms of a given type. You might wish to
discuss how the database would be designed if this were not the case. (2
for keys, 1 for other attributes, 2 for explanation).
d HotelAddress is dependent on Hotel (1) which is not the primary key (1) so
the Booking table is not in 3NF.