Results 1 to 8 of 8

Thread: Database question

  1. #1
    Senior Member Kezzer's Avatar
    Join Date
    Sep 2003
    Posts
    4,863
    Thanks
    12
    Thanked
    5 times in 5 posts

    Database question

    Is it better to have no repetition by having one table with a foreign key to another table with types of data (such as articles and news) than it is to have multiple tables seperating each one? I'm talking on a personal small scale project as well as a large business one. Does it depend on how many visitors you get or is that just the better design in general?

  2. #2
    Flak Monkey! Dorza's Avatar
    Join Date
    Jul 2003
    Location
    UK - South Wales
    Posts
    1,762
    Thanks
    34
    Thanked
    17 times in 15 posts
    • Dorza's system
      • Motherboard:
      • Asus P5B Deluxe - WiFi
      • CPU:
      • Q6600 @ 3.06Ghz
      • Memory:
      • 2GB Crucial
      • Storage:
      • 500GB Samsung SpinPoint
      • Graphics card(s):
      • Geforce 9600GT
      • PSU:
      • Cosair HX520W
      • Case:
      • LianLi something something or other
      • Monitor(s):
      • Eizo FlexScan S1910 (1280*1024)
      • Internet:
      • 2mb Virgin (when they want to give me that: else 1mb)
    Id say its better to eliminate as much duplication as possible, but keep things seperate. For example keep any authors in their own table and store all the articles in another, then add an author ID column to the articles and join the two tables together.

    Doing things this way will make the database easier to manage in the future if it gets to a large size.

    I hope this help since im not quite sure if i've understood you correctly.

  3. #3
    Senior Member
    Join Date
    May 2005
    Posts
    434
    Thanks
    0
    Thanked
    0 times in 0 posts
    yea just what the geeza above said, split things up more, you will get rid of dependencies which is a realy good thing and one of the most important things 2 desiging a database of any kind......

  4. #4
    Senior Member Kezzer's Avatar
    Join Date
    Sep 2003
    Posts
    4,863
    Thanks
    12
    Thanked
    5 times in 5 posts
    Yeh i know that, but i'm getting more down to performance and response times of having single tables handling all the content. Yes authors would be seperate but if you had one table handling all the content surely it would take longer for users to get access to that data if they were all asking for data from the same table all the time?

  5. #5
    Moderator DavidM's Avatar
    Join Date
    Jan 2005
    Posts
    8,779
    Thanks
    800
    Thanked
    252 times in 234 posts
    Keeping the tables seperate may make things simpler if it comes to any changes in the future.

    I have this problem with a php project i'm helping on at the moment, where the original coder compressed the data to one table - making it tricky to move to an updated version.

  6. #6
    Senior Member Kezzer's Avatar
    Join Date
    Sep 2003
    Posts
    4,863
    Thanks
    12
    Thanked
    5 times in 5 posts
    Surely you'd just make a query checking if each entry in the table contained a certain keyword (type for example) and then just moving it based on that query?

  7. #7
    Member
    Join Date
    Sep 2003
    Posts
    95
    Thanks
    0
    Thanked
    1 time in 1 post
    it depends on what the database is being used for. If you are talking of millions of rows of static data for data mining then denormalised tables can make bulk fetch operations much faster, but if you want to do any inserts you'll want to try to achieve 3rd Normal Form by avoiding all duplication / repeated data.

    HT

  8. #8
    Senior Member
    Join Date
    Feb 2005
    Location
    Folsom, CA
    Posts
    221
    Thanks
    0
    Thanked
    0 times in 0 posts
    Kind of over my head but keep talking fellas hehe

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. The 78th Annual Hexus Quiz!
    By Stewart in forum General Discussion
    Replies: 19
    Last Post: 23-01-2005, 02:05 PM
  2. Using a switch statement and MySQL database
    By Kezzer in forum Software
    Replies: 2
    Last Post: 15-10-2004, 01:37 PM
  3. abnormal access database traffic?
    By Stoo in forum Networking and Broadband
    Replies: 8
    Last Post: 06-10-2004, 04:43 PM
  4. Replies: 4
    Last Post: 04-08-2004, 02:30 PM
  5. hexus database
    By ingouk in forum HEXUS Suggestions
    Replies: 4
    Last Post: 08-09-2003, 09:46 PM

Posting Permissions

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