Page 1 of 1

Forum layout

Posted: Thu Jul 29, 2004 9:26 pm
by pinehead18
I'm writing a mini forum and just need a little advice.

I have a forum table (the main forums) then a viewtopic.php page with lists the topics and the description that peopel post under them. and then the threads.

Do i need a topic table and a thread table? or should i make those one?

Thank you
Anthony

Posted: Mon Aug 02, 2004 4:30 am
by Jean-Yves
Yes -

eg: Forums table has 1-to-many related records in Topics table which in turn has a 1-to-many related records in Threads.

You'll probably want to have a Thread_Answers table too, to normalise the answers (otherwise they'll all have the Thread heading field needlessly repeated) - if I've understood you're hierarchy correctly.

Basically - if' you are repeating information other than foreign keys, then consider creating a new table and relationship below the current level.