Islamic Republic of Afghanistan
Ministry of Higher Education
Badakhshan university
Computer Science Faculty
Database Department
Instructor: Moheb “”
Edits by: Safauddin “Haqani” Shamsullah “Sharafi” Shamariz”sadat” Shranbig’
NoSQL database system and MongoDB
Saturday,
September 30,
2023
1
Saturday,
September 30,
2023
2
Saturday,
September 30,
2023
3 List subjects
Why use NoSQL databases?
What kinds of NoSQL databases are there?
When is a NoSQL database the best option?
How do I choose a NoSQL database?
What is the best NoSQL database for websites?
When to use MongoDB Atlas
Conclusion
Saturday,
September 30,
2023
4
Why use NoSQL databases?
Many developers, accustomed to using RDBMS for decades, may not be aware of the
advantages that NoSQL databases bring to applications built for today's internet. These
advantages include
* Ability to easily accommodate evolving schemas and data models as applications grow
and change.
Scaling for massive amounts of data spread out across multiple data stores.
* High-speed performance for querying that associates complex and related data.
* Support for analytics operations through complex queries.
* Flexibility in deployment options — on-premise, in a private cloud, or in the public
cloud.
Saturday,
September 30,
2023
5 What kinds of NoSQL databases are there?
There are primarily four types of NoSQL databases in use today:
1. Document databases have a very flexible data model — the document — that can vary from
record to record. They store data in JSON (JavaScript Object Notation) or BSON (Binary JSON)
data formats, which provide flexibility in working with data of all types. These databases serve a
wide variety of use cases and can employ complex querying using multikey, geospatial, and full-
text search. A document database like MongoDB is deployed on a scale-out architecture, giving it
the freedom to run anywhere — on-premise or in the cloud
2. Key-value stores employ a simple schema, with data stored as a simple collection of key-value
pairs. Keys are unique, and the value associated with a key can range from simple primitives to
complex objects. Because of this simple model, key-value stores can be incredibly fast for both
reads and writes, and they are easily scalable.
3. Wide column stores capture huge volumes of data in a row-and-column format. While
they are considered NoSQL databases, their format makes them similar to relational databases.
They differ from relational databases in that every row is not required to have the same number
of columns. Wide column stores are often built to handle big data use cases that require
aggregation for queries.
4. Graph databases have a fundamentally different structure, in that data elements and their
relationships are stored as a graph (as in graph theory.), not a line graph). Complex queries can
be used to determine multiple kinds of relationships between data points and among clusters of
data points
Saturday,
September 30,
2023
6 When is a NoSQL database the best option?
NoSQL databases are best for modern applications where data models evolve and
scalability is essential.
NoSQL databases are often used in agile projects because schema changes — which
are common — don't require a lot of overhead. This allows developers to focus on
business logic and algorithms instead of dealing with schema updates. If you
anticipate that your application's data model needs to remain flexible to
accommodate changes over time, the flexible schema approach of NoSQL databases
— specifically document databases — may fit well for your needs.
Finally, scalability is a major reason to choose a NoSQL database. NoSQL databases
have been designed for easy horizontal scaling without the need for specialized
third-party components. MongoDB, for example, supports sharding out of the box.
Whether you need to support hundreds of users or hundreds of millions of users, a
NoSQL database can scale seamlessly.
Saturday,
September 30,
2023
7
How do I choose a NoSQL database?
The kind of NoSQL database that best fits your needs ultimately
centers around a few main concerns: transactions, data models,
query performance, scaling, and deployment. The following table
lists the distinctive approaches for each of these concerns or when
it would be advantageous to use a given type of NoSQL database
over another.
Saturday,
September 30,
2023
8
What is the best NoSQL database for websites?
Each NoSQL database type has its own pros and cons and your choice should depend on your
actual use cases. Yet, for most modern websites, the ideal NoSQL databases to use are the
document stores, as they support most general use cases.
A document database is particularly suited for websites thanks to its ability to support
complex data structures and parent-child relationships within a single document record.
There is no need to incorporate object-relational mappers
(ORMs) or object-document mappers (ODM) because document databases store the raw
objects in JSON/BSON or similar formats.
As the most efficient NoSQL database option for websites and API endpoints, MongoDB is
easy to get started with, and it can grow and evolve with your website. MongoDB already has
excellent integration with popular web programming languages
like Python, PHP, Node, Java, Golang, and many others. Additionally, several libraries help with
using MongoDB with various web frameworks like Laravel or Ruby on Rails
Saturday,
September 30,
2023
9
When to use MongoDB Atlas
When you decide to use MongoDB for your website or web application, it
may seem daunting to deal with setup and infrastructure. If you simply
want to focus on building your app, you can offload the infrastructure
concerns by using a DBaaS. You can let the experts at MongoDB handle
the database management while your development team focuses on what
they do best.
MongoDB Atlas is the fully-managed DBaaS offering of MongoDB. That
means you can sign up and start using a MongoDB database without
deploying and managing a cluster yourself. You can decide how to scale
and grow your cluster with a few simple clicks. MongoDB Atlas also offers
a free tier, allowing you to learn and experiment with the platform.
You can also choose which cloud provider to use for your cluster. So, if
your application already runs on Amazon AWS, Microsoft Azure, or
Google Cloud, then MongoDB Atlas can be deployed seamlessly in the
same cloud and connect securely with your application.
Saturday,
September 30,
2023
10
Conclusion
NoSQL databases have enabled us to create applications that can scale to
handle large volumes of data and a large number ofusers. They support a
wide variety of use cases across industries. However, with so many
different NoSQL databases out there, deciding which one to use is not
easy.
When choosing a database for a general purpose web application,
document databases are the ideal choice. They support a variety of data
structures without the overhead of implementing a wide column store. In
addition, they enjoy the benefits of complex querying capabilities and
simple scaling.
MongoDB Atlas allows developers to build their web applications without
managing database infrastructure, coupled with the flexibility of using
whichever programming language they prefer
Saturday,
September 30,
2023
11 ‫مأخذ‬ ‫و‬ ‫منابع‬
:
1) https://rootlan.com/nat.
2) https://www.google.com/imgres?imgurl=https.irna.ir.
3) https://nextadmin.net/ccna.
4) https://server.ir/nat.
Saturday,
September 30,
2023
12
‫توجه‬ ‫از‬ ‫تشکر‬
‫تان‬
!
‫سوال؟‬
‫؟‬ ‫پیشنهاد‬
‫انتقاد؟‬
Saturday,
September 30,
2023
13

