Forum database stricture |
Forum database stricture |
joyful |
Jun 9 2011, 01:44 PM
Post
#1
|
Advanced Member Group: Members Posts: 239 Joined: 15-November 10 Member No.: 13,147 |
Hey!
Simply out of personal interest, I was wondering what then standard stricture of a forum database is... For example, HTML help: Is each topic a new table? and each sub category (Like Programming etc,) a new database? Or, is the whole forum one database? Also, I am wondering this about a mySQL database forum (I am sure there other database types, but I am wondering about mySQL) Thanks! I was just wondering! -- |
joyful |
Jun 14 2011, 02:36 PM
Post
#2
|
Advanced Member Group: Members Posts: 239 Joined: 15-November 10 Member No.: 13,147 |
Anyone?
I was simply thinking about and wondering what this sort of thing would be like... What would the stricture of a large database of this kind be like? Would each topic be a table? Thanks a lot! |
Darin McGrew |
Jun 14 2011, 05:53 PM
Post
#3
|
WDG Member Group: Root Admin Posts: 8,365 Joined: 4-August 06 From: Mountain View, CA Member No.: 3 |
If I were designing a forum, I'd have the entire forum be a single database. I wouldn't create separate databases for each topic.
BTW, the word you're looking for is "structure" not "stricture". The word "stricture" means something else entirely. |
Brian Chandler |
Jun 15 2011, 02:18 AM
Post
#4
|
Jocular coder Group: Members Posts: 2,460 Joined: 31-August 06 Member No.: 43 |
Anyone? I was simply thinking about and wondering what this sort of thing would be like... What would the stricture of a large database of this kind be like? Would each topic be a table? A table is a collection of entries, each having the same structure. And each *topic* has the same structure. It therefore makes no sense to have one table per topic. You need a table TOPIC, in which each entry contains all the bits of info relating to a single topic. But within a topic there will be many posts; you therefore need a table POST, in which each entry contains all the bits of info relating to a single post. Each entry in the POST table will include the id of the TOPIC to which it belongs. (This is "database 101", I think...) |
joyful |
Jun 15 2011, 01:00 PM
Post
#5
|
Advanced Member Group: Members Posts: 239 Joined: 15-November 10 Member No.: 13,147 |
Hey! Thanks for the replies.
Sorry about the misspelling (structure), my bad! So, it would be made of 1 database that had 2 tables. (POST and TOPIC) So, The TOPIC table would basically be a list of all the topics? And the POST table would be all of the posts (they would be coordinated with the topic they are from in the TOPIC table)? Do I understand correctly? Thanks a lot! |
Darin McGrew |
Jun 15 2011, 03:01 PM
Post
#6
|
WDG Member Group: Root Admin Posts: 8,365 Joined: 4-August 06 From: Mountain View, CA Member No.: 3 |
That sounds like a reasonable approach to me. But you're likely to have more than just those 2 tables.
|
joyful |
Jun 15 2011, 07:36 PM
Post
#7
|
Advanced Member Group: Members Posts: 239 Joined: 15-November 10 Member No.: 13,147 |
What else would you have? Maybe "USERS"?
Anything else? Thanks again! |
Darin McGrew |
Jun 15 2011, 08:15 PM
Post
#8
|
WDG Member Group: Root Admin Posts: 8,365 Joined: 4-August 06 From: Mountain View, CA Member No.: 3 |
Yes, USERS seems like a given, unless all the posts are anonymous. And if users can upload files, then you might need a table for those. And so on, depending on the functionality you're going to implement.
|
joyful |
Jun 17 2011, 01:56 PM
Post
#9
|
Advanced Member Group: Members Posts: 239 Joined: 15-November 10 Member No.: 13,147 |
Yes... That is true...
Thanks a lot Darin and Brian... That perfectly answers my question! |
Lo-Fi Version | Time is now: 19th March 2024 - 02:24 AM |