How do the blogging sites, Q&A sites (or any other sites host prose like content) store their data? That is, how do you store blogs and Q&A content in the database?
I hope it is not good to store this huge text data inside RDBMS table columns.
Software Engineering Stack Exchange is a question and answer site for professionals, academics, and students working within the systems development life cycle. It only takes a minute to sign up.Sign up to join this community
It's perfectly good to store huge text data inside RDBMS table columns. Provided appropriate type (CLOB, TEXT or BLOB, depending on specific database) is used. Many RDBMS even have an extension for creating full text index.
In contrast images are usually stored in filesystem, because then they can be served statically by the web server which can than often use the
sendfile(2) optimization. Since the text has to be embedded into the HTML output, no similar optimization is possible for it. The text is also not really huge.
Depends on the size and functionality of the web site. As a first step they will in fact store this information in a relational database in many cases. Though you won't use a normal index on large text fields. But it is still a very good model to keep all the relations (which answer goes to which question, which question or answer was posted by which user).
For the large text parts you will need full text search. Here you have two options. Some RDBMS have the ability to create such a type of index. Otherwise (or if you want very specific full text search abilities that your DB doesn't offer) you will copy this part of your data into some full text search engine like Solr, ElasticSearch, Sphinx (or any other, there are lots of them).
There are alternative options with NoSQL databases too of course and some may decide to use those for some advantages those may offer for their project.
Large texts stored in RDBMS aren't unusual, in fact, most Q&A and blogging sites make use of RDBMS for storing their content, normally as
Given that these examples use RDMBS, and still manage to work well, should be a testament that RDBMS are more than capable of storing large walls of text for blogs and Q&A sites. Though depending on your use case, you may refer Thorsten's answer for unstructured databases like NoSQL