Table relationships - storing folders into boxes

miguelito_cz

New member
Local time
Today, 12:12
Joined
Nov 12, 2010
Messages
6
Hey guys,

I'm having kinda trouble deciding about table relationships in a database I am designing.

It's about storing physical folders into specific position in boxes. Each box has got say 200 slots. One slot can hold only one folder. The thing is to find the location of a folder based on the folder's ID. I also need to have an overview about free slots in each box, when inserting a folder.

So I have these tables:
Boxes
Slots
Folders.

How should I set the relationships between them?
 
if one slot = 1 folder, then you dont need a table for folders.

just boxes and folders. (or boxes and slots) - same difference

what you probably shouldn't do is pre-populate a load of empty lsots within the box. access is best worked using sparse matrixes.
 
if one slot = 1 folder, then you dont need a table for folders.

just boxes and folders. (or boxes and slots) - same difference

what you probably shouldn't do is pre-populate a load of empty lsots within the box. access is best worked using sparse matrixes.


Thanks for your reply, Gemma. I think I need to have a table for slots, because what I need to know for any given folder is:
- the ID of the box
- the # of the slot in this box where the folder is stored.

Yeah, I think that wouldn't be a good thing to prepopulate the slot table with empty records.
 
no - but if a slot has just one folder - then you dont need a separate table for both.

just add extra columns to the slot table, to store the foldername, and any other details about the folder.

that's the point - you don't need a separate table for the slots and folders. it doesn't matter what you call the table. it will carry an identifying number, which you need to allocate, and also store details of its contents.
 
Thanks Gemma! Now I have these tables and relationships between them. I think it is perfectly what I need. Is there anything from the relationship point of view that could be wrong about it?
 

Attachments

  • 2010-11-16_154112.png
    2010-11-16_154112.png
    17.5 KB · Views: 198

Users who are viewing this thread

Back
Top Bottom