U
U
unsstrennen2020-02-20 23:17:22
Database design
unsstrennen, 2020-02-20 23:17:22

How to organize the engine database structure?

You need to make a MySql table that stores engine models.
Some motors are not compatible with individual housings.
There can be many boxes.
A certain engine may not be compatible with a certain tank, etc.
How can I organize the storage of a list of "incompatibilities" for each engine? Because the number of entries is finite and relatively small, it is planned to make a column in which IDs of incompatible parts will be written through the separator as a line. But incompatible parts can be stored in different tables, and their IDs in their tables can match! How to organize the database structure?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Maxim, 2020-02-20
@unsstrennen

1. Separate tables
2. json
3. ENUM
4. A string separated by a delimiter.
The uniqueness of this must be guaranteed when recording. If there is already data for this category, then do not add it.

V
Vladimir Korotenko, 2020-02-21
@firedragon

cases
engines
cases2engines
id
case_id
engine_id

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question