NOSQL
NOSQL
NoSQL is the ideal choice for big data, real-time web apps, online
shopping, online gaming, Internet of things, social networks, and online
advertising applications.
Why NOSQL?
Some of the main features of the NoSQL Database are listed below:
Horizontal Scaling: NoSQL Databases can scale horizontally by
adding nodes to share loads. As the data grows the hardware can
be added and scalability features could be preserved for NoSQL.
Performance: Users can increase the performance of the NoSQL
Database by adding a different server.
Flexible Schema: NoSQL Databases do not require the same
schema as compared to SQL Databases. The document in the
same collection does not need to have the same set of fields and
data type.
High Availability: Unlike Relational Databases that use primary
and secondary nodes for fetching data. NoSQL Databases use
master place architecture.
In this Aggregate Data Models in NoSQL, the data of the aggregates are
secure and encrypted and can be decrypted with a Key.
Use Cases:
2. Document Model
The Document Data Model allows access to the parts of aggregates. In
this Aggregate Data Models in NoSQL, the data can be accessed in an
inflexible way. The Database stores and retrieves documents, which can
be XML, JSON, BSON, etc.
Use Cases:
4. Graph-Based Model
A graph database is a type of database that makes use of graph
structures for semantic queries having nodes, edges, and properties to
display and store data.
Graph databases are mainly used for storing entities and relationships
between entities. An entity is a node with its own properties. A node
can be perceived as an instance of an object in an application. Relations
are also known as edges, and they can have properties as well. Edges
have directional significance; nodes are organized by relationships
which allow you to find interesting patterns between the nodes.
These Aggregate Data Models in NoSQL are widely used for storing the
huge volumes of complex aggregates and multidimensional data having
many interconnections between them.
Use Cases:
Schema-less Databases
A well – defined schema of a database describes the tables, columns,
and data types of the values in the columns of the database.
Materialized Views
When storing data, the priority for developers and data administrators
is often focused on how the data is stored, as opposed to how it's read.
The chosen storage format is usually closely related to the format of
the data, requirements for managing data size and data integrity, and
the kind of store in use. For example, when using NoSQL document
store, the data is often represented as a series of aggregates, each
containing all of the information for that entity.
However, this can have a negative effect on queries. When a query only
needs a subset of the data from some entities, such as a summary of
orders for several customers without all of the order details, it must
extract all of the data for the relevant entities in order to obtain the
required information.
When there is a change in the source data while creating view, the view
must be updated to include the new information. This may occur
automatically on an appropriate schedule, or when the system detects
a change in the original data. In other cases, it may be necessary to
regenerate the view manually.
Distribution Models
Data Distribution NoSQL is a new type of database management
system that is fundamentally different from relational databases. This
type of database does not require table of fixed size of columns and
rows. Also this type of database totally avoids joins and support
horizontal scaling.
Sharding
Sharding involves splitting and distributing one logical data set across
multiple databases that share nothing and can be deployed across
multiple servers. To achieve sharding, the rows or columns of a larger
database table are split into multiple smaller tables.
Database sharding allows for horizontal scaling, which means more
servers can be added to the system as needed. It will enable the system
to handle more data and improve performance.
Database Replication
Database replication is the process of copying data from a database on
one server to a database on another server. We can do this for several
reasons, such as to keep a backup of the data in case the original is lost
or corrupted or to allow multiple people to access the same data from
different locations.
There are a few different ways to replicate databases, but the most
common is to use a tool like MySQL replication. This allows the data on
the original server to be copied to the new server without any manual
intervention.
Difference: