logo

Entities that didn't appear in other tables

   

Added on  2019-09-18

6 Pages1620 Words435 Views
 | 
 | 
 | 
Section A (Lim Pan Kee B1500637)1.Identify entitiesa.Itemb.Promotionc.Restaurantd.Branch2.Identify attributesa.Restaurant: RestaurantName, Address, PhoneNo, RestaurantID, BranchNameb.Branch: BranchName, RestaurantID, RestaurantNamec.Promotion: PromoCode, ItemID, ItemPromoPrice, PromoFromDate, PromoToDated.Item: ItemID, ItemName, ItemPrice, ItemType3.Identify functional dependenciesa.ItemID ItemPrice, ItemTypeb.PromoCode PromoFromDate, PromoToDate, PromoPrice, ItemNamec.RestaurantID RestaurantName, Street, City, Address, Branch, PhoneNo4.Identify relationship and cardinalitiesEntities: Item, Promotion, Restaurant, BranchPossible relationship:a.Restaurant creates Itemb.Promotion apply in Restaurantc.Restaurant at BranchPossible cardinalities:a.1 Restaurant has many Promotion, many Promotion apply in 1 Restaurantb.1 Restaurant create many Item, many Item created by 1 Restaurantc.1 Promotion include many Item, 1 Item include in many Promotiond.1 Customer apply 1 Promotion, 1 Promotion can applied by 1 Customer5. List any assumptions that you make:6.Write a brief discussion of your solution, i.e. how you approached the overall modellingproblem and any issues you may have encountered (minimum of ½ page).In the section A question, I identified entities, attributes, functional dependencies, relationship and cardinalities as much as I can so I didn’t list any assumptions. In question 1, I identified 3 common entities: Item, Promotion and Restaurant. In the section A there are the menu from one of the restaurant at Kuala Lumpur branch for meal-delivery service. So, there only have 3 common entities but I added 1 entities is branch because there have the city name in the first rowand first column of the menu. Therefore, I identified 4 entities only and I think it’s good enough.For the question 2, I list out all entities and their attributes. For the Restaurant entities I added Restaurant Name, Address, Phone number, Restaurant Number and Branch Name. For the Branch Name, normally I will use Branch Number instead. But, the menu only have Branch
Entities that didn't appear in other tables_1

Name. So, for the branch entities I added Branch Name, Restaurant Number and Restaurant Name because in the branch table only need restaurant attributes and branch attribute. For the promotion I added Item Number, Item Promotion Price, Promotion from date, Promotion Code and Promotion To Date. There are common promotion’s attributes. For last entities Item, I addedItem Number, Item Name, Item Price and Item Type. Those was the all of the attribute that I can found in the menu.The third question is identify functional dependencies. In this question I only use 3 entities because branch table only have branch name. I use Item ID, Promo Code and Restaurant ID to identify their functional dependencies because those ID and Code is the primary key.Question 4 is harder than other question because I only have 4 entities so the possible relationship and cardinalities very less. For the possible relationship I have 3 point for each entities only. For the possible cardinalities 1 have 4 point only. Because I think 4 point is good enough. For the question 5 discuss about any assumption that I can make, I can’t list assumption because restaurant menu don’t have customer so can't do any assumption. Customer can make a lot of assumption. For example, customer order many promotion item or customer separate two order for separate the payment. Therefore, this section is Restaurant Menu. So, no assumption I can make without the Customer.For the group part assignment, question 1 is draw the ERD (Entity Relationship Diagram). We draw the diagram based on our question 4 and we used same name for section A and B entities. Therefore, section A and B only have 1 name for each attribute and entities. When we draw ERD, we use 7 entities and combine section A and B’s possible cardinalities. Question 2 is RDM (Relational Data Model). We combine both section attributes and like together with the RDM format. Total have 7 entity and 4 table is none foreign key 3 table have foreign key. The reason of those table we didn’t wrote the foreign key is primary key of those table didn’t appear in other table. That’s why we wrote none. For the order table, we wrote 2 foreign key because payment and deliver must have order number. Otherwise, delivery rider confuse the order and cashier confuse the payment. Beside, order number is the most important because customer can’t make the payment without order number the computer only can recognized the order number not customer. Overall, this assignment give me more knowledge about database and give us practice for final exam.
Entities that didn't appear in other tables_2

Section B (Tan Nam Wai B1500693)1.Identify entitiesa.Customerb.Orderc.Itemd.Deliverye.Promotionf.Payment2.Identify attributesa.Customer : CustomerID, Name, PhoneNo, Addressb.Order : OrderDate, OrderNo, OrderTotalc.Item : ItemID, Quantity, ItemPrice, ItemNamed.Restaurant : RestaurantName, Address, PhoneNo, Branch, RestaurantIDe.Delivery : DeliveryRider, DeliveryID, OrderNof.Promotion : PromoCode, ItemID, ItemName, PromoFromDate, PromoToDate, PromotionPriceg.Payment : OrderTotal, ItemTotal, OrderNo3.Identify functional dependenciesa.CustomerIDName, PhoneNo, Addressb.OrderNoOrderDate, OrderTotalc.ItemIDQuantity, ItemPrice, RestaurantID, ItemNamed.RestaurantIDRestaurantName, Address, PhoneNo, Branche.DeliveryIDDeliveryRider, OrderNof.PromoCodeItemID, ItemName, PromoFromDate, PromoToDate, PromotionPrice4.Identify relationship and cardinalitiesEntities : Customer, Order, Item, Delivery, Restaurant, Payment, PromotionPossible Relationship : a.Customer place an Orderb.Promotion apply in Restaurantc.Delivery Item from Restaurantd.Make payment in Restaurante.Item create by RestaurantPossible cardinalities:a.1 Customer place many Order, 1 Order placed by 1 Customerb.1 Order include many Item, 1 Item included by 1 Orderc.1 Restaurant make many item, many Items Makes by 1 Restaurantd.1 Restaurant receive many order, 1 Order received by 1 Restaurante.1 Customer pay 1 Payment, 1 Payment pay by 1 Customerf.1 Restaurant have many Promotion, many Promotion in 1 Restaurantg.1 Customer have 1 Delivery, 1 Delivery for 1 Customer
Entities that didn't appear in other tables_3

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents
Desklib - Online Library for Study Material with Solved Assignments, Essays, Dissertation etc
|6
|1620
|389