Question

Explain and contrast Document-based and column-based NOSQL database systems. Give examples of a real database (don’t...

Explain and contrast Document-based and column-based NOSQL database systems. Give examples of a real database (don’t use Company example) using both MongoDB and Hbase

0 0
Add a comment Improve this question Transcribed image text
Answer #1

NoSQL, which stands for "not only SQL," is an alternative to traditional relational databases in which data is placed in tables and data schema is carefully designed before the database is built.

There are 4 basic types of NoSQL databases:

  1. Key-Value Store
  2. Document-based Store
  3. Column-based Store
  4. Graph-based

Let us now try to understand in detail Document-based and Column-based NoSQL databases.

1. Document-based Store: The data which is a collection of key-value pairs is compressed as a document store quite similar to a key-value store, but the only difference is that the values stored (referred to as “documents”) provide some structure and encoding of the managed data.

Some standard encodings are XML, JSON (Javascript Object Notation), BSON (which is a binary encoding of JSON objects), etc.

Examples of Document-based Store NoSQL databases: MongoDB, OrientDB, CouchDB, Azure's DocumentDB, AWS DynamoDB, RethinkDB.

2. Column-based Store:  In the column-oriented NoSQL database, data is stored in cells grouped in columns of data rather than as rows of data. Columns are logically grouped into column families. Column families can contain a virtually unlimited number of columns that can be created at runtime or the definition of the schema. Read and write is done using columns rather than rows.

Most relational databases (like SQL) store data in rows. By storing data in columns, data can be searched or accessed fast. Storing data in columns also gives us an advantage of data aggregation.

For instance, suppose we want to query the titles from a bunch of a million articles. It will be a tedious job to write such a query with a relational database as it will require to go over each location to get item titles. However, using a column-based store, with just one disk access, the title of all the items can be obtained.

Examples of Column-based Store NoSQL databases: Cassandra, Google's BigTable, HBase, Druid.

Comparison between Document-based and Column-based store:

  • Document-based Store allows arbitrarily complex documents that are subdocuments within subdocuments, a list with documents, etc. whereas Column-based Store allows a fixed format, for example, strict one-level or two-level dictionaries.
  • Document-based Store usually inserts whole documents (typically JSON) whereas in  Column-based Store individual columns or super columns can be addressed and updated individually that is they work at a different level of granularity.
  • The main advantage of  Document-based Store over Column-based Store is schema flexibility and nestibility.

MongoDB is a good choice for data already in JSON format. On the other hand, the read performance of HBase is quite amazing and using Phoenix on the top of HBase will allow a simple SQL syntax for accessing all the data. Therefore, in real-world situations where the following features of MongoDB and HBase need to be exploited, both MongoDB and HBase can be used.   

Add a comment
Know the answer?
Add Answer to:
Explain and contrast Document-based and column-based NOSQL database systems. Give examples of a real database (don’t...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT