Virginia International University
CMP622, Database Management Systems II
Midterm Exam
_____________________________________________________________________________________
Very Important:
Please note that you are allowed to use any source including your text book, other books or publications, and the Internet to find the correct answers to the questions in the Midterm Exam. However, direct copying and pasting your answers from any sources is not acceptable, is considered plagiarism, and is against the VIU policy. Doing so will result in a grade of zero for this assignment. You should learn the materials and then submit your answers in your own wording rather than copying and pasting from other sources.
_____________________________________________________________________________________
SHORT ESSAY: Write your answers in a separate document in Word (.doc/.docx) or Rich Text Format (.rtf) and post it to the course online system by deadline.
Please note that the answer to each of these questions is hardly more than half a page. So your answers must be short and to the points. Writing too much and “irrelevant” to the question will cost you points. Also for each question you must add the source at the end of your answer (page number from the textbook or the URL from the Web).
QUESTIONS:
_____________________________________________________________________________________
1.
[4 points]
Discuss what you consider to be the three most important advantages for the use of a DBMS for a company like DreamHome and provide a justification for your selection.
Discuss what you consider to be the three most important disadvantages for the use of a DBMS for a company like DreamHome and provide a justification for your selection.
_____________________________________________________________________________________
2.
[4 points]
Discuss each of the following concepts in the context of the relational data model:
(a) Relation
(b) Attribute
(c) Domain
(d) Tuple
(e) Intension and Extension
(f) Degree and Cardinality
_____________________________________________________________________________________
3.
[4 points]
Explain the function of each of the clauses in the SELECT statement. What restrictions are imposed on these clauses?
_____________________________________________________________________________________
4.
[4 points]
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, hotelNo) forms the primary key;
Booking contains details of the bookings and (hotelNo, guestNo, dateFrom) forms the primary key;
and
Guest contains guest details and guestNo is the primary key.
Compose an SQL that lists the rooms that are currently unoccupied at the Grosvenor Hotel.
_____________________________________________________________________________________
5.
[4 points]
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, hotelNo) forms the primary key;
Booking contains details of the bookings and (hotelNo, guestNo, dateFrom) forms the primary key;
and
Guest contains guest details and guestNo is the primary key.
Compose an SQL that creates a view containing the hotel name and the names of the guests staying at the hotel.
0 comments