在erd图中设计车辆,客户和车间之间的关系 [英] designing relationship between vehicle,customer and workshop in erd diagram

查看:74
本文介绍了在erd图中设计车辆,客户和车间之间的关系的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有3个实体,即客户,车辆和车间.客户购买车辆,客户可以在车间维修该车辆.在此处显示在ERD中,客户在车间购买了一辆或多辆汽车,然后在车间维修了汽车,我对三元关系和那里的基数感到困惑,这是正确的吗?那三元关系中的红衣主教呢?

there is 3 entity namely customer, vehicle and workshop. customer buys vehicle and customer may repair that vehicle in a workshop. Figure here in the ERD customer buys one or more vehicle and customer repairs vehicle in the workshop i ma confused about the ternary relationship and about the cardinal there, is this correct? what about cardinal in the ternary relation here?

推荐答案

三元关系和更高关系的基数总是很棘手.我的方法是考虑与所有其他角色的组合相比,每个角色的基数.

The cardinality of ternary and higher relationships are always tricky. My approach is to think of the cardinality of each role as compared to the combination of all the other roles.

例如,可以将 Workshop 的基数与 Customer Vehicle 的组合进行比较.对于每对唯一的(客户,车辆)对,他们可以访问 Workshop 多少次?我会说很多次.

For example, the cardinality of Workshop can be compared to the combination of Customer and Vehicle. For each unique (Customer, Vehicle) pair, how many times can they visit a Workshop? I would say many times.

对于每个唯一的(客户,车间)组合,可以涉及多少个 Vehicles ?再说一遍,我会说很多.

For each unique (Customer, Workshop) combination, how many Vehicles can be involved? Again, I would say many.

对于每次唯一的(车间,车辆)访问,可以涉及多少个 Customers ?如果 Vehicle (通过二进制关系 buys )确定 Customer ,则只能涉及一位客户,但是如果您希望允许客户能够修理他们不买的汽车,那么很多.

For each unique (Workshop, Vehicle) visit, how many Customers can be involved? If Vehicle determines Customer (via the binary relationship buys), only one customer can be involved, but if you want to allow customers to be able to repair vehicles they didn't buy, then it's many.

请注意,如果车辆确定了 Customer ,则无需在 repairs 关系中包括 Customer .

Note that if Vehicle determines Customer, there's no need to include Customer in the repairs relationship.

这篇关于在erd图中设计车辆,客户和车间之间的关系的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