|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
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.
|
|
#3
|
|||
|
|||
|
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?
|
|
#4
|
|||
|
|||
|
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. |
|
#5
|
|||
|
|||
|
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)
|
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Database Help > Forum Idea |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|