Question: Use only the notations, formats, and rules of Structured Query Language discussed in the class and stated in the lecture notes to generate output report

Use only the notations, formats, and rules of Structured Query Language discussed in the class and stated in the lecture notes to generate output report for each of the following questions. Using other notations, formats, and rules of Structured Query Language will have a zero point in order to have a fair and standard grading rule for every student.
Rental Database
Branch (Bno, Area, City)
Staff (Sno, Name, Position, Sex, Salary, Bno)
Property (Pno, Area, City, Type, Rooms, Rent, Ono, Sno, Bno)
Renter (Rno, Name, MaxRent)
Owner (Ono, Name,)
Viewing (VNo, Rno, Pno, Sno, VDate)
1.(20 points) Define each individual attribute and constraint of the Viewing table according to the specified description(s). Do not combine every solution in one statement. Assume that Renter, Property, and Staff relations have already been defined. Four points for each sub question.
a. VNo is a small integer.
b. Rno is a 5 digits number and equal to a value of Rno in Renter table.
c. Pno is an integer and equal to a value of Pno in Property table.
d. Sno is a 4 digits number and equal to a value of Sno in Staff table.
e. VDate is a date value and equal to or earlier than today.
f. The same viewing record cannot be entered twice.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!