Step 2: 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 1: Create child tables for one-to-many relationships

Step 2: Create separate lookup tables

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

Step 4: Explicitly declare primary keys in your database

Step 5: Explicitly declare foreign keys in your database

Step 6: Declare virtual primary keys in Iron Speed Designer

Step 7: Declare virtual foreign keys in Iron Speed Designer