|
Right off the top of my head I have to say that the database design looks overly complicated. No need for 3 tables here and there's no value in it either.
Instead do this:
select * from item;
+-----+---------+
| iID | name | sID
+-----+---------+
| 1 | cup | 1
| 2 | plate | 1
| 3 | book | 1
| 4 | flowers | 1
+-----+---------+
select * from shelf;
+-----+---------+
| sID | name |
+-----+---------+
| 1 | shelf 1 |
+-----+---------+
__________________
.
|