0% found this document useful (0 votes)
139 views1 page

Tutorial 2 - Relational Database

This document provides a scenario describing tables in a relational database for a hotel: the HOTEL table with hotel details, ROOM table with room details, BOOKING table to record reservations, and GUEST table with guest details. It asks to identify primary keys for each table, foreign keys between tables, and appropriate constraints for the schema. It also provides a hadith quote about God seeing people's intentions, not appearances.

Uploaded by

NAPIZEVANS
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)
139 views1 page

Tutorial 2 - Relational Database

This document provides a scenario describing tables in a relational database for a hotel: the HOTEL table with hotel details, ROOM table with room details, BOOKING table to record reservations, and GUEST table with guest details. It asks to identify primary keys for each table, foreign keys between tables, and appropriate constraints for the schema. It also provides a hadith quote about God seeing people's intentions, not appearances.

Uploaded by

NAPIZEVANS
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/ 1

BCT 1423 Database System

Lab 2: Relational Database

Scenario 1:
The following tables form a part of a database held in a relational DBMS:
HOTEL (hotelNo, hotelName, city)
ROOM (roomNo, hotelNo, type, price)
BOOKING(hotelNo, guestNo, dateFrom, dateTo, roomNo)
GUEST(guestNo, guestName, guestAddress)

1. Identify the primary key for each relation.


2. Identify the foreign keys in this schema. Explain how the entity and referential integrity rules
apply to these relations.
3. Suggest FOUR constraints that would be appropriate for this schema.

Daripada Abu Hurairah Abd ar-Rahman bin Sakhr RA katanya: Rasulullah


SAW bersabda: Sesungguhnya Allah tidak melihat tubuh badan dan rupa
paras kamu, tetapi dia melihat jantung hati (niat) kamu.

You might also like