![]() ![]() |
| joyful |
Jun 9 2011, 01:44 PM
Post
#1
|
|
Advanced Member ![]() ![]() ![]() ![]() Group: Members Posts: 236 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! -- -------------------- "When I was 5 years old, my mother always told me that happiness was the key to life. When I went to school, they asked me what I wanted to be when I grew up. I wrote down ‘happy’. They told me I didn’t understand the assignment, and I told them they didn’t understand life.” ~ John Lennon
|
| joyful |
Jun 14 2011, 02:36 PM
Post
#2
|
|
Advanced Member ![]() ![]() ![]() ![]() Group: Members Posts: 236 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! -------------------- "When I was 5 years old, my mother always told me that happiness was the key to life. When I went to school, they asked me what I wanted to be when I grew up. I wrote down ‘happy’. They told me I didn’t understand the assignment, and I told them they didn’t understand life.” ~ John Lennon
|
| Darin McGrew |
Jun 14 2011, 05:53 PM
Post
#3
|
|
WDG Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Root Admin Posts: 7,868 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. -------------------- Darin McGrew
WDG Member since 1998 |
| Brian Chandler |
Jun 15 2011, 02:18 AM
Post
#4
|
|
Jocular coder ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 2,165 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...) -------------------- Brian Chandler
Nothing in this post constitutes "commercial solicitation". PayPal does not solicit residents of Japan. Contents may settle in transit. "Legal mind" may or may not be brain-damaged. |
| joyful |
Jun 15 2011, 01:00 PM
Post
#5
|
|
Advanced Member ![]() ![]() ![]() ![]() Group: Members Posts: 236 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! -------------------- "When I was 5 years old, my mother always told me that happiness was the key to life. When I went to school, they asked me what I wanted to be when I grew up. I wrote down ‘happy’. They told me I didn’t understand the assignment, and I told them they didn’t understand life.” ~ John Lennon
|
| Darin McGrew |
Jun 15 2011, 03:01 PM
Post
#6
|
|
WDG Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Root Admin Posts: 7,868 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.
-------------------- Darin McGrew
WDG Member since 1998 |
| joyful |
Jun 15 2011, 07:36 PM
Post
#7
|
|
Advanced Member ![]() ![]() ![]() ![]() Group: Members Posts: 236 Joined: 15-November 10 Member No.: 13,147 |
What else would you have? Maybe "USERS"?
Anything else? Thanks again! -------------------- "When I was 5 years old, my mother always told me that happiness was the key to life. When I went to school, they asked me what I wanted to be when I grew up. I wrote down ‘happy’. They told me I didn’t understand the assignment, and I told them they didn’t understand life.” ~ John Lennon
|
| Darin McGrew |
Jun 15 2011, 08:15 PM
Post
#8
|
|
WDG Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Root Admin Posts: 7,868 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.
-------------------- Darin McGrew
WDG Member since 1998 |
| joyful |
Jun 17 2011, 01:56 PM
Post
#9
|
|
Advanced Member ![]() ![]() ![]() ![]() Group: Members Posts: 236 Joined: 15-November 10 Member No.: 13,147 |
Yes... That is true...
Thanks a lot Darin and Brian... That perfectly answers my question! -------------------- "When I was 5 years old, my mother always told me that happiness was the key to life. When I went to school, they asked me what I wanted to be when I grew up. I wrote down ‘happy’. They told me I didn’t understand the assignment, and I told them they didn’t understand life.” ~ John Lennon
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 18th June 2013 - 02:18 AM |