SOLUTION
Question B1
ENTITY 1 |
ENTITY 2 |
RELATIONSHIP TYPE |
Collections |
Albums |
One-to-Many |
Artists |
Albums |
One-to-Many |
Albums |
Tracks |
One-to-Many |
Order |
Customers |
Many-to-One |
Invoice |
Albums |
Many-to-One |
Question B2
a) RELATIONSHIP TYPES
ENTITY 1 |
ENTITY 2 |
RELATIONSHIP TYPE |
Model |
Vehicle |
One-to-Many |
Vehicle |
Forwarding_Schedule |
One-to-Many |
Forwarding_Schedule |
Driver |
Many-to-One |
b) BUSINESS RULES
· There can be more there on vehicle belonging to the same model
· There can be more than one Schedule for the same Vehicle
· One Driver can be associated with more than one Forwarding Schedule
· One Vehicle can have only one Driver per schedule.
c) Entity Integrity & Referential Integrity in Vehicle Table
· Vehicle Table exhibits entity integrity since every record in Vehicle table can be uniquely identified by the Vehicle_Code attribute/column of the Vehicle table.
· Vehicle Table exhibits refertial integrity since every value in the Model_Code attribute/column has a matching reference value in Model Table Model_Code attribute/column.
d) SQL Statement to display Driver Names assigned to deliver after 2:00 PM on July 12, 2019.
SELECT Driver.LastName, Driver.FirstName
FROM Driver INNER JOIN Forwarding_Schedule ON Driver.[Driver_ID] = Forwarding_Schedule.[Driver_ID]
WHERE (((Forwarding_Schedule.Delivery_Date)>=#7/12/2019 14:0:0#));
e) SQL Statement for License Plate No of Vehicles available between dates
SELECT Vehicle.License_Plate_No
FROM Vehicle
WHERE Vehicle.License_Plate_No NOT IN (SELECT Vehicle.License_Plate_No
FROM Vehicle INNER JOIN Forwarding_Schedule ON Vehicle.[Vehicle_No] = Forwarding_Schedule.[Vehicle_No]
WHERE (((Forwarding_Schedule.Delivery_Date) BETWEEN #7/26/2019 11:0:0# AND #7/26/2019 17:0:0#)));
Hence the Solution..!
This is about database system. Thank you. Question B1 Create a Crow's Foot ERD with the...
This is about database system. Thank you. Question A1 You are given with three Oracle tables, namely, Program, Channel and Booking, as shown in Tables 1 to 3. PROGRAM_ID PROGRAM_NAME DURATION 2012022 Dragon Dance 2014063 Haunted House 2016005 CID 2017172 Kung Fu Master 2018322 Family Affair 2019006 Hong Kong Sites 2019113 2019 Singing Contest 25 58 45 28 68 120 75 Table 1: Program CHANNEL_NO CHANNEL_NAME TVR-1 Rediffusion Channel 1 TV-P Television Pearl Channel TV-G Television Gold Channel Table 2:...