Cardinality in database-one-to-one relationship

I'm studying database, and at the moment Beyond Bank definitions, type of models I'm seeing cardinality! I have doubts in this exercise below:

insert the description of the image here

My doubts are as follows

How do I identify the A origem and the destino of this relationship?

For for me the origin would be billet and the destination payment..

Also wanted to know if my thinking about cardinalidade is correct!

To cardinalidade (0,1) for the bill and (1,1) for the payment... Am I right?

But the answer of the exercise is:

Origem (min = 1, max=1) and Destino (min = 0, max=1)

That is-apparently: the payment as Origin and the billet as destination!

Author: Carol M, 2018-06-13

1 answers

There is a concept error in the post.

The term "cardinality " refers to the amount of instances of one object associated with another. It is usually used when dealing with an object diagram.

The correct term would be " multiplicity ", which defines the minimum and maximum quantities to which an object can be associated. This term sim is used in a database model or in a class diagram.

See the example below:

Example of equivalent diagrams

Now answering the questions: In such a model, there is no idea of origin and destination, since there is no flow of information; what exists are relationships between entities. Thus, what is represented in the diagram is as follows:

" the t_boleto entity is associated with a single t_payment (1..1), while a t_payment is associated with a single t_boleto as well (although not declared, when there is no indication of multiplicity, it is understood that the value is 1..1, according to the UML metamodel)."

The answer given to the exercise does not seem right to me, but it seems that it actually considers t_payment as Origin and t_boleto as destination and I do not know what was the basis for this.

 2
Author: Renan Lopes, 2018-06-19 20:38:07