SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot
    Join Date
    Jan 2004
    Location
    Cape Cod
    Posts
    163
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    New project a few questions

    Sorry for the vague title but I have a couple of different questions.

    #1- We are working on a new site that will have a number of unique sections such as real estate, business directory, restaurant guide these will all be database driven so I am wondering if I will need to use these sections together at certain points should I create a different DB for each section or have one big DB with many tables?


    #2- In one of the DB's specifically restaurants I want to show that they offer certain services right now there are four, Kid friendly, live entertainment, take out, and gift certificates. now as I understand it to make the DB normal I should not put 4 additional fields in the restaurant table but rather create a separate table with the services then a third table that links the restaurants to the services, this is how I have it set up now, but I am wondering if it is a total DB sin to put the 4 fields in the restaurant table then have the application figure out what to do if the are flagged as true.

    I am sure I will have other questions as I go but these are the two for now :-) Thanks for any help and if you need more info please let me know.

    Thanks
    Don

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,014
    Mentioned
    53 Post(s)
    Tagged
    2 Thread(s)
    1. one database

    2. not a "total sin" but very awkward and inefficient queries and a huge ripple effect on your application code if you need to drop one of those services or add a new one
    r937.com | rudy.ca | Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  3. #3
    SitePoint Zealot
    Join Date
    Jan 2004
    Location
    Cape Cod
    Posts
    163
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks fro the response. That is what I figured but I just thought I would check to make sure.


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
  •