Designing a database to allow store variable page layouts
My site is currently made up of static pages, with product description pages that follow a similar theme, but are all different to a degree. I'm moving the site over to Coldfusion, and planning to use it with mySQL.
Currently product pages contain a mixture of paragraphs, ordered and unordered lists, in a variable order. From my limited knowledge of SQL so far, I was thinking that I could have one table that refers to components of the page stored in other tables. For example, the first item might be a paragraph, stored in a paragraphs table, then there might be a list, and all items of that list are in a list table, then another paragraph etc.
I remember learning basic programming years ago, and started to design my own sort routine, and started by having it look at the first character of each word, and working through sequentially. I later discovered that there was no need, you could simply ask if one word was bigger than another word, in it's entirety.
Similarly, I'm wondering if there is a simpler way of storing a product description in a database. The people editing the product descriptions are not familiar with HTML, so I didn't want to simply have description with HTML formatting in the database.
I'm just in the design phase at the moment, the first time I've used a relational database or Coldfusion, but I have read the mySQL Crash Course book by Ben Forta, and am working my way through the CFWACK books, but (so far no example quite fits what I'm trying to do).
Thanks for any help, any tips would be useful.
Are product descriptions usually stored in databases?
I'm converting a static site to a Coldfusion site, and trying to work out the design of the mySQL database.
Is it normal to put the product description (with HTML formatting?) in a database table, or would it be better to have a link to an html file within the CF template?
I had initially thought I'd need multiple tables for storing lists, paragraphs, etc. but a reply I got in the SQL forum suggested that would make it overly complicated.
My guess is that it would be easier to manage if the description (with html formatting) was included in a table - and if so - would it be normal to keep it all as one large chunk of html or would it be necessary to break it down into pieces (like my original plan of having tables for lists, paragraphs etc).
[ Looks like the moderators merged this separate thread from the Coldfusion forum - just to explain why it looks like I'm repeating myself here... ]