NoSQL.pptx

  • 1.
    Islamic Republic ofAfghanistan Ministry of Higher Education Badakhshan university Computer Science Faculty Database Department Instructor: Moheb “” Edits by: Safauddin “Haqani” Shamsullah “Sharafi” Shamariz”sadat” Shranbig’ NoSQL database system and MongoDB Saturday, September 30, 2023 1
  • 2.
  • 3.
    Saturday, September 30, 2023 3 Listsubjects Why use NoSQL databases? What kinds of NoSQL databases are there? When is a NoSQL database the best option? How do I choose a NoSQL database? What is the best NoSQL database for websites? When to use MongoDB Atlas Conclusion
  • 4.
    Saturday, September 30, 2023 4 Why useNoSQL databases? Many developers, accustomed to using RDBMS for decades, may not be aware of the advantages that NoSQL databases bring to applications built for today's internet. These advantages include * Ability to easily accommodate evolving schemas and data models as applications grow and change. Scaling for massive amounts of data spread out across multiple data stores. * High-speed performance for querying that associates complex and related data. * Support for analytics operations through complex queries. * Flexibility in deployment options — on-premise, in a private cloud, or in the public cloud.
  • 5.
    Saturday, September 30, 2023 5 Whatkinds of NoSQL databases are there? There are primarily four types of NoSQL databases in use today: 1. Document databases have a very flexible data model — the document — that can vary from record to record. They store data in JSON (JavaScript Object Notation) or BSON (Binary JSON) data formats, which provide flexibility in working with data of all types. These databases serve a wide variety of use cases and can employ complex querying using multikey, geospatial, and full- text search. A document database like MongoDB is deployed on a scale-out architecture, giving it the freedom to run anywhere — on-premise or in the cloud 2. Key-value stores employ a simple schema, with data stored as a simple collection of key-value pairs. Keys are unique, and the value associated with a key can range from simple primitives to complex objects. Because of this simple model, key-value stores can be incredibly fast for both reads and writes, and they are easily scalable. 3. Wide column stores capture huge volumes of data in a row-and-column format. While they are considered NoSQL databases, their format makes them similar to relational databases. They differ from relational databases in that every row is not required to have the same number of columns. Wide column stores are often built to handle big data use cases that require aggregation for queries. 4. Graph databases have a fundamentally different structure, in that data elements and their relationships are stored as a graph (as in graph theory.), not a line graph). Complex queries can be used to determine multiple kinds of relationships between data points and among clusters of data points
  • 6.
    Saturday, September 30, 2023 6 Whenis a NoSQL database the best option? NoSQL databases are best for modern applications where data models evolve and scalability is essential. NoSQL databases are often used in agile projects because schema changes — which are common — don't require a lot of overhead. This allows developers to focus on business logic and algorithms instead of dealing with schema updates. If you anticipate that your application's data model needs to remain flexible to accommodate changes over time, the flexible schema approach of NoSQL databases — specifically document databases — may fit well for your needs. Finally, scalability is a major reason to choose a NoSQL database. NoSQL databases have been designed for easy horizontal scaling without the need for specialized third-party components. MongoDB, for example, supports sharding out of the box. Whether you need to support hundreds of users or hundreds of millions of users, a NoSQL database can scale seamlessly.
  • 7.
    Saturday, September 30, 2023 7 How doI choose a NoSQL database? The kind of NoSQL database that best fits your needs ultimately centers around a few main concerns: transactions, data models, query performance, scaling, and deployment. The following table lists the distinctive approaches for each of these concerns or when it would be advantageous to use a given type of NoSQL database over another.
  • 8.
    Saturday, September 30, 2023 8 What isthe best NoSQL database for websites? Each NoSQL database type has its own pros and cons and your choice should depend on your actual use cases. Yet, for most modern websites, the ideal NoSQL databases to use are the document stores, as they support most general use cases. A document database is particularly suited for websites thanks to its ability to support complex data structures and parent-child relationships within a single document record. There is no need to incorporate object-relational mappers (ORMs) or object-document mappers (ODM) because document databases store the raw objects in JSON/BSON or similar formats. As the most efficient NoSQL database option for websites and API endpoints, MongoDB is easy to get started with, and it can grow and evolve with your website. MongoDB already has excellent integration with popular web programming languages like Python, PHP, Node, Java, Golang, and many others. Additionally, several libraries help with using MongoDB with various web frameworks like Laravel or Ruby on Rails
  • 9.
    Saturday, September 30, 2023 9 When touse MongoDB Atlas When you decide to use MongoDB for your website or web application, it may seem daunting to deal with setup and infrastructure. If you simply want to focus on building your app, you can offload the infrastructure concerns by using a DBaaS. You can let the experts at MongoDB handle the database management while your development team focuses on what they do best. MongoDB Atlas is the fully-managed DBaaS offering of MongoDB. That means you can sign up and start using a MongoDB database without deploying and managing a cluster yourself. You can decide how to scale and grow your cluster with a few simple clicks. MongoDB Atlas also offers a free tier, allowing you to learn and experiment with the platform. You can also choose which cloud provider to use for your cluster. So, if your application already runs on Amazon AWS, Microsoft Azure, or Google Cloud, then MongoDB Atlas can be deployed seamlessly in the same cloud and connect securely with your application.
  • 10.
    Saturday, September 30, 2023 10 Conclusion NoSQL databaseshave enabled us to create applications that can scale to handle large volumes of data and a large number ofusers. They support a wide variety of use cases across industries. However, with so many different NoSQL databases out there, deciding which one to use is not easy. When choosing a database for a general purpose web application, document databases are the ideal choice. They support a variety of data structures without the overhead of implementing a wide column store. In addition, they enjoy the benefits of complex querying capabilities and simple scaling. MongoDB Atlas allows developers to build their web applications without managing database infrastructure, coupled with the flexibility of using whichever programming language they prefer
  • 11.
    Saturday, September 30, 2023 11 ‫مأخذ‬‫و‬ ‫منابع‬ : 1) https://rootlan.com/nat. 2) https://www.google.com/imgres?imgurl=https.irna.ir. 3) https://nextadmin.net/ccna. 4) https://server.ir/nat.
  • 12.
    Saturday, September 30, 2023 12 ‫توجه‬ ‫از‬‫تشکر‬ ‫تان‬ ! ‫سوال؟‬ ‫؟‬ ‫پیشنهاد‬ ‫انتقاد؟‬
  • 13.