Model Entity Relationship: Ternario vs Agregação?

4

Assuming I have a ternary relationship: two entities are NxN and the third entity is weak in relation to the relationship between these two.

I would like to know the difference between creating an aggregation between the two NxN entities and leaving it without aggregation and what each of the two options causes the database, if possible saying the advantages and disadvantages.     

asked by anonymous 15.10.2015 / 03:46

1 answer

2

There is a slight difference in the MER and UML approaches, I believe that for your question these concepts are a bit confusing.

MER x UML notation

In the Relationship Entity (MER) model there is a ternary relationship that is made up of entities that are independent of each other (this ternary is a bit tricky) look at the examples.

In the book you can see some examples of ternary relationships, see:

Example 1

Example2

NotethatinthecontextofMERitispossibletoexist:

Aternarywith2strongentitiesgeneratingaweakordaughterentity example 2

A ternary with 3 strong entities (no daughter or weak entity) example 1

I imagine there is no strong entity generating 2 weak entities

Unified Modeling Language - UML

The UML introduces the concept of class (Entity) and the term association (relationship) between classes. The association can be broken down into 2 types, they are: aggregation and composition

In this link: example of aggregation I found a very easy explanation about the types of association, the link article explains well the difference between aggregation and composition, which are membership types.

Answering the questions

If two entities have an M: N relationship and you do not create the third entity to store the key attributes of the strong entities, then you will cause unnecessary duplication of registration in your database, because when you are deploying the SQL of your logical project, the primary key of table A will have to appear in table B and vice versa.

Source: Database Systems 6th edition, authors: Elmasri, Ramez Navathe, Shamkant B. Year: 2011, pg 131.

    
30.10.2017 / 04:37