Note that there are some explanatory texts on larger screens.

plurals
  1. POPHP/MySQL database design for various/variable content - modular system
    primarykey
    data
    text
    <p>I'm trying to build (right now just thinking/planning/drawing relations :] ) little modular system to build basic websites (mostly to simplify common tasks we as webdesigners do routinely).</p> <p>I got little stuck with database design / whole idea of storing content.</p> <p>1., What is mostly painful on most of websites (from my experience), are pages with quasi same layout/skelet, with different information - e.g. Title, picture, and set of information - but, making special templates / special modules in cms happens to cost more energy than edit it as a text - however, here we lose some operational potential - we can't get "only titles", because, CMS/system understands whole content as one textfield</p> <p>So, I would like to this two tables - one to hold information what structure the content has (e.g. just variable amount of photos &lt;1;500) :], title &amp; text &amp; photo (large) &amp; gallery) - HOW - and another table with all contents, modules and parts of "collections" (my working name for various structured information) - WHAT</p> <pre><code>table module_descriptors (HOW) id int structure - *???* table modules (WHAT) id int module_type - @link to module_descriptors id content - *???* </code></pre> <p>2., What I like about this is - I don't need many tables - I don't like databases with 6810 tables, one for each module, for it's description, for misc. number to text relations, ... and I also don't like tables with 60 columns, like <code>content_us</code>, <code>content_it</code>, <code>category_id</code>, <code>parent_id</code>.</p> <p>I'm thinking I could hold the structure description and content itself (noted the <strong>???</strong> ?) as either XML or CSV, but maybe I'm trying to reinvent the wheel and answer to this is hidden in some design pattern I haven't looked into.</p> <p>Hope I make any sense at all and would get some replies - give me your opinion, pros, cons... or send me to hell. Thank you</p> <p><strong>EDIT</strong>: My question is also this: Does this approach make sense? Is it edit-friendly? Isn't there something better? Is it moral? Don't do kittens die when I do this? Isn't it too much for server, If I want to read&amp;compare 30 XMLs pulled from DB (e.g. I want to compare something)? The technical part - how to do it - is just one part of question:)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload