NoSQL DATABASE-B
NoSQL DATABASE-B
NoSQL Database is a non-relational Data Management System that does not require a fixed
schema. It avoids joins, and is easy to scale. The major purpose of using a NoSQL database is for
distributed data stores with humongous data storage needs. NoSQL is used for Big data and real-
time web apps. For example, companies like Twitter, Facebook and Google collect terabytes of
user data every single day.
While traditional RDBMS uses SQL syntax to store and retrieve structured data, NoSQL
database system encompasses a wide range of database technologies that can store structured,
semi-structured, unstructured and polymorphic data.
The concept of NoSQL databases became popular with Internet giants like Google, Facebook,
Amazon, etc. who deal with huge volumes of data. The system response time becomes slow
when RDBMS is used for massive volumes of data.
a. Non-relational- NoSQL databases never follow the relational model. It therefore means
that there are no tables with flat fixed columns & records, does not require object-
relational mapping and data normalization, no complex features like query languages,
query planners, referential integrity joins, ACID properties among others.
b. Schema- free- unlike relational databases, NoSQL databases either are schema-free or
have relaxed schemas. They don’t require any sort of definition of the schema of the data
and offer heterogeneous structures of data in the same domain
c. Simple API- NoSQL databases offers easy to use interfaces for storage and querying
data. The APIs allow low-level data manipulation & selection methods with text-based
protocols mostly used with HTTP REST with JSON. The APIs are Web-enabled to allow
the databases run as internet-facing services.
d. Distributed- Multiple NoSQL databases can be executed in a distributed fashion with the
provision for auto-scaling and fail-over capabilities. The relational ACID properties are
often sacrificed for scalability and throughput. There is no synchronous replication
between distributed nodes but rather asynchronous Multi-Master Replication, peer-to-
peer, HDFS Replication. The most important aspect is eventual consistency. The shared
Nothing Architecture enables less coordination and higher distribution.
b. Graph Databases
Examples Neo4j, GraphDB
Graph base database mostly used for social networks, logistics, spatial data among others.
c. Document oriented
Examples MongoDB, CouchDB
The document type is mostly used for CMS systems, blogging platforms, real-time
analytics & e-commerce applications. It should not be used for complex transactions
which require multiple operations or queries against varying aggregate structures.
d. Colum family
Examples Cassandra, HBase
Column-based NoSQL databases are widely used to manage data warehouses, business
intelligence, CRM, Library card catalogs among others.
1. Purpose specific
SQL databases can do much more than just storing data. They can ensure data integrity and can
be used to calculate analytics, pull data using complex joins, and quickly and efficiently retrieve
large quantities of data. They are more portable and come with well-defined and understood
standards. NoSQL databases are not general in this way. They are purpose-built to do one thing
well, meaning you will have to dedicate your NoSQL database for one use case only and would
have to create a second database for a different purpose. If you are planning to use your database
for various use cases, NoSQL is less likely to be the right candidate.
2. Small community
SQL databases have been around for about half a century, which means that there is a decent
talent pool: People with deep SQL experience are relatively easy to find. That is not the case
with NoSQL databases, which have only been around for about a decade. Furthermore, NoSQL
databases generally have specific APIs, and fewer people have deep experience with any specific
API. Finding people that can run your NoSQL setup can be a challenge.
3. Relatively large
In terms of storage utilization, NoSQL databases are fast but relatively inefficient compared to
SQL-based systems. NoSQL databases are redundant by design because they can create multiple
copies of data internally. Schema metadata gets stored in every document which also increases
space usage.
NoSQL APIs are generally not flexible and do not allow the flexibility joins can offer. They are
not as prevalent and the talent pool of professionals comfortable enough to work with these APIs
is not deep. While NoSQL databases provide a fast way to store and retrieve data, a lot of the
work of number crunching is left mostly to developer tools. Developers can make API calls like
below to fetch the data into memory first, then use tools like Python to do the number crunching
in memory and calculate results. Relating information inside the NoSQL database is hard and
generally discouraged which is a big disadvantage.