PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Overview
  • Simple cardinalities
  • Example of cardinalities
  • Advanced cardinalities
  • Example of advanced cardinalities
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Overview
The cardinalities are used to count the links between the files. There are two types of cardinalities:
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 "Analysis" tab, in the "Creation" group, click "New link".
  • 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.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment