Database Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesDatabase Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old October 8th, 2003, 09:58 PM
aestheticdeception aestheticdeception is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 3 aestheticdeception User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to aestheticdeception Send a message via Yahoo to aestheticdeception
Forum Idea

ahem..ok...

would it be a completely stupid idea to have my script create a new table for new entries? has this been done already?

for instance: say i have a forum with a table named "forum_topic1"...when somebody starts a new post the script would create a table called "forum_topic1_post1" to store the post and all of it's child threads in.
would this cause the script to take more time to execute or would it take ALOT less time for extremely large amounts of threaded forum data? i haven't tested this cause i'm pretty lazy but if a few people think it could work i'm gonna try it out

Reply With Quote
  #2  
Old October 8th, 2003, 10:46 PM
Blindeddie Blindeddie is offline
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: NJ - USA
Posts: 2,152 Blindeddie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 4
RE: Forum Idea

Ok say your forum gets popular!!! every time someone creates a new thread, a new DB table is created. you would have tables numbering in the thousands...very bad idea...that is the beauty of relational databases, one table for original posts and one table for replies linked by a unique identifier...two tables...much more efficient.

Reply With Quote
  #3  
Old October 8th, 2003, 11:34 PM
aestheticdeception aestheticdeception is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 3 aestheticdeception User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to aestheticdeception Send a message via Yahoo to aestheticdeception
RE: Forum Idea

well, indeed it would be hectic to visually go through all the tables with phpmyadmin or something similar, but what would it's impact be on the server? would it be faster or slower than the relational tables? wouldn't (in theory) it be much, much faster to access the posts since each post had it's own table for replies?

Reply With Quote
  #4  
Old October 9th, 2003, 08:51 PM
zombie zombie is offline
Codewalkers Intermediate (1500 - 1999 posts)
 
Join Date: Apr 2007
Location: serbia
Posts: 1,876 zombie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
RE: Forum Idea

it would not work as you might think

first, there is more to a forum than viewing a thread.

how would you list all of the threads in one forum. how would you list only first 50 of them (to paginate).

how would you list time and username of last post?

how would you search trough the forums?

there are many things that would be 100+ times slower than with one table because you would have to execute 100 queries for those things.

and the main thing, viewing one thread would not be much faster (if at all), because that is what relationall databases are for. you build index for forum_id and thread_id columns, and you are as fast (or faster) as with using one table per thread.

Reply With Quote
  #5  
Old October 9th, 2003, 11:59 PM
aestheticdeception aestheticdeception is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 3 aestheticdeception User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to aestheticdeception Send a message via Yahoo to aestheticdeception
RE: Forum Idea

i've seen the light. thanks for showing me how the power of one idiot is insignificant compared to your wisdom. ^_^ (that wasn't sarcastic but rather sincere *** kissing as i am really good at it)

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesDatabase Help > Forum Idea


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT