Adding Virtual Primary Key Relationships

Go to:

Databases, New Virtual Primary Key...

In many cases, Iron Speed Designer cannot create certain pages that require primary keys, such as Edit Record and Show Record pages.  This occurs because the associated database tables and views used in your application do not have primary keys designated in the underlying database.  This also applies to queries created in Iron Speed Designer which do not have designated primary keys.

For database tables, database views and queries that do not have explicitly defined primary keys, you can specify ‘virtual’ primary key relationships in Iron Speed Designer, allowing you to create Edit Record and Show Record pages (and others) for these tables.  You don’t have to change your database schema in order to generate full-featured applications.

Benefits

Virtual primary keys provide all of the benefits of a real primary key (explicitly declared within the database) to a database table or database view:

Virtual primary keys have several additional benefits:

Adding a Virtual Primary Key via the Field Display Properties dialog

You can also add virtual primary keys in the Field Display Properties dialog, accessible from either the Databases folder in the Application Explorer or the Properties dialog.

To create a composite virtual primary key, check the “Virtual primary key” box for each field in the composite primary key.

Caveats

Virtual primary keys cannot be added to physical tables that already have a physical primary key.  Tables cannot have multiple primary keys, either physical or virtual.

See Also

Database and Data Model Enhancement

Adding Virtual Primary Key Relationships

Adding Virtual Foreign Key Relationships

Incorporating Database Schema Changes

Setting Field Display and Data Validation Options

Primary and Foreign Key Options