Answer the question
In order to leave comments, you need to log in
What to do when ENUM is not enough?
Just starting to dig into MySQL and my knowledge is limited to .../the-types-of-data-in-sql.html .
For further explanation: (database field comment), *record format*, 'record format element'
I want to make the following structure:
1.database ID (*2-digit code*)
2.database last update date (*year- month-day hour:minute:second*)
3.Distributor ID (*13-digit code*)
4.Pickup points (if null, then there is no pickup point *'Place ID','Place ID',...*)
Field 4 I want to make ENUM and list pickup points there.
To what extent is this the right decision and how can it be done optimally?
Pickup point IDs will be incrementally written to another table.
Answer the question
In order to leave comments, you need to log in
Make it an INT type associated with the id field from the table where pickup point IDs will be added. Otherwise, you will need to add a new export point value to the field structure each time.
Pickup points are a thing that is variable over time, and sometimes they open and close ... Plus a story.
So obviously the pickup point is the id for the pickup point table.
Moreover, the latter may turn out to be non-trivial in composition:
- the item is closed, but the flow of what has already been ordered for it is on - you need a flag to display it in new order forms
- the item has restrictions on dimensions, assortment, working hours, etc. - it means it can/should appear when ordering
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question