A
A
arenami2020-12-30 17:34:41
Database design
arenami, 2020-12-30 17:34:41

How is it customary to name tables that are lookup and that are history?

There is a table "orders". Orders have statuses -- 2 types: status definitions (new, draft, abandoned, in_process, paid....) and status history for each order (new, placed in 5 minutes, paid in 15...)
As usual to name such tables when one table with definitions, and the 2nd - with history? And both with the same essence.
Like status_definitions and statuses (history)? Or vice versa - statuses (definitions) and status_history? Or how else?
And what is the name of such a case?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dr. Bacon, 2020-12-30
@bacon

For starters, tables are usually referred to in the singular, so order. Well, the order still has a history, so - order_history. Status types - status_type, often the types are not put into the table at all, but are defined at the level of constants. Well, besides this, an organization / project can always have its own naming system.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question