2. INTRODUCTION
• NoSQL, also referred to as “not only SQL”, “non-SQL”, is an approach to database design
that enables the storage and querying of data outside the traditional structures found
in relational databases.
• While it can still store data found within relational database management systems
systems (RDBMS), it just stores it differently compared to an RDBMS.
• The decision to use a relational database versus a non-relational database is largely
is largely contextual, and it varies depending on the use case.
3. • NoSQL is also type of distributed database, which means that information
is copied and stored on various servers, which can be remote or local. This
ensures availability and reliability of data. If some of the data goes offline,
the rest of the database can continue to run.
• Today, companies need to manage large data volumes at high speeds with
the ability to scale up quickly to run modern web applications in nearly
every industry. In this era of growth within cloud, big data, and mobile
and web applications, NoSQL databases provide that speed and scalability,
making it a popular choice for their performance and ease of use.
4. TYPES OF NOSQL DATABASE
• NoSQL provides other options for organizing data in many ways. By offering
diverse data structures, NoSQL can be applied to data analytics, managing big
data, social networks, and mobile app development.
• A NoSQL database manages information using any of these primary data
models:
• Key-value store
• Document store
• Wide-column store
• Graph store
• In-memory store
5. WHEN TO CHOOSE A NOSQL DATABASE?
• With businesses and organizations needing to innovate rapidly, being able to stay
agile and continue operating at any scale is the name of the game. NoSQL
databases offer flexible schemas and also support a variety of data models that
are ideal for building applications that require large data volumes and low latency
or response times—for example, online gaming and ecommerce web applications
6. WHEN NOT TO CHOOSE A NOSQL DATABASE?
• NoSQL databases typically rely on de-normalized data, supporting the types of
applications that use fewer tables (or containers) and whose data relationships
are not modeled using references, but rather as embedded records (or
documents). Many classic back-office business applications in finance,
accounting, and enterprise resource planning rely on highly normalized data to
prevent data anomalies as well as data duplication. These are the typically the
types of applications that are not a good fit for a NoSQL Database.
7. • Another distinction of NoSQL databases is query complexity. NoSQL databases work
phenomenally well with queries against a single table. However, as the complexity of
the queries increase, relational databases are a better choice. NoSQL database
typically do not offer complex joins, sub-queries, and nesting of queries in a WHERE
clause.
• Sometimes, though, there doesn’t need to be a choice between relational and
nonrelational databases. On many occasions, companies have opted for databases
that offer a converged model, in which they are able to employ a combination of a
relational and nonrelational data models. This hybrid approach offers increased
flexibility in handling different types of data, while also ensuring read and write
consistency without degrading performance.
8. QUIZ
• Differentiate between SQL and NoSQL
• Differentiate between unstructured and semi-structured
• In details explain the types of NoSQL.
9. ADVANTAGES OF NOSQL
• Each type of NoSQL database has strengths that make it better for specific
use cases. However, they all share the following advantages for developers
and create the framework to provide better service customers, including:
• Cost-effectiveness: It is expensive to maintain high-end, commercial RDBMS. They
require the purchase of licenses, trained database managers, and powerful hardware
to scale vertically. NoSQL databases allow you to quickly scale horizontally, better
allocating resources to minimize costs.
• Flexibility: Horizontal scaling and a flexible data model also mean NoSQL
databases can address large volumes of rapidly changing data, making them great for
agile development, quick iterations, and frequent code pushes.
10. • Replication: NoSQL replication functionality copies and stores data across multiple
servers. This replication provides data reliability, ensuring access during down time
and protecting against data loss if servers go offline.
• Speed: NoSQL enables faster, more agile storage and processing for all users, from
developers to sales teams to customers. Speed also makes NoSQL databases
generally a better fit for modern, complex web applications, e-commerce sites, or
mobile applications.
• In a nutshell, NoSQL databases provide high performance, availability,
and scalability.
11. NOSQL USE CASES
• The structure and type of NoSQL database you choose will depend on how
your organization plans to use it. Here are some specific uses for various types
of NoSQL databases.
• Managing data relationships: Managing the complex aggregation of data and the
relationships between these points is typically handled with a graph-based NoSQL
database. This includes recommendation engines, knowledge graphs, fraud detection
applications, and social networks, where connections are made between people using
various data types.
• Low-latency performance: Gaming, home fitness applications, and ad technology all
require high throughput for real-time data management. This infrastructure provides the
greatest value to the consumer, whether that’s market bidding updates or returning the
most relevant ads. Web applications require in-memory NoSQL databases to provide rapid
response time and manage spikes in usage without the lag that can comes with disk
storage.
12. • Scaling and large data volumes: E-commerce requires the ability to manage huge
spikes in usage, whether it’s for a one-day sale or the holiday shopping season. Key-
value databases are frequently used in e-commerce applications because its simple
structure is easily scaled up during times of heavy traffic. This agility is valuable to
gaming, adtech, and Internet of Things (IoT) applications.
13. NOSQL DATABASE CHALLENGES
• NoSQL databases offer a number of benefits, but that doesn’t mean they are magical. There
are several potential downsides that you should keep in mind when choosing a database for
your application.
• Data model complexity
While the flexible data model of NoSQL databases is often a selling point, it can also become a
major issue if an engineering team isn’t disciplined. It can result in issues coordinating on how the
data model should look and where data should be located. It can also result in conflicting data or
duplicate data.
• Complex transaction support
For some applications where data reliability for advanced transactions is needed, NoSQL might
not make sense. Most NoSQL databases will provide some form of simple transaction support, but
not ACID transactions. And often for NoSQL DBs that do offer ACID transactions, enabling them
will result in losing promised performance gains.
14. • Maturity
While popular relational databases like MySQL and Postgres are battle tested due to
having been around for decades, many NoSQL projects aren’t as mature. This can
result in obscure bugs, less community support, and the tool ecosystem being less
robust.
• Data consistency
Database performance follows CAP theorem, which means you can only have 2 out of
3 when it comes to Consistency, Availability, or Partition tolerance. Most NoSQL
databases sacrifice consistency to get better performance in other areas, which means
you should only use this type of database for use cases where eventual consistency is
acceptable.