0% found this document useful (0 votes)
10 views

Non-Relational Databases (NoSQL)

Uploaded by

boitelojay
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Non-Relational Databases (NoSQL)

Uploaded by

boitelojay
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 15

Non-relational Databases (NoSQL)

N B D F 622
Recap: Relational database
•A relational database stores its data in the form of tables with related rows and columns.
•It has a very strict schema it follows, limiting its flexibility and scalability
•Data commonly accessed using a querying language such as SQL.
Non-relational (No-SQL)
Databases
•NoSQL is a type of database management system (DBMS) that is designed to handle and store
large volumes of unstructured and semi-structured data.
•NoSQL databases use flexible data models that can adapt to changes in data structures and are
capable of scaling horizontally to handle growing amounts of data.
•The term NoSQL originally referred to “non-SQL” or “non-relational” databases, but the term has
since evolved to mean “not only SQL,” as NoSQL databases have expanded to include a wide
range of different database architectures and data models.
•Four (4) common types of NoSQL databases: Key-value, document, graph, and wide-column.
Key-value database
Key-value databases use a straightforward schema: a unique
key is paired with a collection of values, where the values can
be anything from a string to a large binary object.
This database is like an RDBMS with two columns: the
attribute (key) name (such as "state") and the value (such as
"Alaska").
They are used for caching and session management and
provide high performance in reads and writes because they
tend to store things in memory.
Examples are Amazon DynamoDB and Redis.
Graph database
A graph database stores data in the form of nodes and edges.

Nodes typically store information about people, places, and things


(like nouns), while edges store information about the relationships
between the nodes.

Used for highly connected data, where the relationships or patterns


may not be very obvious initially. Use cases include fraud detection
and social networks.

A graph database is optimized to capture and search the connections


between elements, overcoming the overhead associated with JOINing
several tables in SQL.

Very few real-world business systems can survive solely on graph


databases. As a result, graph databases are usually run alongside
more traditional databases.
Column-wide
Database
A column-oriented or wide-column non-relational
database is primarily designed for analytics.
While an RDBMS stores data in rows and reads it row by
row, column-oriented databases are organized as a set of
columns.
unlike traditional SQL databases, wide-column stores are
flexible, where different rows can have different sets of
columns.
These databases can employ column compression
techniques to reduce the storage space and enhance
performance. Examples include Cassandra and Hbase
Document
Database
Document databases, also called document-oriented
databases or a document store, are used to store and
query semi-structured data.
Data is stored in a JSON-like document similar to the
data objects that developers use in application code,
making it easier to create and update applications
without referencing a primary schema.
Document databases are most commonly used for
blogging platforms, ecommerce, real-time analytics, and
content management systems.
An example is MongoDB
Comparis
on of No-
SQL
database
s
Brief history of No-SQL databases
Features
of No-
SQL
Databas
es
Example of Relational vs non-
relational database
Benefits of NoSQL

Flexible data models Horizontal scaling

Fast queries Easy for developers


MongoDB for NoSQL
MongoDB is one of the most popular NoSQL database. It is a cross-platform, object-oriented
database.
MongoDB does not store data in the table or relational format rather provide a different
mechanism for storage and retrieval of data. This is called BSON which is similar to JSON.
Features of MongoDB:
Document Oriented
Indexing
Scalability
Replication and High Availability
Aggregation
When do we use MongoDB?
Big Data
Unstable Schema
Distributed

Language Support by MongoDB: MongoDB currently provides official driver support for all
popular programming languages like C, C++, Rust, C#, Java, Node.js, Perl, PHP, Python, Ruby,
Scala, Go, and Erlang.
MongoDB for NoSQL Tutorial
MongoDB is a source-available, cross-platform, document-oriented database program.
Read through the following article for more info on MongoDB:
https://www.mongodb.com/resources/products/fundamentals/basics

For our next class, create a MongoDB account and connect your Python to it.
Create your free account here: https://www.mongodb.com/cloud/atlas/register
To connect Python to it, follow this tutorial:
https://youtu.be/3wNvKybVyaI?si=mgdeckh1uIX3zzmZ

You might also like