Thursday 15 September 2016

NIELIT A Level Introduction to Database Management System Assignment

NIELIT A Level
Introduction to Database Management System
Assignment 1

The following tables form part of a database held in a relational DBMS:
  •  Hotel (Hotel_No , Name, Address) 
  • Room (Room_No, Hotel_No, Type, Price)
  •  Booking (Hotel_No, Guest_No, Date_From, Date_To, Room_No) 
  • Guest (Guest_No, Name, Address) 

where Hotel contains hotel details and Hotel_No is the primary key. Room contains room details for each hotel and (Hotel_No, Room_No) forms the primary key. Booking contains details of the bookings and the primary key comprises (Hotel_No, Guest_No, Date From) and Guest contains guest details and Guest_No is the primary key.

Write the SQL statements for the following:

a) List full details of all hotels in Mumbai.
b) List the names and addresses of all guests in New Delhi, alphabetically ordered by
name.
c) List all double or family rooms with a price below Rs.800 per day, in ascending order
of price.
d) List the bookings for which no date to has been specified.
e) What is the total daily revenue from all the double rooms?
f) How many different guests have made bookings for August, 2006?
g) List the price and type of all rooms at the hotel Land Mark.
h) What is the total income from bookings for the hotel Manor today

No comments:

Post a Comment