1. Home
  2. SANDBOX
  3. Keys – Primary and Foreign

Keys – Primary and Foreign

Keys are unique identifiers that ensure one record is not confused with another. They are critical to the operation of a database system. For example, the system knows that a particular student is related to a particular family through keys.

Schools never want to refer to people by numbers and nowhere in the system do you actually need to know any of these numbers to find a child or family. Nonetheless, it is vital that these numbers exist in the system for the data to be related properly.

CAUTION: Deleting or altering key fields or editing the data could result in children not being related to parents and/or teachers not being related to students. Do not attempt to work with these fields without consulting your database manager.

Primary Keys

The Primary Key is the unique ID number that distinguishes that record from all others. In the sbINQUIRIES database, for example, the Primary Key is IDINQUIRY, in sbFAMILIES, it is IDFAMILY and in sbSTUDENTS it is IDSTUDENT. The Primary Key for a file is always bold and red in iR databases. For a given record on the Overview screen, the Primary Key is displayed on the lower left portion of the file.

Foreign Keys

A field that contains the primary key data from another database is called a Foreign KeyForeign Keys are used to link records between databases, such as a child record with a teacher record or a family record with an inquiry record. Those keys are red but not bold in iR databases.

Text and Field Colors          Scripts
Need Support?
Can’t find the answer you’re looking for? Don’t worry we’re here to help!
Create a Ticket