Thread: Database Layout Question

Results 1 to 3 of 3
Share This Thread →
  1. #1
    markmoss is offline Registered User ASP Free Newbie (0 - 499 posts)
    Join Date
    Feb 2013
    Posts
    2
    Rep Power
    0

    Talking Database Layout Question

    Help

    I am in need of some help laying out my database.

    I have the following tables that I need to relate to each other but I can't think of the correct way to do it

    1. Grocery Chain Headquarters - contains information on address, contact information etc. (PK - ChainID)
    2. Store Locations - contains information on each Store in the Chain, address, contact etc. (PK - StoreID)
    3. Incedent - contains information about an incedent that could effect 1 or more Stores ( power outage, tornado, equipment failure etc ).(PK - IncedentID)
    4. Items - Items within the store that have to be written off or marked down due to the incedent.(PK - UPC)

    1st Level is the Headquarters Table
    4thLevel is the Items Table

    Now the problem is the 2nd and 3rd level

    The Headquarters has many Locations just as a Location may have many Incedents

    The Headquarter also has many Incedents and those Incedents may have many Locations

    If I have the Location as the 2nd Level, then I have to have mutiple Incedent records if the Incedent effects more than one Location and in reverse

    If I have the Incedent as the 2nd Level, then I have to have mutiple Location records - 1 for each Incedent.

    I sure hope someone can fix my brain fart, because I am currentlly stuck.


    Mark Moss

  2. #2
    gk53's Avatar
    gk53 is offline Contributing User ASP Free Beginner (1000 - 1499 posts)
    Join Date
    Mar 2005
    Location
    Columbus, OH
    Posts
    1,220
    Rep Power
    263
    it looks like you need one more table incident_location just incidentId and Location_ID
    GK
    __________________________________________________ _____
    if you found this post is useful click scale (right side on this reply ) and agree

  3. #3
    markmoss is offline Registered User ASP Free Newbie (0 - 499 posts)
    Join Date
    Feb 2013
    Posts
    2
    Rep Power
    0
    gk53


    Thank you so very much for your reply, and you are absolutlly correct with adding the intersection table.


    Mark Moss

Share This Thread →

Become Part of This Conversation

Join NowFor Free!

Similar Threads

  1. Sports Card Database Layout Help
    By serax in forum Microsoft Access Help
    Replies: 3
    Last Post: January 31st, 2010, 01:46 PM
  2. General Layout / Functionality Question
    By djfiii in forum HTML, JavaScript And CSS Help
    Replies: 1
    Last Post: January 24th, 2007, 12:36 PM
  3. Database Question - C#
    By DavieCooper in forum .NET Development
    Replies: 1
    Last Post: November 15th, 2006, 10:49 AM
  4. CSS layout instead of table layout
    By bigbigcow in forum HTML, JavaScript And CSS Help
    Replies: 4
    Last Post: October 9th, 2006, 01:14 PM
  5. Database Question
    By Jon2112 in forum ASP Development
    Replies: 2
    Last Post: April 27th, 2004, 06:15 PM

ASP Free Advertisers and Affiliates