具有不同属性的实体取决于其类型?

具有不同属性的实体取决于其类型?

问题描述:

试图根据给定的大学项目简介设计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). 

我有这么远的解决方案是通过使两个弱实体,两者有关系,是这样的:

enter image description here

这是处理问题的正确方法吗?

陈的原始符号没有子类型的符号。没有弱密钥的弱实体产生相同的结果。您的方法在该框架内是正确的。然而,在相同的原始记号中,弱实体集与识别关系(双边钻石)相关联,并且在实体集合和关系之间用双线表示总体参与,而不是基本指标(min,max)样式。这不是坚持原始记法的建议,但在这些方面针对您的教科书验证您的答案可能是一个好主意。

已经开发了许多不同的扩展符号来表示子类型,并指出不相关性,原始符号不能。如果你的课程中包含这些内容,我建议你使用它们,因为它们更具表现力。

请注意鳄梨酱的额外收费要求,您的图表还没有包括在内。最后,您将价格表示为项目的派生属性,但我没有看到可以从中计算出的其他属性。