Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2003
    Posts
    19

    Unanswered: heirarchical database

    I am a novice in Access, and I am trying to design a database that is heirachical.

    I have a container which has 4 shelves in it.
    Each shelf has 5 racks.
    Each rack is composed of boxes arranged in 5 rows and 4 columns.
    Each box is in turn a 9X9 storage grid.

    Some of the boxes can be empty. The database is used to make entry in the boxes and to keep track of what is stored. What is the best way to go about designing such a database? Thanks for your time.

    Hailu

  2. #2
    Join Date
    Aug 2003
    Location
    Delft, The Netherlands (EU)
    Posts
    447

    Re: heirarchical database

    Just make 4 tables, and define foreign keys between them.
    Make everything as simple as possible, but not simpler! - A. Einstein
    DB Problems? DB Explorer, BTrieve Re-engineering, DB Conversions & ETL? Conversion Tool

  3. #3
    Join Date
    Sep 2003
    Posts
    19

    Re: heirarchical database

    Originally posted by DoktorBlue
    Just make 4 tables, and define foreign keys between them.
    Thanks DoktorBlue. I am not very clear. Is the following what you are suggesting?

    Table1: Container
    Field1: Container_name
    Field2: Shelf_ID

    Table2: Shelf_table
    Field1: Shelf_ID (PK)
    Field2: Rack_ID (FK)

    Table3: Rack_table
    Field1: Rack_ID (PK)
    Field2: Box_ID (FK)

    Table2: Box_table
    Field1: Box_ID (PK)
    Field2: row
    Field3: column

  4. #4
    Join Date
    Aug 2003
    Location
    Delft, The Netherlands (EU)
    Posts
    447

    Re: heirarchical database

    Nope, the other way around:

    Table1: Container
    Field1: Container_name

    Table2: Shelf_table
    Field1: Shelf_ID (PK)
    Field2: Container_id (FK)

    Table3: Rack_table
    Field1: Rack_ID (PK)
    Field2: Shelf_ID (FK)

    Table4: Box_table
    Field1: Box_ID (PK)
    Field2: Rack_ID (FK)
    Field2: row
    Field3: column

    Table5: Storage_table
    Field1: Box_ID (FK)
    Field2: Storage_ID (FK)
    Field2: row
    Field3: column
    Make everything as simple as possible, but not simpler! - A. Einstein
    DB Problems? DB Explorer, BTrieve Re-engineering, DB Conversions & ETL? Conversion Tool

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •