Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2010

    DB design, a few issues.

    I've been developing for someone, I'm new so it's all free thus it's for experience only. I say that because you'll likely notice lots of errors here that I'm not aware off and boil your blood because someone could be profiting off such tripe!


    They're the bulk of my tables, it's all important.

    I'm having trouble deciding the relationships. Here's what I think you should know:

    A customer can only be an exhibitor, trader, food vendor or weekender.
    A customer cannot be more than one of the above.
    The aforementioned can only be one registered customer even if they bring x amount of staff.

    That tells me it's a simple 1-1 relationship. At first I thought they were 1-n but I'm convinced they should be 1-1. If I create a form I get a lot of errors, although 1-n worked fine when I had that set up (you'll notice multiple IDs).

    The reason I've kept customer types separate and not just included a field determining the customer type is because different data is stored depending on the customer type.

    So, am I handling this the right way? or do I have my wires crossed?


  2. #2
    Join Date
    Apr 2002
    Toronto, Canada
    do a search for supertype/subtype -- i believe you are on the right track

    well, except for the additional id columns (foodvendorid, etc.) that you are assigning to customers | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Jul 2008
    I see it alright, although those address lines seem kind of suspicious. You may have to normalize some tables a little, so I recommend you to read about normalization as well as what r937 told you.

Posting Permissions

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