Results 1 to 3 of 3
Mar 1, 2002, 07:04 #1
Content Management system DB layout
I'm currently planning a CMS in PHP with mySQL database.
My question is what sort of database schema would work best. What i curently have is lots of related tables that seem to be nested and are probably not the best way to do it. The structure is:-
Section+ -Sub-section+ | -Page 1+ | | -Heading 1 | | -Paragraph 1+ | | | -Image 1 | | | -Image n | | -Heading n | | -Paragraph n+ | | -Image 1 | | -Image n | | | -Page 2+ | -Heading n | -Paragraph 1+ | | -Image 1 | | -Image n | -Heading n | -Paragraph n+ | -Image 1 etc.. -Image n
sections - contains uniqueId as PK, section title,
subsections - contains uniqueId as PK, sectionId as FK, subsection title,
paragraphs - contains uniqueId as PK, subsectionId as FK, the actual text and an order feild for setting the order they display on the page.
images - contains uniqueId as PK, a list of all the images on the server with a feild linking the to a specific paragraphId.
I'm not sure if any of this is clear or I've presented it in the corect way but I am quite new to this concept.
Thanks for any help or coments