Skip to content

Database Design Patterns

patmoore edited this page Apr 29, 2013 · 3 revisions

Column Names

Column Name Description Design Notes
ID Database generated id Used when constructing Foreign key relationships. Not exposed to outside clients
LOOKUP_KEY database independent unique key for the current row Used as an external id. Allows for migrating and sharding data
OWNING_BP Always refers to the entry in PROVIDERS that owns this row

General Notes:

  1. A Column referencing another table uses the referenced Java object name as the column name
  2. Foreign Keys must a name 'FK_(table)column_(referenced table)_(referenced column)' to the extent that the index name is short enough
  3. Indicies must be named 'IX_(table)_(column)'

exceptions to above rules should be corrected as they are discovered

Clone this wiki locally