Barred relationship Oracle academy

筅森魡賤 提交于 2019-12-08 09:51:13

问题


I'm doing the Oracle Academy course about Database design and development and they are talking about barred relationships in the ERD design part, but I just can't understand what they mean. I looked everywhere but I can't find a good example and I just don't get it. Is there someone that can explain to me with a good example how it works and what it does?


回答1:


I think the document you are referring to is this one.

What they mean with the "barred relationships" is explained in the text. This is about the concrete representation of a Many-to-Many representation.

The original M:M relationship has become two 1:M relationships.

What would be the UID of the intersection entity?

Here comes the following section: Barred Relationships

The unique identifier (UID) of the intersection entity often comes from the originating relationships and is represented by the bars. In this case, the relationships from the originating entities to the intersection entity are called "barred" relationships.

This is because they make in the first place a pure modeling representation. To have a working implementation in a relation model (I guess Oracle Enterprise Database), there is a need to have a unique identifier in each entity and to introduce a new entity and relative relationships (barred relationships).

I won't make any long explanation on the relationship between UML, the ERD and the relational model. The Entity-relationship model is a representation of data distinct from the relational model. To be synthetic (but not sharp), in a relational point of view, this is an abstract representation that needs to be improved for a relational implementation.

I a few words, I guess you are French and will understand easily that way: in the Merise method, this is the transition from the conceptual model (MCD) to the logical model (MLD).




回答2:


This is from the instructor manual:

Slide 3

Draw an M:M relationship between STUDENT and CLASS. Point out that each student may attend one or more classes and each class may be attended by one or more students. Where in the ERD do we locate the grade that a student gets in a class? If we put a grade attribute in STUDENT, how do we know which class it’s for? If we put it in CLASS, how do we know which student got the grade?

The grade is an attribute of the many-to-many relationship between STUDENT and CLASS, not of either entity alone.

Slides 4-5

If we put the status attribute in EVENT, how do we know which PARTNER worked on the event? If the status is “called client to confirm meeting,” who is meeting with the CLIENT – the event manager, the DJ? If we put the status attribute in PARTNER, how do we know which EVENT the status is referring to?

Status is an attribute of the relationship between PARTNER and EVENT, not of either entity alone.

From these notes, we can tell that an intersection entity is an entity that only exists because of the relationship between two other entities. The attributes of the intersection entity are attributes of the relationship between the two entities it sits between. These attributes apply to both entities at the same time- not just one or the other.

Now, a barred relationship exists for an intersection entity only when the modeler decides to use a combination of both Unique Identifiers of the two original entities as the UID of the intersection entity. If some artificial UID is created for the intersection entity, bars are not used.



来源:https://stackoverflow.com/questions/27891738/barred-relationship-oracle-academy

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!