This document contains a set of sample questions about "Normalisation" which can be used as a preparation for the midterm test. The format/coverage/complexity of this sample question is very similar to the question you will have in the final exam. Hope this helps for you to prepare for the exam. ------------------------------------------------------------------------------------------------------------------------------- Self-Review Questions ( II) Use the table (sample daily records for Cafeteria Menu Order) shown below to answer the following questions (Q1~Q4) Attribute Name OrderID StartTime NumberInParty DishNumber DishName DishPrice Quantity TableID TableCapacity(Seats) WaiterID WaiterName Sample Value 99124 1830 3 Sample Value 99124 1830 3 Sample Value 99125 1900 6 Sample Value 99125 1900 6 Sample Value 99126 1905 2 Sample Value 99127 2030 4 31 Grilled Salmon $23.95 2 1 4 1005 Sasha 33 32 Smoked Trout $25.95 3 2 8 1006 Julie 33 Crab Salad $26.50 2 2 8 1006 Julie 32 Smoked Trout $25.95 2 3 4 1005 Sasha 31 Grilled Salmon $23.95 3 1 4 1006 Julie Crab Salad $26.50 1 1 4 1005 Sasha [Q1] Draw the dependency diagram of the relation presented in the table above. Identify the primary key(s), draw all dependencies and label them properly (e.g. partial, transitive). Answer: Order Start Time ID Number InParty Dish Number Dish Name Dish Price Quantity P Table ID Table Capacity T Waiter ID Waiter Name T P [Q2] What normal form is the relation currently in? State the reasons for your answer. No answer is provided, so that you can find your own answer by studying. 1 [Q3] Normalize the table to third normal form (3NF) and draw the dependency diagrams of the 3NF tables. Answer: <Table> TableID TableCapacity < Order> OrderID TableID WaiterID StartTime NumberInParty <Waiter> WaiterID WaiterName <Menu> DishNumber DishName Price <Order-Line> OrderID DishNumber Quantity [Q4] Using the results in Q1.3, draw an entity relationship diagram (ERD). You need to use Crow’s foot notation. Your diagram should show all relevant attributes including primary and foreign keys. Indicate all connectivities, cardinalities and optionalities. List all assumptions you made for deciding optionality which is not clearly specified by the sample table provided. Answer: 2 3