SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Apr 2007
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    can someone help with figuring out a good db design

    Hello everyone, i need help figuring out a smart db/table design... i am working on a webpage that has restaraunt menu's.. i need a good way to hold data in the db for options such as.. steak or cheese, different pop flavors etc.
    so that i can pull them from the db and make checkboxes/radio buttons etc

  2. #2
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    Why dont you post your primary ideas and kick the discussion off?

  3. #3
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,789
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    1. Work out all of the different fields that you need.
    2. Using 1st, 2nd, and 3rd normalizations and the relationships between the fields work out the logical division into separate tables.
    3. Look to see if Boyce-Codd or 4th or 5th normal forms apply and if so adjust for them.
    4. Reverse any normalizations that need to be reversed for efficiency (eg. put the postal code/zip code back in with the whole address instead of having a separate table for it).

    See http://www.felgall.com/mfgen3.htm for a description of database normalization and what all of the processes involve.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  4. #4
    SitePoint Member
    Join Date
    Apr 2007
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I dont have any primary idea's as of yet. I cant figure out a good way to store the data and access it.

  5. #5
    SitePoint Wizard wheeler's Avatar
    Join Date
    Mar 2006
    Location
    Gold Coast, Australia
    Posts
    1,369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    alternatively, just start making some tables and continue to refine the overall structure until you feel that you've covered all the necessary bases. If you have no experience creating databases, this could be the best place to start.

    Better yet, get a pencil and paper, and start drawing! Once you hit a particular problem, get some help at sitepoint in the appropriate forum.
    Studiotime - Time Management for Web Developers
    to-do's, messages, invoicing, reporting - 30 day free trial!
    Thomas Multimedia Web Development

  6. #6
    SitePoint Wizard REMIYA's Avatar
    Join Date
    May 2005
    Posts
    1,351
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by wheeler View Post
    Better yet, get a pencil and paper, and start drawing! Once you hit a particular problem, get some help at sitepoint in the appropriate forum.
    Perhaps, this is the best advice you can get. When you draw, everything comes out crystal clear.


Bookmarks

Posting Permissions

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