Cardinality in workbench in model

0

I'm not found information about the relationships of the tables. The only one I understand is the automatic, but I do not want to always throw away the automatic. I have been looking through the internet but I have not found the answer. Maybe it has another name, but I'm very new to this. Thank you!!

I put the whole bar so you know what I mean. It is from the cardinalities. I mean because there are two cardinalities of each. For example, 1.1 has the arrow so - - - and another same relation 1.1 has the arrow like this -------- What difference is - - - to -----? I do not understand it

    
asked by kitkat 01.02.2017 в 10:36
source

2 answers

2

The relationships identified with ---- refer to non-identifying relationships, while those identified with _____ refer to identifying relationships.

The qualifier "' identifier " indicates whether the attributes that are part of the foreign key (N-side of the relationship) must also be part of the primary key of that entity, which occurs if a table comes from a weak entity type or in the case of table attributes that come from N: M relationship types.

In short, an identifying relationship is when one table depends on the other to exist.

    
answered by 01.02.2017 / 13:34
source
1

Update : Edited question.

As @cnbandicoot says, what is a continuous line implies obligation while the other does not.

You have the cardinality of the relationships between tables in that bar at the bottom.

According to Wikipedia :

  

One to One : (1: 1) A record of an entity A is related to only one record in an entity B. (example two entities, teacher and department, with primary keys, teacher_code and jefe_depto respectively, a teacher can only be the head of a department and a department can only have one boss).

     

One to several : (1: N) A record in an entity in A relates to zero or many records in an entity B. But the records in B only relate to a record in A. (example: two entities, seller and sales, with primary keys, vendor_code and sale, respectively, a seller can have many sales but a sale can only have one vendor).

     

Several to One : (N: 1) An entity in A relates exclusively to an entity in B. But an entity in B can be related to 0 or many entities in A (example employee -work center).

     

Several to Several : (N: M) An entity in A can be related to 0 or to many entities in B and vice versa (example associations-citizens, where many citizens can belong to the same association, and each citizen can belong to many different associations).

To use them simply create the two tables with their keys, select the relevant relation and with it selected you click on the source table and then on the destination table. Automatically you will create the references according to the chosen relationship

    
answered by 01.02.2017 в 11:46