Changes between Version 4 and Version 5 of Conceptual Design – ER Diagram and Data Requirements


Ignore:
Timestamp:
08/26/25 13:37:25 (7 days ago)
Author:
221531
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Conceptual Design – ER Diagram and Data Requirements

    v4 v5  
    113113* Customer → Order  \\
    114114    **''has''** – a relation which indicates that a user can have multiple addresses, and an address can belong to one user.
     115\\
     116
     117* Address → Order  \\
     118    **''is_delivered_to''** – a relation which indicates that an address can have multiple orders, and an order can be delivered to one address.
     119\\
     120
     121* Restaurant → Costs  \\
     122    **''spends_on''** – a relation which indicates that a restaurant can have multiple costs, and a cost belongs to one restaurant.
     123\\
     124* Restaurant → Earnings\\
     125    **''receives''** – a relation which indicates that a restaurant can have multiple earnings, and an earning belongs to one restaurant.
     126\\
     127* Menu → Item  \\
     128    **''contains''** – a relation which indicates that a menu can have multiple items, and an item can belong to one menu.
     129
    115130=== M:N ===
    116131* User ↔ User Adresses ↔ Address  \\
    117     **Junction: ** User Adresses solves M:N of User and Address, by storing the composite key (user_id, address_id)\\
     132    **Junction: ** User Adresses solves M:N relation of User and Address, by storing the composite key (user_id, address_id)\\
    118133
    119134    **''has''** – relation between User and User Addresses where a user can have multiple addresses.\\
     
    121136    **''belongs''** – relation between Address and User Addresses where an address can belong to multiple users.\\
    122137\\
     138* Order ↔ Order Items ↔ Item  \\
     139    **Junction: ** Order Items solves M:N relation of Order and Item, by storing the composite key (order_id, item_id)\\
     140
     141    **''has''** – relation between Order and Order Items where an order can have multiple items.\\
     142
     143    **''belongs''** – relation between Item and Order Items where an item can belong to multiple orders.\\
     144\\
     145* Delivery ↔ Delivery Assignment ↔ Delivery Firm \\
     146    **Junction: ** Delivery Assignment solves M:N relation of Delivery and Delivery Firm, by storing the composite key (delivery_id, deliveryfirm_id)\\
     147
     148    **''assigned''** – relation between Delivery and Delivery Assignment where a delivery can be assigned to multiple firms.\\
     149
     150    **''contracts''** – relation between Delivery Firm and Delivery Assignment, where a delivery firm can contract multiple deliveries.\\
     151\\
     152* Restaurant Owner ↔ Restaurant Owners ↔ Restaurant \\
     153    **Junction: ** Restaurant Owners solves M:N relation of Restaurant Owner and Restaurant, by storing the composite key (user_id, restaurant_id)\\
     154
     155    **''owns''** – relation between Restaurant Owner and Restaurant Owners where a user can be own multiple restaurants.\\
     156
     157    **''has''** – relation between Restaurant and Restaurant Owners, where a restaurant can have multiple owners.\\
     158\\
     159* Item ↔ Item Ingredient ↔ Ingredient\\
     160    **Junction: ** Item Ingredient solves M:N relation of Item and Ingredient, by storing the composite key (item_id, ingredient_id)\\
     161
     162    **''contains''** – relation between Item and Item Ingredient where an item can have multiple ingredients.\\
     163
     164    **''is_part_of''** – relation between Ingredient and Item Ingredient, where an ingredient can belong to multiple items.\\