Hi Guys,
I should help a person with something like a school exercise, we suppose
to manage boxes for a warehouse:
warehouse
------------------------------------
warehouse_id name
1 Dep01
2 Dep02
3 Dep03
things
-------------------------------------
thing_id name available
1 Printer cable Yes
2 Tv Yes
3 Pc Yes
4 Smartphone Yes
5 Empty No
boxes
--------------------------------------
box_id name thing_id warehouse_id
1 Box01 1 1
2 Box02 2 1
3 Box03 3 1
4 Box04 5 1
5 Box01 3 1
Maybe I should use a table to store every boxes names and another one to >store things linked to the same box name...
If some things are not in a box, you would need:
Warehouses as above
Boxes as above
Things(
t_id integer prinary key not null
, name varchar
, available enum(true,false)
)
Thing_Box(
thing integer references Things(t_id) not null
, box integer references Boxes(b_id) not null
, primary key (thing,box)
)
But it all depends on the requirements of your logistic operations.
HTH
Yes of course, now I should solve another "problem" about products which
will be rent to others outside of the company, they will be stored in
the things and thing_box but but after it when the product will go
outside what happen?
I thought to create a new record in warehouse table named "external"
linked to a user's table, for external user I could add the product in
things table because I don't know what happen outside.
I'd like to try to use tables which already exist but maybe I should use
a specific table for outside products...
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 296 |
Nodes: | 16 (2 / 14) |
Uptime: | 52:54:27 |
Calls: | 6,650 |
Calls today: | 2 |
Files: | 12,200 |
Messages: | 5,330,484 |