Mr_Cat - 4:56 pm on Feb 8, 2012 (gmt 0)
Hi there, thanks for the info, that's great! I'd love to post more but I'm trying to keep my project to myself just now which makes it a bit tricky! :)
I do mean 'primary key' yes.
Being a user of smf I've taken a look at their table structure and of course you are indeed right in that it seems they have one table that contains all the posts on the whole forum. What's bugging me is that I still don't quite understand why it's better to have all my posts for seperate sections of the site in one big table instead of several more relevant ones.
If on a forum you have 20,000 users all posting and reading, and just one table that needs to be referenced and updated many many times in an instant, how is that beter than having 5 tables effectively 'spreading the load'?
Being totally new to databases and sql, and with but a vague smattering of php I'm using this project to help me learn more about them all. I've managed to pretty much tame the beast of querying, but it now turns out there's a lot more to good structuring than one might think.
Anyway, thanks again for your help, you've pointed me in the direction of taking a better look at what other forums do, and restructuring my db in a new fashion and writing some code for it. The one truely ultimately frustrating thing tho is that I'm not quite sure why I'm doing it that way :(