Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Reply
DB Structure for a forum - help needed
Old 02-23-2009, 06:45 PM DB Structure for a forum - help needed
GhettoFish's Avatar
Average Talker

Posts: 24
Name: Martin Söderberg
Trades: 0
Hey all.

I am about to get into a lot of work here, I am about to code my own forum, just for the hell of it. I see this project as a way to learn SQL/DB-structure and PHP better. I am just about to dive into the phpBB-code to see if they have anything to offer but would be great if someone could give me some pointers.

The first problem that arised in this was how to structure the DB. The idea of the forum is to end up as something like phpBB/vBB but not as advanced. It will be made with a tree structure.

I asume that there are a couple of good ways to attack this and just pulled up some sites about the Celko Nested Sets. Are there any other ways to do this or is his the best?

Hope to get some good pointers from you my friends. Links and reference material is also welcome and if you know of a public forum that is easier than phpBB to dive in to it would be great since they have A LOT of code, hard to understand it.
__________________
“It is better to create than to be learned, creating is the true essence of life”
- Barthold Georg Niebuhr

Please login or register to view this content. Registration is FREE
GhettoFish is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 02-23-2009, 07:05 PM Re: DB Structure for a forum - help needed
GhettoFish's Avatar
Average Talker

Posts: 24
Name: Martin Söderberg
Trades: 0
After some more use of Google i found a couple of useful links that had been kind enough to post their DB-structure that will give me a hint on how they did it.

Here they are.
http://newsboard.unclassified.de/devel/docs/database
http://punbb.informer.com/docs/dev.html#dbtables

Also if anyone else is interested here is some info about Celko Nested Sets.
http://www.developersdex.com/gurus/articles/112.asp
And an article about storing hirerarchial data in a database
http://www.sitepoint.com/article/hie...data-database/
__________________
“It is better to create than to be learned, creating is the true essence of life”
- Barthold Georg Niebuhr

Please login or register to view this content. Registration is FREE
GhettoFish is offline
Reply With Quote
View Public Profile
 
Old 02-24-2009, 01:20 PM Re: DB Structure for a forum - help needed
GhettoFish's Avatar
Average Talker

Posts: 24
Name: Martin Söderberg
Trades: 0
Oh i can build this out with one more question relating to the first post.

Are there any benefits of storing forum data in a XML-file instead of a database? If so what are the pros and cons on doing it that way? I often read that XML is like some kind of gift from god but i have never heard of anyone actually using it, everyone is still talking about DBs to store data.
__________________
“It is better to create than to be learned, creating is the true essence of life”
- Barthold Georg Niebuhr

Please login or register to view this content. Registration is FREE
GhettoFish is offline
Reply With Quote
View Public Profile
 
Old 02-24-2009, 01:26 PM Re: DB Structure for a forum - help needed
Truly's Avatar
Ultra Talker

Posts: 322
Trades: 0
XML is great because you can easily use it across different platforms and on different sites. Its great for affiliate programs like what Amazon has because it supplies the information and you can easily manipulate it.

For a forum I don't see any advantage to using XML, if anything I would see it as less secure.

Your question is pretty broad, can you refine it a bit more. This is a bit like going to a professor and saying you dont understand, they want to know what you don't understand .

Just a suggestion since this thread hasnt had much of a response yet. It is a great topic though and it looks like you are heading in the right direction.
__________________
DVD Movie Release Database:
Please login or register to view this content. Registration is FREE
Truly is offline
Reply With Quote
View Public Profile
 
Old 02-24-2009, 01:32 PM Re: DB Structure for a forum - help needed
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
XML is fine for configuration files on forums, but as the datastore? Far, far to slow and unwieldy
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to DB Structure for a forum - help needed
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.67286 seconds with 12 queries