TASK 1: Data Definition [20 + 5 = 25 mks]For this task you are required to complete the following:1.1 Add to your solutions script the CREATE TABLE and CONSTRAINT definitions whichare missing from the MonashFood-schema-start.sql script. You MUST use the entityand attribute names shown in the data model above to name tables and attributeswhich you add.1.2 Add the full set of DROP TABLE statements to your solutions script. In completing thissection you may only use DROP TABLE tablename - you are not permitted to add anyother clauses such as cascade constraintsBefore proceeding with Task 2 you must run the supplied MonashFood-schema-start.sql (whichmust not be altered in any way ) followed by the extra definitions that you added in 1.1 above.In a script you can run a section of the script by highlighting the lines you wish to run and selectingthe run button. If at any stage your tables are corrupted during working on this assignment yousimply need to run your drop commands from 1.2 above and then rerunMonashFood-schema-start.sql and your extra definitions that you added in 1.1 above.TASK 2: Data Manipulation [12 + 8 + 5 = 25 mks]Run the script MonashFood-insert.sql to add some initial data into the tables you created in task 1.Data manipulation tasks:2.1 Add to your database four DINER records and their associated FS_DINER records.These four diners should all represent completed dining experiences (ie. they haveordered, been served, paid the full amount outstanding and left the restaurant) whichoccurred in May 2017. You may pick any range of dates/times you wish for these dinerrecords.Each diner must have a minimum of two FS_DINER records, you may pick any fooditems and number of serves you wish, however ensure you use a variety of items andserves.For diner_no's you may assign primary keys that you choose provided the number isbelow 10 (ie. the values must be in the range from 1 to 9). All four diners should beassigned to table number 1, over a range of dates. Table 1 has a seating capacity of 3(assign an appropriate seat number from 1 .. 3). For this question only , you may usethe following food item details:2.2 An Oracle sequence is to be implemented in the database for the subsequent insertionof records into the database for the tables FOOD_ITEM and DINER. Provide theCREATE SEQUENCE statements for the FOOD_ITEM and DINER tables.The sequences will be used to generate new primary key values when adding newtuples/rows to the database:a. The sequence for FOOD_ITEM should start at 11 and increment by 1b. The sequence for DINER should start at 10 and increment by 12.3 Provide the DROP SEQUENCE statements for the sequence objects you have createdin Q2.2 aboveTASK 3: Database Insert/Updates [5 + 5 + (5 + 5 + 5) = 25 mks]Sequences created in task 2 must be used to insert data into the database for the task 3 questions.For these questions you may only use the data supplied in this task.3.1 Add food: Add a new DESSERT to the Monash food menu - you will need to researchsome meaningful data to be able to add this item. DESSERT's are food_type 'D' andare only served in standard 'ST' serve sizes.3.2 Increase Price: Monash food has decided to increase the price charged for all standardserve ('ST') main food items ('M' food type) by 15%, make this change in the database3.3 Diner activity:a. A new diner has just arrived and been seated at Table 1 seat 3. Update thedatabase to seat this diner.b. This new diner calls the waiter over and proceeds to order two 'Bruschetta' entrees.Entrees are only available in a standard 'ST' size. Add this data to the MonashFood System for this diner. The food item has not been served as yet, this is anorder onlyc. Some time after this order has been recorded the 'Bruschetta' ordered in (b) isserved to this diner - update the database to record this service.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here