D
D
Dmitry Kalyuk2016-03-22 16:19:22
MySQL
Dmitry Kalyuk, 2016-03-22 16:19:22

How to design a database to link a warehouse with materials and their properties?

There are tables of this type:
fb62598bf6974e6cbe1f740b9e167585.PNG
There are N warehouses (Warehouse A)
There are Y materials (T-shirt, Sweatshirt, Mug), materials have X properties (Color, Gender, Size, etc.)
How to create a table to store the quantity of goods in a warehouse?
Example 1
"Warehouse A" has 10 men's green T-shirts in size XL
Example 2
"Warehouse A" has 5 white mugs

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Entelis, 2016-03-23
@kalyukdo

You now have a description of conditionally "prototypes" and not specific materials.
There are materials, there are properties, there is a connection between them - but there are no concrete objects.
We start new plates to describe the actual unit of goods
1) good
good_id (pri, ai)
material_id
, if desired, you can add a name
2) good_property
good_id (pri)
property_id (pri)
value
And a plate for storing the remains of a particular product in a particular warehouse
3) xref_good_warehouse
good_id ( pri)
warehouse_id (pri)
value

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question