Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why are relational databases unsuitable for unstructured data?

I've been researching NoSQL databases, and a common theme that comes up is that relational databases are unsuitable for storing unstructured data. For example:

Unfortunately, the rigidly defined, schema-based approach used by relational databases... is a poor fit for unstructured and semi-structured data [source]

I'm having a hard time understanding why this is. For example, if I wanted to store an image or some raw text in a relational database, could I not just store it as a text type (e.g. in a single column table or a key-value table)?

like image 875
user3187713 Avatar asked Jan 12 '14 17:01

user3187713


People also ask

Are relational databases good for unstructured data?

Unstructured data is information that is not arranged according to a preset data model or schema, and therefore cannot be stored in a traditional relational database or RDBMS.

Why is unstructured data not stored in relational database?

Unstructured data is not organised in a pre-defined manner or does not have a pre-defined data model, thus it is not a good fit for a mainstream relational database.

Why relational databases are not suitable for big data?

One reason for this, according to Preimesberger, is that “Relational databases are not designed for change. Data in relational databases is arranged in rows and columns, with each row representing a unique entry and each column describing unique attributes.

Is relational database structured or unstructured?

The best example of structured data is the relational database: the data has been formatted into precisely defined fields, such as credit card numbers or address, in order to be easily queried with SQL.


1 Answers

My favorite example of unstructured data which is not a good fit for a relational database is the computer hardware parts database.

Imagine you have a web shop which sells computer hardware. How would your product database look?

Every product has a name, a price and a vendor. But CPUs have a clock rate, a cache size and a # of cores, monitors have a size and resolution, RAM modules have a capacity and hard drives have also a capacity (which can not be compared to that of RAM modules).

How would you store this data in a relational database?

  • You could create a very wide table with hundreds of field for any possible attribute some product could have, but for most product most of these fields will be NULL.
  • You could have a separate table for each product category
  • You could have a huge table with the columns product, property and value which maps all the properties to the values (but what type do you use for value when some properties are numeric and others aren't?)

All three options are valid, but none of them is really satisfying.

But when you have a document-oriented database without a strict schema, it becomes a lot simpler because each entry can have any set of attributes which can have values of any type.

like image 111
Philipp Avatar answered Oct 20 '22 21:10

Philipp