-2
試圖根據給定的大學項目簡介設計ER圖。具有不同屬性的實體取決於其類型?
我很困惑,我應該如何處理這個問題:
The items sold in the Food Truck can be of different types: burritos and
beverages. Every item have an ID, a description and a price. Assume that every
Food Truck has infinite stock of each item (i.e. we do not need to track stock levels
in each Food Truck).
All Burritos come with rice, a type of bean, a filling, and a set of optional
toppings. Burritos are priced by size (Mini, Regular, and Grande). Bean types will
vary. Chipp will start by offering two types: black beans and red beans. Burrito
fillings will vary (depending on the season). There are at least 3 types of Burrito
fillings and there should be a vegetarian option.
A Burrito may optionally have toppings: lettuce, tomato, and mild and hot
salsa. Toppings are free, but Chipp will also offer guacamole as a topping for which
there is an extra charge.
The Food Truck also sells different types of refreshing beverages, both
alcoholic and non-alcoholic. All beverages have a size measured in milliliters (just in
case Chipp takes his Food Truck business over the Channel to mainland Europe).
我有這麼遠的解決方案是通過使兩個弱實體,兩者有關係,是這樣的:
這是處理問題的正確方法嗎?