Home | Forums | Articles | F@H
Help | Search | Members | Calendar | Forum Map | Cybervillage | Archive
Welcome Guest ( Log In | Register | Resend Validation Email )


>  IceTeks Forums -> Technology made cool -> Programming


  Archived - No replies allowed - start new thread insteadStart new topicStart Poll

>  Database Table structure for a Forum, What tables and columns do I need?
Track this topic | Email this topic | Print this topic
halojoy
  Posted: Jun 9 2005, 09:47 AM
Quote Post

Icicle

Group Icon

Group: IceTeks Newbies
Posts: 19
Member No.: 913
Joined: 9-June 05
Ice Cubes: 7



.
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:
excl.gif 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
smile.gif

This post has been edited by halojoy on Jun 9 2005, 09:50 AM


--------------------
... i make php ... i make it good
PM Top
poisonous_flame
Posted: Jun 9 2005, 10:54 AM
Quote Post

Icicle

Group Icon

Group: IceTeks Newbies
Posts: 9
Member No.: 911
Joined: 8-June 05
Ice Cubes: 0



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
PMEmail Poster Top
Red Squirrel
Posted: Jun 9 2005, 10:59 AM
Quote Post

ZOMG!

Group Icon

Group: Admins
Posts: 13 964
Member No.: 1
Joined: 18-December 02
Ice Cubes: 163183



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)


--------------------
user posted image
http://www.redsquirrel.me my blog
http://www.uovalor.com AoS/ML Ultima Online Shard
PMEmail PosterUsers Website Top
halojoy
Posted: Jun 9 2005, 11:46 AM
Quote Post

Icicle

Group Icon

Group: IceTeks Newbies
Posts: 19
Member No.: 913
Joined: 9-June 05
Ice Cubes: 7



QUOTE
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' cool.gif that is in my own fashion.

QUOTE
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.

welcome.gif Thanks for your replies.


--------------------
... i make php ... i make it good
PM Top
halojoy
Posted: Jun 9 2005, 12:01 PM
Quote Post

Icicle

Group Icon

Group: IceTeks Newbies
Posts: 19
Member No.: 913
Joined: 9-June 05
Ice Cubes: 7



smile.gif

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

xyxthumbs.gif


--------------------
... i make php ... i make it good
PM Top
Cold Drink
Posted: Jun 9 2005, 03:05 PM
Quote Post

Liquid Nitrogen Blaster

Group Icon

Group: Ice Age Members
Posts: 109
Member No.: 454
Joined: 16-July 04
Ice Cubes: 0



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.


--------------------
PMEmail PosterUsers WebsiteAOL Top
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:
« Next Oldest | Programming | Next Newest »

Topic Options Archived - No replies allowed - start new thread insteadStart new topicStart Poll

 



[ Script Execution time: 0.0338 ]   [ 13 queries used ]   [ GZIP Enabled ]

< Home | Forums | Contact >