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

Primary Key

Scroll Prev Top Next More

A primary key is a column or set of columns that uniquely identify a row; in other words, each value in a primary key column is unique. A primary-key constraint prevents duplicate (non-unique) and null values from being entered. Even if you do not specifically define a constraint, all tables (in a well-designed database) should have a primary key. You can define one primary key per table.

 

NewPrimaryKey

 

 

Case Sensitive - specifies that the data values will be case sensitive

 

Message - specifies the messages for various error conditions

 

Message on insert of Primary Key value which is not unique

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

 

Message on delete of Primary Key value also in referencing Foreign Key

The message that will be displayed to a user attempting to delete a row with a field value which is referenced by a Foreign Key in another table. A default message is provided, and can be changed only when the key is created.

 

Message on update of a Primary Key value also in a referencing Foreign Key

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

 

 

After the primary key definition is complete, the primary key name is 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 primary key is based on a TEXT column, the text length is also provided. The unique value and referenced table enforcement "Messages" are also listed when the primary key is selected.

 

PrimaryKey

 

See also:

 

Constraints

CREATE TABLE

ALTER TABLE

LIST PKEYS