AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / Editores / Editor de análisis  / Modelo Lógico de Datos
  • Overview
  • Simple cardinalities
  • Example of cardinalities
  • Advanced cardinalities
  • Example of advanced cardinalities
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Otros
Procedimientos almacenados
Overview
Cardinalities are used to count the relationships between two data files. There are two types of cardinalities:
These cardinalities are defined in data model editor.
Simple cardinalities
Cardinalities are defined according to the answers to the two following questions:
  1. For each record found in the data file, what is the minimum number of records in the other file to which this record is linked?
    The answer provides the first part of cardinality (minimum cardinality):
    • if the answer is "none", the cardinality is 0,X.
    • if the answer is "a single one", the cardinality is 1,X.
  2. For each record found in the data file, what is the maximum number of records in the other file to which this record is linked?
    The answer provides the second part of the cardinality (maximum cardinality):
    • if the answer is "a single one", the cardinality is X,1.
    • if the answer is "several", the cardinality is X,N.
The answer to these two questions defines the cardinality that can be: 0,1 ; 0,N ; 1,1 ; 1,N
The description of cardinalities is essential: it is the basis for respecting the referential integrity of the database.
To put it simply, these two questions can be broken down into four questions. For example, to describe a link between the "Club" file and the "Member" file:
  • each "Club" has at least one "Person": Yes/No?
  • each "Club" can have several "Member": Yes/No?
  • each "Person" has at least one "Club": Yes/No?
  • each "Person" can have several "Clubs": Yes/No?

Example of cardinalities

This example presents two different cardinalities:
  • 0,1 cardinality: A person can be a member of a single sport club. This person does not have to belong to a sport club.
  • 0,N cardinality: A club can have no member or several members.
Advanced cardinalities
Cardinalities can be defined more precisely. This is referred to as advanced cardinalities.
These cardinalities allow you to specify exactly the minimum and maximum cardinality.
To define the advanced cardinalities, check "Display advanced cardinalities" in the link description. The link description can be displayed:
  • when creating a link.
    Reminder: To create a link, on the "Análisis" tab, in the "Creación" group, click "Nueva relación".
  • by double-clicking the representation of a link.

Example of advanced cardinalities

This example presents two different cardinalities:
  • 0,1 cardinality: A person can be a member of a single sport club. This person does not have to belong to a sport club.
  • 0,10 cardinality: A club can have 0 or up to 10 members.
Versión mínima requerida
  • Versión 9
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 09/04/2024

Señalar un error o enviar una sugerencia | Ayuda local