Official Content

Attribute (or set of Attributes) that identify univocally a row of a relation. A Primary Key must follow these properties:

  • Univocally identify a row. In other words, it can't exist two rows with the sames values of the Primary Key.
  • The value of the Primary Key must be known since the row creation. Sometimes an Attribute can be unique, but its value isn't know when creating the row. Ex. in the Person relation the Social Security Number is unknown for newborns.
  • The value of the Primary Key must be unmutable. This property is optional, but very desirable. Given the Relational Database Theory says the relationship between tables must be expressed by the presence of a Primary Key of a table in other table, if the value of the first one is changed, all the rows of the other tables related with this one must be changed. This operation isn't supported in GeneXus .

See also

Candidate Key
Surrogate Key

Last update: November 2023 | © GeneXus. All rights reserved. GeneXus Powered by Globant