Database System I Final
Database System I Final
Question 01
Hotel contains hotel details and hotelNo is the primary key. Room contains room details for
each hotel and (roomNo, hotelNo) forms the primary key. Booking contains details of the
Page 1 of 5
TERTIARY AND VOCATIONAL EDUCATION COMMISSION
bookings and (hotelNo, guestNo, dateFrom) forms the primary key and Guest
contains guest details and guestNo is the primary key.
1.) Find hotel name and city of all hotels. (Marks 02)
2.) Find the names and addresses of all guests who are living in London, alphabetically ordered
by name. (Marks 06)
3.) Find all double or family rooms (type = „D‟ or „F‟) with a price below Rs 25000.00 per
night, in ascending order of price. (Marks 07)
4.) Find the bookings for which no „dateTo‟ has been specified. (Marks 05)
Question 03
1.) List two data manipulation (DML) commands in SQL. (Marks 02)
2.) Discuss two characteristics of DBMS. (Marks 06)
3.) Compare two differences between File system and DBMS. (Marks 06)
4.) Give a brief note on the term data independence in the context of relational databases.
(Marks 06)
Question 04
2 yellow 23.99
3 green 17.5
5 red 29.99
Product_Table
Page 2 of 5
TERTIARY AND VOCATIONAL EDUCATION COMMISSION
(a) “This table is not in first normal form”. Evaluate this statement.
(Marks 04)
(b) How do we bring this table into first normal form? (Marks 06)
Question 05
1.) Discuss two reasons to use the Entity Relationship (ER) Diagrams? (Marks 03)
3.) Consider relation R=(A,B,C,D) with the following Functional Dependencies (FDs)
AB C, C D and D A
a. List all candidate keys of R.
b. Is R in 3NF? or BCNF? (Marks 06)
4.) Define Denormalization? (Marks 06)
Question 06
Here, a supplier may supply many products and some suppliers do not yet supply products.
For example, a supplier list may include potential suppliers. If a product is supplied by a
supplier, that product is supplied only by a single supplier. Some products are not supplied
by a supplier. For example, some products may be produced “in-house”.
Page 3 of 5
TERTIARY AND VOCATIONAL EDUCATION COMMISSION
1.) Write the SQL code that will create the table structure for above table. (Marks 08)
2.) Write the SQL code that will enter the first two data rows into the table (Marks 06)
3.) Suppose that 20 units of product 069344 have been ordered and they have just arrived.
Write the SQL code to update the required table to show the new arrivals. (Marks 06)
Question 07
Page 4 of 5
TERTIARY AND VOCATIONAL EDUCATION COMMISSION
LotNumber
Production ProductType
Lot Includes
Units
qualityTest ProductDesc
type
Raw material-ID
Materials
UnitCost
Convert the ER diagram into a relational database schema. Be certain to indicate primary
keys and referential integrity constraints. (Marks 20)
Page 5 of 5