NoSQL is a non-relational database designed for large-scale data storage needs. It has several key features: it is non-relational, schema-free, uses simple APIs, and is distributed. The four main types of NoSQL databases are key-value, column-oriented, document-oriented, and graph-based. Key advantages of NoSQL include scalability, flexibility in data structures, and ease of development. However, NoSQL sacrifices some consistency and lacks standardization compared to SQL databases.
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
What is NoSQL? A concise overview of non-relational databases
1. What is NoSQL?
NoSQL is a non-relational database management systems, different from traditional
relational database management systems in some significant ways. It is designed for distributed
data stores where very large scale of data storing needs (for example Google or Facebook which
collects terabits of data every day for their users).
Features of NoSQL
Non-relational
NoSQL databases never follow the relational model
Never provide tables with flat fixed-column records
Work with self-contained aggregates or BLOBs
Doesn’t require object-relational mapping and data normalization
No complex features like query languages, query planners,referential integrity joins,
ACID
Schema-free
NoSQL databases are either schema-free or have relaxed schemas
Do not require any sort of definition of the schema of the data
Offers heterogeneous structures of data in the same
2.
3. Brief History of NoSQL Databases
1998- Carlo Strozzi use the term NoSQL for his lightweight, open-source
relational database
2000- Graph database Neo4j is launched
2004- Google BigTable is launched
2005- CouchDB is launched
2007- The research paper on Amazon Dynamo is released
2008- Facebooks open sources the Cassandra project
2009- The term NoSQL was reintroduced
4. Simple API
APIs allow low-level data manipulation & selection methods
Text-based protocols mostly used with HTTP REST with JSON
Mostly used no standard based NoSQL query language
Web-enabled databases running as internet-facing services
Distributed
Multiple NoSQL databases can be executed in a distributed fashion
Offers auto-scaling and fail-over capabilities
Often ACID concept can be sacrificed for scalability and throughput
Only providing eventual consistency
Shared Nothing Architecture. This enables less coordination and higher distribution.
5. Benefits that a NoSQL database may provide:
Scalability: NoSQL was designed with scalability as a priority. NoSQL can be an
excellent choice for massive datasets that need to be distributed across multiple servers
and locations.
Flexibility: Unlike a relational database, NoSQL databases don’t require a schema. This
means that NoSQL can handle unstructured or semi-structured data in different formats.
Developer Experience: NoSQL requires less organization and thus lets developers
focus more on using the data than on figuring out how to store it.
While these are important benefits, NoSQL databases do have some drawbacks:
Data Integrity: Relational databases are typically ACID compliant, ensuring high data
integrity. NoSQL databases follow BASE principles (basic availability, soft state, and
eventual consistency) and can often sacrifice integrity for increased data distribution
and availability. However, some NoSQL databases do offer ACID compliance.
Language Standardization: While some NoSQL databases do use the Structured
Query Language (SQL), typically, each database uses its unique language to set up,
manage, and query data.
6. Types of NoSQL Databases
NoSQL Databases are mainly categorized into four types: Key-value pair, Column-oriented, Graph-
based and Document-oriented. Every category has its unique attributes and limitations. None of the
above-specified database is better to solve all the problems. Users should select the database based on
their product needs.
Types of NoSQL Databases:
Key-value Pair Based
Column-oriented Graph
Graphs based
Document-oriented
7. Key Value Pair Based
Data is stored in key/value pairs. It is designed in such a way to handle lots of data
and heavy load.
Key-value pair storage databases store data as a hash table where each key is unique,
and the value can be a JSON, BLOB(Binary Large Objects), string, etc.
For example, a key-value pair may contain a key like “Website” associated with a
value like “Guru99”.
It is one of the most basic NoSQL database example.
8. Column-based
Column-oriented databases work on columns and are based on BigTable paper
by Google. Every column is treated separately. Values of single column
databases are stored contiguously.
Column-based NoSQL databases are widely used to manage data
warehouses, business intelligence, CRM, Library card catalogs,
HBase, Cassandra, HBase, Hypertable are NoSQL query examples of column
based database.
9. Document-Oriented:
Document-Oriented NoSQL DB stores and retrieves data as a key value pair but the value part is stored as a
document. The document is stored in JSON or XML formats. The value is understood by the DB and can be queried.
The document type is mostly used for CMS systems, blogging platforms, real-time analytics & e-
commerce applications. It should not use for complex transactions which require multiple operations
or queries against varying aggregate structures.
Amazon SimpleDB, CouchDB, MongoDB, Riak, Lotus Notes, MongoDB, are popular Document
originated DBMS systems.
10. Graph-Based
A graph type database stores entities as well the relations amongst those entities. The entity is stored as
a node with the relationship as edges. An edge gives a relationship between nodes. Every node and
edge has a unique identifier.
Compared to a relational database where tables are loosely connected, a Graph database is a multi-
relational in nature. Traversing relationship is fast as they are already captured into the DB, and
there is no need to calculate them.
Graph base database mostly used for social networks, logistics, spatial data.
Neo4J, Infinite Graph, OrientDB, FlockDB are some popular graph-based databases.
11. Advantages of NoSQL
Can be used as Primary or Analytic Data Source
Big Data Capability
No Single Point of Failure
Easy Replication
No Need for Separate Caching Layer
It provides fast performance and horizontal scalability.
Can handle structured, semi-structured, and unstructured data with equal effect
Object-oriented programming which is easy to use and flexible
NoSQL databases don’t need a dedicated high-performance server
Support Key Developer Languages and Platforms
Simple to implement than using RDBMS
It can serve as the primary data source for online applications.
Handles big data which manages data velocity, variety, volume, and complexity
Excels at distributed database and multi-data center operations
Eliminates the need for a specific caching layer to store data
Offers a flexible schema design which can easily be altered without downtime or service disruption
12. Disadvantages of NoSQL
No standardization rules
Limited query capabilities
RDBMS databases and tools are comparatively mature
It does not offer any traditional database capabilities, like consistency when multiple
transactions are performed simultaneously.
When the volume of data increases it is difficult to maintain unique values as keys
become difficult
Doesn’t work as well with relational data
The learning curve is stiff for new developers
Open source options so not so popular for enterprises.
13. Key-Value Data Model in NoSQL
A key-value data model or database is also referred to as a key-value store. It is a non-relational type
of database. In this, an associative array is used as a basic database in which an individual key is
linked with just one value in a collection. For the values, keys are special identifiers. Any kind of
entity can be valued. The collection of key-value pairs stored on separate records is called key-value
databases and they do not have an already defined structure.
14. How do key-value databases work?
A number of easy strings or even a complicated entity are referred to as a value that is
associated with a key by a key-value database, which is utilized to monitor the entity.
Like in many programming paradigms, a key-value database resembles a map object or
array, or dictionary, however, which is put away in a tenacious manner and controlled
by a DBMS.
An efficient and compact structure of the index is used by the key-value store to have
the option to rapidly and dependably find value using its key. For example, Redis is a
key-value store used to tracklists, maps, heaps, and primitive types (which are simple
data structures) in a constant database. Redis can uncover a very basic point of
interaction to query and manipulate value types, just by supporting a predetermined
number of value types, and when arranged, is prepared to do high throughput.
15. When to use a key-value database:
Here are a few situations in which you can use a key-value database:-
User session attributes in an online app like finance or gaming, which is referred to as real-
time random data access.
Caching mechanism for repeatedly accessing data or key-based design.
The application is developed on queries that are based on keys.
Features:
One of the most un-complex kinds of NoSQL data models.
For storing, getting, and removing data, key-value databases utilize simple functions.
Querying language is not present in key-value databases.
Built-in redundancy makes this database more reliable.
16. Advantages:
It is very easy to use. Due to the simplicity of the database, data can accept any kind, or
even different kinds when required.
Its response time is fast due to its simplicity, given that the remaining environment near
it is very much constructed and improved.
Key-value store databases are scalable vertically as well as horizontally.
Built-in redundancy makes this database more reliable.
Disadvantages:
As querying language is not present in key-value databases, transportation of queries
from one database to a different database cannot be done.
The key-value store database is not refined. You cannot query the database without a
key.
17. Examples of key-value databases:
Here are some popular key-value databases which are widely used:
Couch base: It permits SQL-style querying and searching for text.
Amazon Dynamo DB: The key-value database which is mostly used is Amazon
DynamoDB as it is a trusted database used by a large number of users. It can easily
handle a large number of requests every day and it also provides various security
options.
Riak: It is the database used to develop applications.
Aerospike: It is an open-source and real-time database working with billions of
exchanges.
Berkeley DB: It is a high-performance and open-source database providing scalability.
18. Document Data Model:
A Document Data Model is a lot different than other data models because it stores data in
JSON, BSON, or XML documents. in this data model, we can move documents under one
document and apart from this, any particular elements can be indexed to run queries faster.
Often documents are stored and retrieved in such a way that it becomes close to the data
objects which are used in many applications which means very less translations are required
to use data in applications. JSON is a native language that is often used to store and query
data too.
So in the document data model, each document has a key-value pair below is an example for
the same.
{ "Name" : "Yashodhra",
"Address" : "Near Patel Nagar",
"Email" : "yahoo123@yahoo.com", "Contact" : "12345" }
19. Working of Document Data Model:
This is a data model which works as a semi-structured data model in which the records and data
associated with them are stored in a single document which means this data model is not completely
unstructured. The main thing is that data here is stored in a document.
Features:
Document Type Model: As we all know data is stored in documents rather than tables or graphs, so it
becomes easy to map things in many programming languages.
Flexible Schema: Overall schema is very much flexible to support this statement one must know that not
all documents in a collection need to have the same fields.
Distributed and Resilient: Document data models are very much dispersed which is the reason behind
horizontal scaling and distribution of data.
Manageable Query Language: These data models are the ones in which query language allows the
developers to perform CRUD (Create Read Update Destroy) operations on the data model.
20. Advantages:
Schema-less: These are very good in retaining existing data at massive volumes because there are absolutely no
restrictions in the format and the structure of data storage.
Faster creation of document and maintenance: It is very simple to create a document and apart from this maintenance
requires is almost nothing.
Open formats: It has a very simple build process that uses XML, JSON, and its other forms.
Built-in versioning: It has built-in versioning which means as the documents grow in size there might be a chance they
can grow in complexity. Versioning decreases conflicts.
Disadvantages:
Weak Atomicity: It lacks in supporting multi-document ACID transactions. A change in the document data
model involving two collections will require us to run two separate queries i.e. one for each collection. This is where it
breaks atomicity requirements.
Consistency Check Limitations: One can search the collections and documents that are not connected to an author
collection but doing this might create a problem in the performance of database performance.
Security: Nowadays many web applications lack security which in turn results in the leakage of sensitive data. So it
becomes a point of concern, one must pay attention to web app vulnerabilities.
21. Examples of Document Data Models :
Amazon Document DB
Mongo DB
Cosmos DB
Arango DB
Couch base Server
Couch DB
Applications of Document Data Model :
Content Management: These data models are very much used in creating various video streaming
platforms, blogs, and similar services Because each is stored as a single document and the database here
is much easier to maintain as the service evolves over time.
Book Database: These are very much useful in making book databases because as we know this data
model lets us nest.
Catalog: When it comes to storing and reading catalog files these data models are very much used
because it has a fast reading ability if incase Catalogs have thousands of attributes stored.
Analytics Platform: These data models are very much used in the Analytics Platform.