Database concepts


For example I'm doing this scheme How do you know what is (1,1) or (1, n)? I do not understand how you can get the relationships. I understand the theory more or less. But if I find a scheme like that I would not be able to draw cardinality.

asked by kitkat 25.01.2017 в 12:18

1 answer


the {?,?} notation indicates how many entities can exist next to a relationship, thus determining how many connections there are between two types of elements. Following the connection, you read the value that points to the other element and you know how many connections are possible.

Concrete in your example that means:

  • {1,n} In departamento they work at least 1, but up to n empleados
  • {1,1} A Empleado can work for exactly a department

In the scheme it is also defined as identifying the entities:

  • A department is defined by its unique numdpto key
  • An employee is defined by his / her unique numemp key
  • An employee has a numdpto external key that points to their department
answered by 25.01.2017 / 14:44