0% found this document useful (0 votes)
6 views

Assignment-1

The document outlines an assignment for a Database Systems course at COMSATS University Islamabad, detailing the structure of a relational database with tables for hotels, rooms, bookings, and guests. It includes specific queries for which students must produce relational algebra, tuple relational calculus, and domain relational calculus expressions. The assignment is due on March 2, 2025, and is worth a maximum of 10 marks.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Assignment-1

The document outlines an assignment for a Database Systems course at COMSATS University Islamabad, detailing the structure of a relational database with tables for hotels, rooms, bookings, and guests. It includes specific queries for which students must produce relational algebra, tuple relational calculus, and domain relational calculus expressions. The assignment is due on March 2, 2025, and is worth a maximum of 10 marks.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

COMSATS University Islamabad

Sahiwal Campus
(Department of Computer Science)
Course Title: Database system Course Code: CSC270 Credit Hours: 3(2,1)
Course Instructor: Ms. Afia Afzaal Program Name: Bachelor of Science in SE
Semester: 4 Section: B Session: FA-23 Date: Feb 28, 2025
Due Date: Mar 2, 2025 Maximum Marks: 10
CLOs Addressed CLO2 Applying

Assignment 1
Q#1 The following tables form 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)
 where Hotel contains hotel details and hotelNo is the primary key;
 Room contains room details for each hotel and (roomNo, hoteINo) forms the primary
key;
 Booking contains details of bookings and (hoteINo, guestNo, dateFrom) forms the
primary key;
 Guest contains guest details and guestNo is the primary key.

Q#2: Produce relational algebra, tuple relational calculus, and domain relational calculus
expressions for the following queries:

(a) List all hotels.


(b) List all single rooms with a price below £20 per night.
(c) List the names and cities of all guests.
(d) List the price and type of all rooms at the Grosvenor Hotel.
(e) List all guests currently staying at the Grosvenor Hotel.

THE END

You might also like