PC SOFT

WINDEV的在线文档

  • Overview
  • Unique key
  • Key with duplicates
  • Simple key or composite key
文档页面当前正在翻译。对于此延迟我们深表歉意。
您可以自愿地帮助我们翻译您想要的文档段落,然后只需通过以下地址与我们联系:info@cn.windev.com
产品
WinDevWebDev-服务器代码WebDev-浏览器代码WinDev Mobile报表和查询
平台
WindowsLinuxWindows MobileWindows PhoneWindows Store appsAndroidAndroid Widget iPhone/iPad
语言
JavaPHPAjax用户代码(MCU)外部语言
数据库
HFSQLHFSQL Client/Server存储过程HF 5.5OLE DBODBC本地访问

Overview
The keys are specific items of your analysis. These items are used to:
  • easily identify the records. For example, in a Product file, the reference of the product is used to identify the product. This reference is unique for each product.
  • organize the data stored in a data file. For example, a key defined on the Name item of Customer file will allow you to quickly sort the records found in the data file by name.
Several types of keys can be defined in a data file

Unique key
A unique key is a key for which a single value can exist in the data file.

For example, in a "PRODUCT" file, each product is identified by a unique reference. The "REFERENCE" item must be a unique key.

Note: If no item can be used as unique key, use an "automatic identifier" item. For each record, the value of this item will be a unique integer.

Key with duplicates
A key with duplicates is a key for which several identical values can be found in the data file.

For example, in the "CUSTOMER" file, a key with duplicates can be defined on the "NAME" item. The content of this key can be same in different records (homonyms). This key enables you to perform a search on the customer name.

Simple key or composite key
A simple key is a key defined on an item.

A composite key is used to define a key on several items of the same data file. This key will be used to access the records of the data file according to the combined value of two items.

For example, to simplify the search for orders, you can define a composite key containing the "Customer Number" item and the "Order Date" item.