Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 559747
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T12:16:13+00:00 2026-05-13T12:16:13+00:00

I’m trying to build (right now just thinking/planning/drawing relations :] ) little modular system

  • 0

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).

I got little stuck with database design / whole idea of storing content.

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

So, I would like to this two tables – one to hold information what structure the content has (e.g. just variable amount of photos <1;500) :], title & text & photo (large) & gallery) – HOW – and another table with all contents, modules and parts of “collections” (my working name for various structured information) – WHAT

table module_descriptors (HOW)  
id int  
structure - *???*  

table modules (WHAT)  
id int  
module_type - @link to module_descriptors id
content - *???*  

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 content_us, content_it, category_id, parent_id.

I’m thinking I could hold the structure description and content itself (noted the ??? ?) 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.

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

EDIT: 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&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:)

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T12:16:14+00:00Added an answer on May 13, 2026 at 12:16 pm

    The design pattern you’re hinting at is called Serialized LOB. You can store some data in the conventional way (as columns) for attributes that are the same for every entry. For attributes that are variable, format them as XML or MarkDown or whatever you want, and store it in a TEXT BLOB.

    Of course you lose the ability to use SQL expressions to query individual elements within the BLOB. Anything you need to use in searching or sorting should be in conventional columns.


    Re comment: If your text blob is in XML format, you could search it with XML functions supported by MySQL 5.1 and later. But this cannot benefit from an index, so it’s going to result in very slow searches.

    The same is true if you try to use LIKE or RLIKE with wildcards. Without using an index, searches will result in full table-scans.

    You could also try to use a MySQL FULLTEXT index, but this isn’t a good solution for searching XML data, because it won’t be able to tell the difference between text content and XML tag names and XML attributes.

    So just use conventional columns for any fields you want to search or sort by. You’ll be happier that way.


    Re question: If your documents really require variable structure, you have few choices. When used properly, SQL assumes that every row has the same structure (that is, columns). Your alternatives are:

    • Single Table Inheritance or Concrete Table Inheritance or Class Table Inheritance
    • Serialized LOB
    • Non-relational databases

    Some people resort to an antipattern called Entity-Attribute-Value (EAV) to store variable attributes, but honestly, don’t go there. For a story about how bad this can go wrong, read this article: Bad CaRMa.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

this is what i have right now Drawing an RSS feed into the php,
I have just tried to save a simple *.rtf file with some websites and
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.