NoSQL Matters!

The many forms of NoSQL databases that have evolved throughout time, such as document databases (JSON documents), key-value databases (key and value pairs), wide-column stores (tables with rows and dynamic columns), and graph databases (nodes and edges), are discussed in this article.

The following diagram depicts the types of NoSQL databases and their products.

NoSQLTypes

===============
1) Key Value DB:

===============
Each object in a key-value database comprises keys and values, with each key being unique, and the value being a JavaScript Object Notation (JSON), Binary Large Objects (BLOB), string, or other data type. Because a value can usually only be accessed by referring to its key, obtaining a given key-value pair is usually straightforward.

Sample Data:
KeyValuePair1
Assume the key is a customer or employee ID, and the value is the address of the customer or employee. We can access the address value by using the key.

Redis, Windows Azure Blob Storage, Windows Azure Table Storage, Riak are the Key-Value DB Products.

==============================
2) Column-Family / Columnar DB:
==============================
Consider the below dataset-

ProductID, ProductName, ProductSpecification, Qty, Year, Amount
2001, Hisense Smart TV, 58″, 12, 2021, 20000
2002, LG Smart TV, 42″, 12, 2021, 22500
2003, Philips TV, 42″, 12, 2021, 19200

Since the fields in each row are so important in online transaction processing, it’s reasonable to store data on disk per row, one field after the other on the same hard drive block. OLAP, on the other hand, does not require the identical row-by-row values, but rather the data in specific columns for all rows.

For example, if we need to summarize the amount per year from the aforementioned dataset, we generally need the “Amount” and “Year” columns. The rest of the information is unneeded. However, Your query would access every record in the database, including all of its fields, in order to retrieve the information from the two columns whose data you need.

Columnar databases are useful in situations where data is stored in columns rather than rows, therefore reducing the number of disk seeks and reads. Because the needed column data is kept in the same blocks, it will be accessible fast and simply.

RowBasedColumnBased

Another benefit is, most columnar databases compress similar data to reduce storage. Wide-column stores (aka. Columnar databases or Column based databases or Column family) are commonly used for storing Internet of Things data and user profile data. Cassandra and HBase are two of the most popular wide-column stores.

=============== 
3. Document DB
===============
A document database is a type of nonrelational database that stores data as JSON, BSON, or XML documents. These databases pair each key with a complex data structure known as a document. With a document database, each entity that the application tracks can be stored as a single document.  Documents can contain many different key-value pairs, or key-array pairs, or even nested documents.

DocumentDatabaseExample

Document databases allow for horizontal scaling to accommodate enormous data volumes, flexible indexing, powerful ad hoc searches, and analytics on collections of documents.

The document model is ideally suited to use cases where each document is unique and changes over time, such as catalogs, user profiles, and content management systems. For content management systems such as blogs and video platforms, a document database is an efficient choice.

Popular Document databases are Amazon SimpleDB, CouchDB, MongoDB, Riak, Lotus Notes, and MongoDB.

=============== 
4. Graph DB
===============
A graph database (GDB) is a database that represents and stores data using graph structures for semantic searches, such as nodes, edges, and attributes. The graph is a crucial notion in the system (or edge or relationship). Graph databases, in other words, are designed specifically to record and traverse relationships.

* Relationships are first-class citizens in graph databases, and they account for the majority of the database’s value. Nodes are used to store data entities, while edges are used to store relationships between things in graph databases. An edge contains a start node, an end node, a type, and a direction, and it can be used to express parent-child relationships, actions, and ownership, among other things. There is no limit to the number and kind of relationships a node can have.

GraphData

* The relationships enable data in the store to be immediately linked and, in many circumstances, retrieved in a single operation. The relationships between data are prioritized in graph databases. Because relationships are maintained in the database indefinitely, querying them is quick. Graph databases can readily show relationships, making them suitable for data that is densely interconnected.

* While the graph model specifies the relationships between data nodes explicitly, the relational model and other NoSQL database models use implicit connections to link the data.

I hope you found this post to be informative.

Please join our mailing list to receive more interesting information.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s