N
N
NoMoneyException2017-04-17 08:20:14
SQL
NoMoneyException, 2017-04-17 08:20:14

What is the best way to avoid repeating ENUM in the database?

There are 2 boards. They have a field that is responsible for the order status, with a data type like
ENUM('BOOKED', 'SUBMITTED', 'PAID', 'CANCELLED', 'NOT_ACTIVE', 'REFUSE').
what if I have 10 such plates? and I want to change ENUM? How to make it more flexible and put it somewhere in one place? Thanks

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Ukolov, 2017-04-17
@eugene_leshchinskiy

To do this, all of a sudden, you can use a value table and foreign keys.
Although, of course, creating tables when working with a database may seem like a radical idea to someone.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question