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
1aaaaaaaaaaaa Dep01
2aaaaaaaaa Dep02
3aaaaaaaaa Dep03
things
-------------------------------------
thing_idaaaa nameaaaaaaa available
1aaaaaaa Printer cableaaa Yes
2aaaaaaa Tvaaaaaaa Yes
3aaaaaaa Pcaaaaaaa Yes
4aaaaaaa Smartphoneaaa Yes
5aaaaaaa Emptyaaaaaaa No
boxes
--------------------------------------
box_idaaa nameaaa thing_idaaa warehouse_id
1aaaaaa Box01aaa 1aaaaaaa 1
2aaa Box02aaa 2aaaaaaa 1
3aaa Box03aaa 3aaaaaaa 1
4aaa Box04aaaa 5aaaaaaa 1
5aaa Box01aaa 3aaaaaaa 1
Maybe I should use a table to store every boxes names and another one to store things linked to the same box name...
^Bart
On 18-1-2020 16:01, ^Bart wrote:
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-a-a-a-a-a-a-a-a-a-a-a-a Dep01
2-a-a-a-a-a-a-a-a-a Dep02
3-a-a-a-a-a-a-a-a-a Dep03
things
-------------------------------------
thing_id-a-a-a-a name-a-a-a-a-a-a-a available
1-a-a-a-a-a-a-a Printer cable-a-a-a Yes
2-a-a-a-a-a-a-a Tv-a-a-a-a-a-a-a Yes
3-a-a-a-a-a-a-a Pc-a-a-a-a-a-a-a Yes
4-a-a-a-a-a-a-a Smartphone-a-a-a Yes
5-a-a-a-a-a-a-a Empty-a-a-a-a-a-a-a No
boxes
--------------------------------------
box_id-a-a-a name-a-a-a thing_id-a-a-a warehouse_id
1-a-a-a-a-a-a Box01-a-a-a 1-a-a-a-a-a-a-a 1
2-a-a-a Box02-a-a-a 2-a-a-a-a-a-a-a 1
3-a-a-a Box03-a-a-a 3-a-a-a-a-a-a-a 1
4-a-a-a Box04-a-a-a-a 5-a-a-a-a-a-a-a 1
5-a-a-a Box01-a-a-a 3-a-a-a-a-a-a-a 1
Maybe I should use a table to store every boxes names and another one
to store things linked to the same box name...
^Bart
And the question is ?
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: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 63 |
| Nodes: | 6 (0 / 6) |
| Uptime: | 492975:42:57 |
| Calls: | 840 |
| Files: | 1,301 |
| D/L today: |
16 files (28,385K bytes) |
| Messages: | 264,959 |