Please enable JavaScript to view this site.

R:BASE 11 Help

Navigation: How To (Forms, Reports, and more) > Data Designer (RBDefine) > The Data Designer > Keys/Indexes > New Key/Index

Foreign Key

Scroll Prev Top Next More

A foreign key is a column or set of columns that match values in a particular primary key or unique key defined in a different table. A value cannot be inserted or changed.

 

NewForeignKey

 

 

Referenced Table - displays a list of available tables with either Primary or Unique Keys to reference

 

Referenced Key - provides the key number based upon the selected referenced table

 

Message - specifies the messages for various error conditions

 

Message on insert of a Foreign Key value not in the referenced table

The message that will be displayed to a user attempting to insert a row with a field value which does not exist in the referenced table. A default message is provided, and can be changed only when the key is created.

 

Message on update of a Foreign Key value to one not in the referenced table

The message that will be displayed to a user attempting to update a row with a field value which does not exist in the referenced table. A default message is provided, and can be changed only when the key is created.

 

 

After the foreign key definition is complete, key name, and referenced primary key table are displayed in the Data Designer window. Once the key is selected, the "Column(s)" panel displays the column(s) that the key is based upon and the sorting order. If the foreign key is based on a TEXT column, the text length is also provided. The referenced table enforcement "Messages" are also listed when the foreign key is selected.

 

ForeignKey

 

See also:

 

Constraints

CREATE TABLE

ALTER TABLE

LIST FKEYS