= ER Дијаграм [[Image(er3Img.png)]] == Ентитети * '''Entity: Customer''' Description: Represents a customer who can make reservations. Primary Key: customerId(autogenerated). Attributes: * '''Entity: Restaurant''' Description: Represents a restaurant, which contains menus and tables. Primary Key: RestaurantID(autogenerated). Attributes: * '''Entity: Menu''' Description: Represents the menu associated with a restaurant. Primary Key: MenuID(autogenerated). Attributes: * '''Entity: Table''' Description: Represents a table in a restaurant that can be reserved. Primary Key: TableID(autogenerated). Attributes: * '''Entity: Reservation''' Description: Represents a reservation made by a customer. Primary Key: ReservationID(autogenerated). Attributes: * '''Entity: Payment''' Description: A weak entity describing the process of paying the reservation. Partial Key: paymentId - Artificial ID for the payment. Attributes: date: Payment date. reservation_nr: Number of reservation paid. total_price: Derived attribute. == Релации * Relationship: has Description: A 1:N relationship between Restaurant and Menu. Details: A restaurant can have multiple menus. A menu belongs to one restaurant. Relationship: contains Description: A 1:N relationship between Restaurant and Table. Details: A restaurant contains multiple tables. A table belongs to one restaurant. Relationship: makes Description: A 1:N relationship between Customer and Reservation. Details: A customer can make multiple reservations. A reservation is made by one customer. Relationship: none specified for Table to Reservation Details: There seems to be no direct relationship linking tables to reservations, though it might be implicit.