Question: b ) Given the Database Design Language ( DBDL ) for Sunflower Tart Shop as follows: Note: Date format is ' DD / MM /

b) Given the Database Design Language (DBDL) for Sunflower Tart Shop as follows:
Note: Date format is 'DD/MM/YYYY' and the ingredients used for baking are in the metric of gram.
You are required to use the aliases for the given tables as follow (where appropriate):
- for Outlet, T for Tart, B for Baker, TO for TartOrder, OD for OrderDetails
Write a Structured Query Language (SQL) statement for each of the following questions:
i. Create the OrderDetails table with the following constraints
- Appropriate data types.
- All IDs have 5 characters.
- All the columns must fill up with the values (cannot empty).
- From the past record that is one customer orders 10000 units of Apple Tart on a single receipt.
- The current maximum selling price of tart is RM13.99 per unit.
- Enforce entity and referential integrities.
- Consider the primary key and all foreign keys
[6 Marks]
ii. Refer to the following details and insert a new outlet record: -
- OutletID -'O1088'
- OutletName - 'Sunflower Tart Rawang'
- OutletAddress - 'Lot A138, Rawang Tesco Mall, Jalan Rawang Utama.'
- OutletContact -'03-60928888'
[2 Marks]
iii. Delete baker record with BakerID 'B2020', because he had resigned recently.
b ) Given the Database Design Language ( DBDL )

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 Programming Questions!