Step 1f: Declare virtual primary keys in Iron Speed Designer

Iron Speed Designer also supports database tables without primary keys.  In general, you can perform any operation on a table lacking a primary key with the exception that individual records cannot be selected for update or deletion.  Iron Speed Designer has a ‘virtual primary key’ facility that allows you to instruct Iron Speed Designer to treat certain fields as if they are primary key fields, even if they’re not explicitly declared as primary key fields in your underlying database.  As with explicitly declared primary keys, Iron Speed Designer creates Edit and Show Record and Workflow pages.

This is especially useful for database views which may not be permitted to have explicit primary keys.  Unfortunately not all databases permit you to explicitly declare primary keys in database views, so declaring a virtual primary key in Iron Speed Designer may be the only way to create certain page types.  Even if the database does permit primary keys for views, the particular views you are using may not have them defined.

Declare your virtual primary keys in Iron Speed Designer before using the Application Wizard, especially for database views.  Defining virtual primary keys in Iron Speed Designer will greatly enhance the suite of pages that can be created.

Examples:

SalesSummaryView.OrderID

BestSellingProductsView.ProductID

See Step 5: Select Virtual Primary Keys and Virtual Foreign Keys for details.

See Also

Step 1a: Create child tables for one-to-many relationships

Step 1b: Create separate lookup tables

Step 1c: Create database views to express multi-table joins and complex queries

Step 1d: Explicitly declare primary keys in your database

Step 1e: Explicitly declare foreign keys in your database

Step 1f: Declare virtual primary keys in Iron Speed Designer

Step 1g: Declare virtual foreign keys in Iron Speed Designer