Cardinality in Database - Relationship One to ONE

1

I am studying database, and at the moment beyond the definitions of bank, type of models I am seeing Cardinality! I have doubts in this exercise below:

My doubts are as follows

  

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

For me the origin would be Boleto and Destino Destino ..

  

I also wanted to know if my thinking about cardinalidade is correct!

The cardinalidade (0,1) for the ticket and (1,1) for the payment ... Am I right?

But the exercise response is:

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

That is- Apparently: payment as Origin and Ticket as destination!

    
asked by anonymous 13.06.2018 / 17:52

1 answer

2

There is an error in the post.

The term " cardinality " refers to the number of instances of one object associated with another. Usually used when dealing with an object diagram.

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

See the example below:

Nowansweringthequestions:Insuchamodel,thereisnoideaoforiginanddestination,sincethereisnoflowofinformation;whattherearearerelationshipsbetweenentities.Thus,whatisrepresentedinthediagramisasfollows:

"The t_boleto entity is associated with a single t_payment (1..1), whereas a t_payment is associated with a single t_boleto also (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 does seem that it really regards pay as Source and ticket as Destination and I do not know what the basis for it was.     

19.06.2018 / 22:38