primary_set_relational_primary_key_.htm
Navigation: Language Reference > 5 - Declaration Attributes > Variable and Entity Attributes >====== PRIMARY (set relational primary key) ====== | |
PRIMARY
The PRIMARY attribute (PROP:PRIMARY) specifies the KEY is unique, includes all records in the file, and does not allow “null” values in any of the fields comprising the KEY. This is the definition of a file's “Primary Key” per the relational database theory as expressed by E. F. Codd.
Example:
Names FILE,DRIVER('TopSpeed'),PRE(Nam) !Declare a file structure
NameKey KEY(Nam:Name),OPT !Declare name key, exclude blanks
NbrKey KEY(Nam:Number),PRIMARY !Declare number key as the primary key
Rec RECORD
Name STRING(20)
Number SHORT
END
END
See Also:
primary_set_relational_primary_key_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1