Database Table structure for a Forum

Computer builds, hardware and software discussion or troubleshooting, including peripherals. Essentially a general place to talk about desktop computers.
Locked
halojoy
Posts: 19
Joined: Thu Jun 09, 2005 9:18 am

Database Table structure for a Forum

Post by halojoy »

.
Database Table structure for a Forum
I am in process to create a PHP mini database class. A general php add-on for flat file data storage.
To test my new mini database class I will now write a miniforum application.
Will be first forum script I write.

Question:
:caution: What is a nice database structure setup for a forum?

I was thinking of having at least 4 tables: members, forums, threads, posts
Columns for table posts could be:
id, date, poster, topic, message
I want it to be clean and simple, but still should work good and be easy to handle data in pages.
What to consider?? Any suggestions??

halojoy
:)

Archived topic from Iceteks, old topic ID:3389, old post ID:27321
... i make php ... i make it good
Anonymous

Database Table structure for a Forum

Post by Anonymous »

are you trying to make the forum database from scratch? if yes your brave lol. But like if you install something like phpbb or ipb all you have to do is provide a functional database and ...in theory it should write all that is needed inside of the database itself

Archived topic from Iceteks, old topic ID:3389, old post ID:27322
User avatar
Red Squirrel
Posts: 29209
Joined: Wed Dec 18, 2002 12:14 am
Location: Northern Ontario
Contact:

Database Table structure for a Forum

Post by Red Squirrel »

Actually download the SBBS beta (http://squirrelbbs.iceteks.com) very simplified BBS with missing functionabilities (hence why it's a first release beta) but should give you an idea of DB structuring.

If you don't want unlimited subforums you can have a categories table too and not worry about the child/parant forum stuff which can get complicated to work with (but more organized in the end time)

Archived topic from Iceteks, old topic ID:3389, old post ID:27323
Honk if you love Jesus, text if you want to meet Him!
halojoy
Posts: 19
Joined: Thu Jun 09, 2005 9:18 am

Database Table structure for a Forum

Post by halojoy »

poisonous_flame:
Are you trying to make the forum database from scratch?
If yes your brave lol.
Should make me belong to them brave ....
Actually my mini database class is working quite alright (bugs hunting aside).
I have done some small tests with creating tables, add and delete records.
Now I want to write that 'ultimate bulletin board' B) that is in my own fashion.
Red Squirrel:
Actually download the SBBS beta (http://squirrelbbs.iceteks.com) very simplified BBS ...
... but should give you an idea of DB structuring.
... you can have a categories table too ...
Sure, I will go download and have a look at SBBS beta.
Always something new to learn from studying how others have done.
Table 'categories'. Yes, will have to consider that.

:wave2: Thanks for your replies.

Archived topic from Iceteks, old topic ID:3389, old post ID:27327
... i make php ... i make it good
halojoy
Posts: 19
Joined: Thu Jun 09, 2005 9:18 am

Database Table structure for a Forum

Post by halojoy »

:)

What a nice looking style in beta Squirrel Bulletin Board System!
I like it. I downloaded the beta.
I even could register an account in this support/demo forum.

http://squirrelbbs.iceteks.com/forums/index.php

:awesome:

Archived topic from Iceteks, old topic ID:3389, old post ID:27328
... i make php ... i make it good
Cold Drink
Posts: 96
Joined: Fri Jul 16, 2004 1:04 pm

Database Table structure for a Forum

Post by Cold Drink »

Database structure is depends on a lot of different things. Its easier to store your post text along with the post information but that makes for slower record access. For better peformance, keep a seperate text table. But this adds additional complexity.

Anyway, design your application and then make the data fit. Not the other way around.

Archived topic from Iceteks, old topic ID:3389, old post ID:27332
Locked