Question: I will like answer, plz do a, b, c 2. (15 marks) Given the following four relations for a simple restaurant management record database application

 I will like answer, plz do a, b, c 2. (15marks) Given the following four relations for a simple restaurant management record

I will like answer, plz do a, b, c

2. (15 marks) Given the following four relations for a simple restaurant management record database application where cost of meals ordered by customers are tracked for each food order. Total number of orders received by each customer is known from the customer record at all times. Customer(cid, sname, address, numorder) Chef(chid, chnams, specialization, address) Meal mealid meal name, cost) Serves(chid. sid. mealid mdate) Here, the primary key for each relation is underlined. The attributes cid stands for customer id, shid is chef id, mealid is meal id, numorder is the cumulative number of meal order the customer has made to this restaurant managed by a chef (e.g., 50). All other attributes are self explanatory. A small database state of this database is: CUSTOMER cid sname 1111 John Smith 2222 Mary Pert address Windsor Windsor pumorder 100 50 CHEF chid 1 2 chname Mana Patel Pat Goodman specialization celebrity fish address Windsor London MEAL mealid 23567 55555 meal name Chicken rice Fish potato Cost 20.45 30.50 SERVES chid 1 2 cid 1111 2222 mealid 23567 55555 mdate 10-Jan-21 20-Aug-20 a. Write the SQL DDL instructions to create all 4 tables of the above database in the Oracle DBMS on our cs server specifying all constraints such as Key, entity and foreign key constraints as usual within each instruction (not separately). (5 marks) b. Using only the data in the above instance (not a new instance formed by you), write the SQL instructions to load (insert) all the data above in the 4 tables you created. (5 marks) c. Write the SQL query for the following query posed on this database, also write the results of the query and the tables involved in answering the query. (5 marks) Print all meals names and date they are ordered (meal name, mdate) for customer named 'Mary Pert (5 marks) Que 2a (5 marks): Creating Tables

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