PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

  • Overview
  • Consistency for a data file
  • Consistency between several data files
  • Shared link
  • Complex link
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Key and referential integrity
Overview
In an analysis, the "Key" items are also used to manage the consistency of data (called referential integrity):
  • consistency for a data file.
  • consistency between several data files.
Consistency for a data file
The consistency of the records found in a data file is defined via the unique keys.
For example, in a PRODUCT data file, the reference of the product must be unique: each record must correspond to a different product, identified by its reference.
To do so, the REFERENCE item must be defined as unique key.
Consistency between several data files
The consistency between several data files is defined via the links. The main types of links are:

Shared link

A record can be associated with several records of another data file.
Example: A SUPPLIER distributes several PRODUCTS, but each PRODUCT is associated with a single SUPPLIER.
To manage the referential integrity in this type of link, the unique identifier of SUPPLIER must be included in the PRODUCT data file (this operation is automatically performed in the data model editor).
The referential integrity is used to check that:
  • when creating a PRODUCT, that the SUPPLIER exists
  • when deleting a supplier, that all the associated products are deleted.
Note: Advanced rules can also be defined, like the cascading deletion. In this case, when deleting a supplier, all the associated products are deleted.

Complex link

Several records of a data file can be associated with several records of another data file (and conversely).
Example: An order can contain several products and each product can be used in several orders.
In this case, a relation file must be created. This file contains the unique key of each data file that must be linked (as well as other information if necessary).
The complex link becomes a set of shared links.
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment