简体   繁体   English

ER图:实体→属性→属性

[英]ER diagram: entity → attribute → attribute

I have to create a ER diagram for this situation:我必须为这种情况创建一个 ER 图:

There are some houses (with own ID) and each house has some attributes like the position of the house and the price.有一些房子(有自己的ID),每个房子都有一些属性,比如房子的位置和价格。 The position has a valuation like the price and I have a list of evaluation.该职位的估值与价格类似,我有一份评估清单。

I have create an entity for the houses with the position attribute and the price attribute but I'm not able to link the position and the price attribute with own valuation.我已经为具有位置属性和价格属性的房屋创建了一个实体,但我无法将位置和价格属性与自己的估值联系起来。

The schema is this:架构是这样的:

在此处输入图片说明

Have you some idea to solve it, without to delete the list possibile valuation entity?您有什么想法可以解决它,而无需删除list possibile valuation实体? Thank you very much!非常感谢你!

I wish to maintain the information house in an unique entity and the evaluation in another entity.我希望在一个独特的实体中维护信息库,并在另一个实体中维护评估。 Because my goal is to have one table for all the evaluation因为我的目标是一张桌子来做所有的评价

Why don't you create a one-to-many relationship?为什么不创建一对多关系? This way, you would have the valuation ID in house's table, and both entities will remain in separated tables.这样,您将在 house 的表中拥有估值 ID,并且两个实体将保留在单独的表中。

There's a good example in this link .这个链接中有一个很好的例子。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM