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

Answers For H and I Can Be in Arbitrary Order

This document contains the questions and answers for a SQL exam. It includes 5 questions about database schemas, queries, and transactions. Scores are allocated with the most points given to questions about joins between tables and performing database transactions correctly.
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)
28 views

Answers For H and I Can Be in Arbitrary Order

This document contains the questions and answers for a SQL exam. It includes 5 questions about database schemas, queries, and transactions. Scores are allocated with the most points given to questions about joins between tables and performing database transactions correctly.
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/ 2

[Standard Answer] SW PMII Q1

SQ 1 a: District_code, b:Registered_rooms
SQ2 c: RESERVATION, d: Member_no,e:Member, f:referential constraint (or
Referential integrity constraint,

REFERENCES, FOREIGN KEY)


SQ 3 g: RESERVATION.RESERVED_ROOMS * RATE.ROOM_RATE,
h:MEMBER.MEMBER_NO = RESERVATION.MEMBER_NO,
i: RATE.SEASON = CALENDAR.SEASON

(Answers for h and i can be in arbitrary order)


SQ 4

Calendar Rate

Room_inventor
y Reservation_deta
ilsReserv_no
Check-in_date

Reservation
Member
Reserv_no

Member_no
Hotel_code
Room_type
Reserved_rooms

SQ 5 (1) j: f) (INSERT into the Reservation), k: d) (OPEN the


cursor),

(Answers for j and k can be in arbitrary order)


l: c) (FETCH with the cursor), m: b) (ROLLBACK),
n: h) (INSERT into the Reservation_details)
(2) o: FROM Room_inventory,
p: Check-in_date BETWEEN : CHECKINDATE_F AND :
CHECKINDATE_T
or Check-in_date >= : CHECKINDATE_F AND Check-in_date <= :

CHECKINDATE_T
[Score Allocation] Total 100 points
SQ 1 10 points x 2 = 20 points

SQ 2 4 points x 4 = 16 points
SQ 3 6 points x 3 = 18points
SQ 4 2 points x 7 = 14 points
SQ 5 (1) 4 points x 5 = 20 points
(2) 6 points x 2 = 12 points

You might also like