Step 1b: Create separate lookup tables

Iron Speed Designer creates dropdown lists for data entry based on related lookup tables.  For example, an Orders table may specify a Shipper (e.g., FedEx, UPS).  While you can use a simple text field in the Orders table to identify the shipper, this approach generally results in data entry variation, e.g.: “FedEx”, “Federal Express” and “FedExpress”.  Accordingly, it’s best to place the shipper information in its own table.  With this approach, the same name is always used to identify a shipper because the application user always chooses from an approved list.

In our example, a foreign key field in the Orders table identifies the specific shipper in the Shipper table.  When Iron Speed Designer creates web pages for the Orders table, it will automatically join the Shipper table to display the shipper name (for data display pages) or a dropdown list of shippers (for data entry pages).

Examples:

Order.ShipperID à Shipper.ShipperID  (choose shipping method: FedEx, UPS, USPS)

Displays “Shipped Via FedEx” instead of “Shipped Via 3”

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