4GL Patterns #8 – Table Patterns

Ken Downs classified database tables into several patterns. These are grouped along the lines of number of columns, number of rows, transient vs. permanent:

Ken goes on to suggest the types of primary keys for each type of table, e.g. Single-column CHAR primary keys for Reference and Small Master tables; Auto-assigned integers for Large Master tables; and Compound keys for Cross Reference.

I would like to add that tables should be explicitly annotated for their patterns and expected usage.

Applicability and Consequences

  • Code generation tools can then intelligently cache slow changing patterns in-memory, during application start-up, or upon first-use.
  • Character primary keys can be used as shortcuts for rapid data entry
  • Look up controls can be auto-generated when reference tables are used in foreign keys

About this entry