We have been going over a lot of naming conventions for our database. I would like to start recording the ideas and why they work/don't.
This applies to having an archived state of an item. We attempted to draw a line at when a column is an action (e.g. archive) rather than a property (e.g. is_red). This idea means that we convert these "action" states to timestamp fields over booleans (e.g. archived_at: timestamp).
In order to keep data consistent, we must introduce the timestamp from a single service. This means that we must introduce an alternative endpoint to performing this action (e.g. PUT /item/:id/archive). This is fine but can lead to complications with pedantic REST frameworks.
There are a lot of options for column naming:
- Present tense (e.g.
active) - Past tense (e.g.
archived) - Qualifiers (e.g.
is_active,is_archived,has_color)
We are deciding that we are going to use past tense for our columns and anything that is derivative (e.g. is_red means that there is a color attribute set to red), cannot be updated via a POST/PUT.
Indeterminate yet