Answer the question
In order to leave comments, you need to log in
How to organize the table(s)?
There is an "equipment" entity with attributes: model, manufacturer, serial number, etc.
Each entity can be located in one of several warehouses, at an employee's, or at a communication center. How to properly organize a relational database for such an entity?
Answer the question
In order to leave comments, you need to log in
If employees, warehouses, communication nodes are different entities within the database, you need a table like:
device_id, storage_type, storage_id
where storage_type - indicates in which table to look for storage_id
Tables:
equipment, directory of warehouses/storage locations, storage.
The storage table contains an equipment code and a warehouse code, add a unique index to two fields to prevent equipment from being stored in two places at the same time.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question