SlideShare a Scribd company logo
MongoDB
DS
By Prof. D.Salehi
Outline
Difference Between SQL and NoSQL
Study of Open Source NOSQL Database
MongoDB Installation,
Basic CRUD operations,
Execution
Difference Between SQL and
NoSQL
• SQL Databases
• SQL Standard
• SQL Characteristics
• SQL Database Examples
• NoSQL Databases
• NoSQL Defintion
• General Characteristics
• NoSQL Database Types
• NoSQL Database Examples
5
August
2023
3
SQL Characteristics
Data stored in tables
Relationships represented by data
Data Manipulation Language
Data Definition Language
Transactions
Abstraction from physical layer
5
August
2023
4

Recommended for you

NoSQL.pptx
NoSQL.pptxNoSQL.pptx
NoSQL.pptx

This document provides an overview of NoSQL databases. It discusses that NoSQL databases are non-relational and do not follow the RDBMS principles. It describes some of the main types of NoSQL databases including document stores, key-value stores, column-oriented stores, and graph databases. It also discusses how NoSQL databases are designed for massive scalability and do not guarantee ACID properties, instead following a BASE model ofBasically Available, Soft state, and Eventually Consistent.

Javascript on Server-Side
Javascript on Server-SideJavascript on Server-Side
Javascript on Server-Side

Node.js and Express Typescript NoSQL and MongoDB Blocking and Non-Blocking Basic Server with Express Typescript in detail SQL vs NoSQL Mongoose

server-side javascriptnode.jsexpress.js
NoSQL in the context of Social Web
NoSQL in the context of Social WebNoSQL in the context of Social Web
NoSQL in the context of Social Web

The document discusses the rapid growth of data on the web and how NoSQL databases provide an alternative to traditional relational databases by being able to handle massive amounts of unstructured and semi-structured data across a large number of servers in a simple and scalable way. It reviews different types of NoSQL databases like key-value stores, document databases, and graph databases and provides examples of popular NoSQL databases like MongoDB, CouchDB, HBase, and Neo4j that are being used by large companies to store and query large datasets.

mongodbdynamonosql
Data Definition Language
Schema defined at the start
Create Table
Constraints to define and enforce relationships
•Primary Key
•Foreign Key
•Etc.
Triggers to respond to Insert, Update , & Delete
Stored Modules
Alter …
Drop …
Security and Access Control
5
August
2023
5
Data Manipulation Language
(DML)
Data manipulated with Select, Insert, Update, & Delete
Data Aggregation
Compound statements
Functions and Procedures
Explicit transaction control
5
August
2023
6
Transactions – ACID Properties
Atomic – All of the work in a transaction completes
(commit) or none of it completes
Consistent – A transaction transforms the database from
one consistent state to another consistent state.
Consistency is defined in terms of constraints.
Isolated – The results of any changes made during a
transaction are not visible until the transaction has
committed.
Durable – The results of a committed transaction survive
failures
5
August
2023
7
SQL Database Examples
• Commercial
• IBM DB2
• Oracle RDMS
• Microsoft SQL Server
• Sybase SQL Anywhere
• Open Source (with commercial options)
• MySQL
• Ingres
Significant portions of the
world’s economy use SQL databases!
5
August
2023
8

Recommended for you

Mongo db basics
Mongo db basicsMongo db basics
Mongo db basics

MongoDB is a document database that provides high performance, high availability, and easy scalability through embedding, indexing, replication, and sharding. It uses a dynamic schema which allows polymorphism and flexible data structures. MongoDB stores data as documents with dynamic schema in BSON format and provides CRUD operations through methods like insert(), find(), update(), and remove(). It can be deployed in standalone, replica set, or sharded cluster configurations for scaling.

mongodb
CosmosDB.pptx
CosmosDB.pptxCosmosDB.pptx
CosmosDB.pptx

Fast, distributed NoSQL and relational database at any scale. This contains many features including Partition and Indexes, Data movement, Change Feed Integration (Azure Functions and Search), Consistency Models, Replication and Multi-write, etc.,

cosmosdbreplicationnosql
Nosql part1 8th December
Nosql part1 8th December Nosql part1 8th December
Nosql part1 8th December

This document provides an introduction to NoSQL and MongoDB. It explains that NoSQL is a non-relational database designed for large volumes of unstructured data across distributed systems. It discusses the history and limitations of relational databases that led to the development of NoSQL technologies. The document also outlines different NoSQL database types, compares NoSQL to SQL databases, and provides an overview of MongoDB's features and operations."

NoSQL Definition- Fromwww.nosql-database.org
Next Generation Databases mostly addressing some of the
points:
• non-relational,
• distributed,
• open-source and
• horizontal scalable.
Often more characteristics apply as:
• schema-free,
• easy replication support,
• simple API,
• eventually consistent / BASE (not ACID),
• huge data amount, and more.
5
August
2023
9
NoSQL Products/Projects
http://www.nosql-database.org/ lists 122 NoSQL Databases
• Cassandra
• CouchDB
• Hadoop & Hbase
• MongoDB
• StupidDB
• Etc.
5
August
2023
10
NoSQL Distinguishing Characteristics
Large data volumes
• Google’s “big data”
Scalable replication and distribution
• Potentially thousands of machines
• Potentially distributed around the world
Queries need to return answers quickly
Schema-less
ACID transaction properties are not needed – BASE
CAP Theorem
Open source development
5
August
2023
11
BASE Transactions
• Acronym contrived to be the opposite of ACID
• Basically Available,
• Soft state,
• Eventually Consistent
• Characteristics
• Weak consistency – stale data OK
• Availability first
• Best effort
• Approximate answers OK
• Aggressive (optimistic)
• Simpler and faster
5
August
2023
12

Recommended for you

MongoDB
MongoDBMongoDB
MongoDB

This document discusses MongoDB and provides information on why it is useful, how it works, and best practices. Specifically, it notes that MongoDB is a noSQL database that is easy to use, scalable, and supports high performance and availability. It is well-suited for flexible schemas, embedded documents, and complex relationships. The document also covers topics like BSON, CRUD operations, indexing, map reduce, transactions, replication, and sharding in MongoDB.

mongodbreplicationnosql
Mongo presentation conf
Mongo presentation confMongo presentation conf
Mongo presentation conf

MongoDB is an open source, scalable, high-performance, document-oriented NoSQL database that uses a schema-less JSON-style document model, supports master-slave replication and horizontal sharding to scale out, and provides basic CRUD operations and rich queries on document collections. The document demonstrates MongoDB's data structures, basic CRUD operations, indexing, querying, optimization, architecture including replication and sharding, and use cases.

TechEd AU 2014: Microsoft Azure DocumentDB Deep Dive
TechEd AU 2014: Microsoft Azure DocumentDB Deep DiveTechEd AU 2014: Microsoft Azure DocumentDB Deep Dive
TechEd AU 2014: Microsoft Azure DocumentDB Deep Dive

Intergen CTO Chris Auld (Microsoft MVP, Microsoft Regional Director) goes deep into Microsoft Azure DocumentDB, the new fully managed, highly-scalable, NoSQL document database service. You will learn the basics - including a single slide that will give you the most important things you should know.

big datadatabase designnosql
Brewer’s CAP Theorem
CAP
Theorem
Consistency Availability
Partition
tolerance
5
August
2023
13
Consistency
• all nodes see the same data at the same time – Wikipedia
• client perceives that a set of operations has occurred all at
once – Pritchett
• More like Atomic in ACID transaction properties
5
August
2023
14
Availability
• node failures do not prevent survivors
from continuing to operate – Wikipedia
• Every operation must terminate in an intended response –
Pritchett
5
August
2023
15
Partition Tolerance
• the system continues to operate despite
arbitrary message loss – Wikipedia
• Operations will complete, even if individual components are
unavailable – Pritchett
5
August
2023
16

Recommended for you

MongoDB Basics
MongoDB BasicsMongoDB Basics
MongoDB Basics

MongoDB workshop given by me at MIT, Pune. This PDF has example of how to design mongodb schema as per application usage.

designmongodbpython
Cloud architectural patterns and Microsoft Azure tools
Cloud architectural patterns and Microsoft Azure toolsCloud architectural patterns and Microsoft Azure tools
Cloud architectural patterns and Microsoft Azure tools

This document discusses various cloud architectural patterns and Microsoft Azure services. It provides an overview of data management, resiliency, and messaging patterns. It then demonstrates the Materialized View pattern and how it can improve query performance. Finally, it shows examples of Azure Tables, DocumentDB, and Azure Service Bus queues for messaging between loosely coupled applications.

cloudazuremicrosoft
NOsql Presentation.pdf
NOsql Presentation.pdfNOsql Presentation.pdf
NOsql Presentation.pdf

The document provides an introduction to NoSQL databases, including key definitions and characteristics. It discusses that NoSQL databases are non-relational and do not follow RDBMS principles. It also summarizes different types of NoSQL databases like document stores, key-value stores, and column-oriented stores. Examples of popular databases for each type are also provided.

big data
Outline
Difference Between SQL and NoSQL
Study of Open Source NOSQL Database
MongoDB Installation,
Basic CRUD operations,
Execution
Open Source
Small upfront software costs
Suitable for large scale
distribution on commodity
hardware
5
August
2023
18
NoSQL Database Types
Column Store –
Each storage block
contains data from
only one column
Document Store
– stores
documents
made up of
tagged elements
Key-Value Store
– Hash table of
keys
5
August
2023
19
Other Non-SQL Databases
• XML Databases
• Graph Databases
• Codasyl Databases
• Object Oriented Databases
• Etc…
5
August
2023
20

Recommended for you

20210427 azure lille_meetup_azure_data_stack
20210427 azure lille_meetup_azure_data_stack20210427 azure lille_meetup_azure_data_stack
20210427 azure lille_meetup_azure_data_stack

Qu'elles soient, big ou small, structurées ou semi structurées, relationnelles ou pas, nous vous proposons un tour des solutions data dans Azure. Vidéo disponible ici : https://youtu.be/6D4jAcxfWCQ.

azureazure datacloud computing
Azure cosmos db, Azure no-SQL database,
Azure cosmos db, Azure no-SQL database, Azure cosmos db, Azure no-SQL database,
Azure cosmos db, Azure no-SQL database,

Microsoft Azure Cosmos DB, Azure cosmos db, azure no-sql database, azure cloud database, cloud database, cloud no-sql database.

cosmosdbazureazure cosmosdb
No sql bigdata and postgresql
No sql bigdata and postgresqlNo sql bigdata and postgresql
No sql bigdata and postgresql

What is NoSQL and BigData and how we can integrate NoSQL power into tradational RDMS like PostgreSQL.

dbmsnosqlbig data
NoSQL Example: Column Store
Each storage block contains data from only one
column
Example: Hadoop/Hbase
• http://hadoop.apache.org/
• Yahoo, Facebook
Example: Ingres VectorWise
• Column Store integrated with an SQL database
• http://www.ingres.com/products/vectorwise
5
August
2023
21
Column Store Comments
• More efficient than row (or document) store if:
• Multiple row/record/documents are inserted at the same time so
updates of column blocks can be aggregated
• Retrievals access only some of the columns in a
row/record/document
5
August
2023
22
NoSQL Examples: Key-Value Store
• Hash tables of Keys
• Values stored with Keys
• Fast access to small data values
• Example – Project-Voldemort
• http://www.project-voldemort.com/
• Linkedin
• Example – MemCacheDB
• http://memcachedb.org/
• Backend storage is Berkeley-DB
5
August
2023
23
Map Reduce
• Technique for indexing and searching large data volumes
• Two Phases, Map and Reduce
• Map
• Extract sets of Key-Value pairs from underlying data
• Potentially in Parallel on multiple machines
• Reduce
• Merge and sort sets of Key-Value pairs
• Results may be useful for other searches
5
August
2023
24

Recommended for you

Sqlite
SqliteSqlite
Sqlite

SQLLite and Java SQLite is an embedded SQL database that is not a client/server system but is instead accessed via function calls from an application. It uses a single cross-platform database file. The android.database.sqlite package provides classes for managing SQLite databases in Android applications, including methods for creating, opening, inserting, updating, deleting, and querying the database. Queries return results as a Cursor object that can be used to access data.

SQL To NoSQL - Top 6 Questions Before Making The Move
SQL To NoSQL - Top 6 Questions Before Making The MoveSQL To NoSQL - Top 6 Questions Before Making The Move
SQL To NoSQL - Top 6 Questions Before Making The Move

Learn what you need to consider when moving from the world of relational databases to a NoSQL document store. Hear from Developer Advocate Glynn Bird as he explains the key differences between relational databases and JSON document stores like Cloudant, as well as how to dodge the pitfalls of migrating from a relational database to NoSQL.

sqlibmnosql
Ardra Nakshatra (आर्द्रा): Understanding its Effects and Remedies
Ardra Nakshatra (आर्द्रा): Understanding its Effects and RemediesArdra Nakshatra (आर्द्रा): Understanding its Effects and Remedies
Ardra Nakshatra (आर्द्रा): Understanding its Effects and Remedies

Ardra Nakshatra, the sixth Nakshatra in Vedic astrology, spans from 6°40' to 20° in the Gemini zodiac sign. Governed by Rahu, the north lunar node, Ardra translates to "the moist one" or "the star of sorrow." Symbolized by a teardrop, it represents the transformational power of storms, bringing both destruction and renewal. About Astro Pathshala Astro Pathshala is a renowned astrology institute offering comprehensive astrology courses and personalized astrological consultations for over 20 years. Founded by Gurudev Sunil Vashist ji, Astro Pathshala has been a beacon of knowledge and guidance in the field of Vedic astrology. With a team of experienced astrologers, the institute provides in-depth courses that cover various aspects of astrology, including Nakshatras, planetary influences, and remedies. Whether you are a beginner seeking to learn astrology or someone looking for expert astrological advice, Astro Pathshala is dedicated to helping you navigate life's challenges and unlock your full potential through the ancient wisdom of Vedic astrology. For more information about their courses and consultations, visit Astro Pathshala.

lal kitab astrologybest astrology coursecourses of astrology
Map Reduce Patent
Google granted US Patent 7,650,331, January 2010
System and method for efficient large-scale data processing
A large-scale data processing system and method includes one or
more application-independent map modules configured to read
input data and to apply at least one application-specific map
operation to the input data to produce intermediate data values,
wherein the map operation is automatically parallelized across
multiple processors in the parallel processing environment. A
plurality of intermediate data structures are used to store the
intermediate data values. One or more application-independent
reduce modules are configured to retrieve the intermediate data
values and to apply at least one application-specific reduce
operation to the intermediate data values to provide output data.
5
August
2023
25
NoSQL Example: Document Store
Example: CouchDB
• http://couchdb.apache.org/
• BBC
Example: MongoDB
• http://www.mongodb.org/
• Foursquare, Shutterfly
JSON – JavaScript Object Notation
5
August
2023
26
CouchDB JSON Example
{
"_id": "guid goes here",
"_rev": "314159",
"type": "abstract",
"author": "Keith W. Hare"
"title": "SQL Standard and NoSQL Databases",
"body": "NoSQL databases (either no-SQL or Not Only SQL)
are currently a hot topic in some parts of
computing.",
"creation_timestamp": "2011/05/10 13:30:00 +0004"
}
5
August
2023
27
CouchDB JSON Tags
• "_id"
• GUID – Global Unique Identifier
• Passed in or generated by CouchDB
• "_rev"
• Revision number
• Versioning mechanism
• "type", "author", "title", etc.
• Arbitrary tags
• Schema-less
• Could be validated after the fact by user-written routine
5
August
2023
28

Recommended for you

The basics of sentences session 10pptx.pptx
The basics of sentences session 10pptx.pptxThe basics of sentences session 10pptx.pptx
The basics of sentences session 10pptx.pptx

Pie

"DANH SÁCH THÍ SINH XÉT TUYỂN SỚM ĐỦ ĐIỀU KIỆN TRÚNG TUYỂN ĐẠI HỌC CHÍNH QUY ...
"DANH SÁCH THÍ SINH XÉT TUYỂN SỚM ĐỦ ĐIỀU KIỆN TRÚNG TUYỂN ĐẠI HỌC CHÍNH QUY ..."DANH SÁCH THÍ SINH XÉT TUYỂN SỚM ĐỦ ĐIỀU KIỆN TRÚNG TUYỂN ĐẠI HỌC CHÍNH QUY ...
"DANH SÁCH THÍ SINH XÉT TUYỂN SỚM ĐỦ ĐIỀU KIỆN TRÚNG TUYỂN ĐẠI HỌC CHÍNH QUY ...

"DANH SÁCH THÍ SINH XÉT TUYỂN SỚM ĐỦ ĐIỀU KIỆN TRÚNG TUYỂN ĐẠI HỌC CHÍNH QUY NĂM 2024 KHỐI NGÀNH NGOÀI SƯ PHẠM"

(T.L.E.) Agriculture: Essentials of Gardening
(T.L.E.) Agriculture: Essentials of Gardening(T.L.E.) Agriculture: Essentials of Gardening
(T.L.E.) Agriculture: Essentials of Gardening

(𝐓𝐋𝐄 𝟏𝟎𝟎) (𝐋𝐞𝐬𝐬𝐨𝐧 𝟏.𝟎)-𝐅𝐢𝐧𝐚𝐥𝐬 Lesson Outcome: -Students will understand the basics of gardening, including the importance of soil, water, and sunlight for plant growth. They will learn to identify and use essential gardening tools, plant seeds, and seedlings properly, and manage common garden pests using eco-friendly methods.

tlek-12
MongoDB
What is MongoDB ?
• Scalable High-Performance Open-source,
Document-orientated database.
• Built for Speed
• Rich Document based queries for Easy readability.
• Full Index Support for High Performance.
• Replication and Failover for High Availability.
• Auto Sharding for Easy Scalability.
• Map / Reduce for Aggregation.
Why use MongoDB?
• SQL was invented in the 70’s to store data.
• MongoDB stores documents (or) objects.
• Now-a-days, everyone works with objects
(Python/Ruby/Java/etc.)
• And we need Databases to persist our objects.
Then why not store objects directly ?
• Embedded documents and arrays reduce need for
joins. No Joins and No-multi document
transactions.
What is MongoDB great for?
• RDBMS replacement for Web Applications.
• Semi-structured Content Management.
• Real-time Analytics & High-Speed Logging.
• Caching and High Scalability
Web 2.0, Media, SAAS, Gaming
HealthCare, Finance, Telecom, Government

Recommended for you

Is Email Marketing Really Effective In 2024?
Is Email Marketing Really Effective In 2024?Is Email Marketing Really Effective In 2024?
Is Email Marketing Really Effective In 2024?

Slide 1 Is Email Marketing Really Effective in 2024? Yes, Email Marketing is still a great method for direct marketing. Slide 2 In this article we will cover: - What is Email Marketing? - Pros and cons of Email Marketing. - Tools available for Email Marketing. - Ways to make Email Marketing effective. Slide 3 What Is Email Marketing? Using email to contact customers is called Email Marketing. It's a quiet and effective communication method. Mastering it can significantly boost business. In digital marketing, two long-term assets are your website and your email list. Social media apps may change, but your website and email list remain constant. Slide 4 Types of Email Marketing: 1. Welcome Emails 2. Information Emails 3. Transactional Emails 4. Newsletter Emails 5. Lead Nurturing Emails 6. Sponsorship Emails 7. Sales Letter Emails 8. Re-Engagement Emails 9. Brand Story Emails 10. Review Request Emails Slide 5 Advantages Of Email Marketing 1. Cost-Effective: Cheaper than other methods. 2. Easy: Simple to learn and use. 3. Targeted Audience: Reach your exact audience. 4. Detailed Messages: Convey clear, detailed messages. 5. Non-Disturbing: Less intrusive than social media. 6. Non-Irritating: Customers are less likely to get annoyed. 7. Long Format: Use detailed text, photos, and videos. 8. Easy to Unsubscribe: Customers can easily opt out. 9. Easy Tracking: Track delivery, open rates, and clicks. 10. Professional: Seen as more professional; customers read carefully. Slide 6 Disadvantages Of Email Marketing: 1. Irrelevant Emails: Costs can rise with irrelevant emails. 2. Poor Content: Boring emails can lead to disengagement. 3. Easy Unsubscribe: Customers can easily leave your list. Slide 7 Email Marketing Tools Choosing a good tool involves considering: 1. Deliverability: Email delivery rate. 2. Inbox Placement: Reaching inbox, not spam or promotions. 3. Ease of Use: Simplicity of use. 4. Cost: Affordability. 5. List Maintenance: Keeping the list clean. 6. Features: Regular features like Broadcast and Sequence. 7. Automation: Better with automation. Slide 8 Top 5 Email Marketing Tools: 1. ConvertKit 2. Get Response 3. Mailchimp 4. Active Campaign 5. Aweber Slide 9 Email Marketing Strategy To get good results, consider: 1. Build your own list. 2. Never buy leads. 3. Respect your customers. 4. Always provide value. 5. Don’t email just to sell. 6. Write heartfelt emails. 7. Stick to a schedule. 8. Use photos and videos. 9. Segment your list. 10. Personalize emails. 11. Ensure mobile-friendliness. 12. Optimize timing. 13. Keep designs clean. 14. Remove cold leads. Slide 10 Uses of Email Marketing: 1. Affiliate Marketing 2. Blogging 3. Customer Relationship Management (CRM) 4. Newsletter Circulation 5. Transaction Notifications 6. Information Dissemination 7. Gathering Feedback 8. Selling Courses 9. Selling Products/Services Read Full Article: https://digitalsamaaj.com/is-email-marketing-effective-in-2024/

email marketingemailconvertkit
The membership Module in the Odoo 17 ERP
The membership Module in the Odoo 17 ERPThe membership Module in the Odoo 17 ERP
The membership Module in the Odoo 17 ERP

Some business organizations give membership to their customers to ensure the long term relationship with those customers. If the customer is a member of the business then they get special offers and other benefits. The membership module in odoo 17 is helpful to manage everything related to the membership of multiple customers.

odoo 17members modulemembers in odoo 17
How to Show Sample Data in Tree and Kanban View in Odoo 17
How to Show Sample Data in Tree and Kanban View in Odoo 17How to Show Sample Data in Tree and Kanban View in Odoo 17
How to Show Sample Data in Tree and Kanban View in Odoo 17

In Odoo 17, sample data serves as a valuable resource for users seeking to familiarize themselves with the functionalities and capabilities of the software prior to integrating their own information. In this slide we are going to discuss about how to show sample data to a tree view and a kanban view.

odoo 17how to show sample datatree and kanban view
Not great for?
• Highly Transactional Applications.
• Problems requiring SQL.
Some Companies using MongoDB in Production
Schema less : Number of fields, content and size of the
document can be differ from one document to another.
No complex joins
Data is stored as JSON style
Index on any attribute
Replication and High availability
35
MongoDB Terminologies for
RDBMS concepts
RDBMS MongoDB
Database Database
Table, View Collection
Row Document (JSON, BSON)
Column Field
Index Index
Join Embedded Document
Foreign Key Reference
Partition Shard
JSON
“JavaScript Object Notation”
Easy for humans to write/read, easy for computers to
parse/generate
Objects can be nested
Built on
• name/value pairs
• Ordered list of values
http://json.org/

Recommended for you

BRIGADA ESKWELA OPENING PROGRAM KICK OFF.pptx
BRIGADA ESKWELA OPENING PROGRAM KICK OFF.pptxBRIGADA ESKWELA OPENING PROGRAM KICK OFF.pptx
BRIGADA ESKWELA OPENING PROGRAM KICK OFF.pptx

BRIGADA ESKWELA OPENING PROGRAM

brigada
Final_SD_Session3_Ferriols, Ador Dionisio, Fajardo.pptx
Final_SD_Session3_Ferriols, Ador Dionisio, Fajardo.pptxFinal_SD_Session3_Ferriols, Ador Dionisio, Fajardo.pptx
Final_SD_Session3_Ferriols, Ador Dionisio, Fajardo.pptx

MATATAG curriculum training

How to Add Colour Kanban Records in Odoo 17 Notebook
How to Add Colour Kanban Records in Odoo 17 NotebookHow to Add Colour Kanban Records in Odoo 17 Notebook
How to Add Colour Kanban Records in Odoo 17 Notebook

In Odoo 17, you can enhance the visual appearance of your Kanban view by adding color-coded records using the Notebook feature. This allows you to categorize and distinguish between different types of records based on specific criteria. By adding colors, you can quickly identify and prioritize tasks or items, improving organization and efficiency within your workflow.

odoo 17 notebookodoo 17how to add colour kanban
BSON
“Binary JSON”
Binary-encoded serialization of JSON-like docs
Embedded structure reduces need for joins
Goals
• Lightweight
• Traversable
• Efficient (decoding and encoding)
http://bsonspec.org/
BSON Example
{
"_id" : "37010"
“City" : “Nashik",
“Pin" : 423201,
"state" : “MH",
“Postman” : {
name: “Ramesh Jadhav”
address: “Panchavati”
}
}
Integer
Boolean
Double
String
Arrays
Null
Object ID
Binary data
Date
Data Types of MongoDB
• String : This is most commonly used datatype to store the data. String
in mongodb must be UTF-8 valid.
• Integer : This type is used to store a numerical value. Integer can be
32 bit or 64 bit depending upon your server.
• Boolean : This type is used to store a boolean (true/ false) value.
• Double : This type is used to store floating point values.
• Min/ Max keys : This type is used to compare a value against the
lowest and highest BSON elements.
• Arrays : This type is used to store arrays or list or multiple values into
one key.
• Timestamp : ctimestamp. This can be handy for recording when a
document has been modified or added.
• Object : This datatype is used for embedded documents.
Data Types

Recommended for you

The basics of sentences session 9pptx.pptx
The basics of sentences session 9pptx.pptxThe basics of sentences session 9pptx.pptx
The basics of sentences session 9pptx.pptx

Pie

2024 KWL Back 2 School Summer Conference
2024 KWL Back 2 School Summer Conference2024 KWL Back 2 School Summer Conference
2024 KWL Back 2 School Summer Conference

Join educators from the US and worldwide at this year’s conference, themed “Strategies for Proficiency & Acquisition,” to learn from top experts in world language teaching.

NLC English 7 Consolidation Lesson plan for teacher
NLC English 7 Consolidation Lesson plan for teacherNLC English 7 Consolidation Lesson plan for teacher
NLC English 7 Consolidation Lesson plan for teacher

NLc

• Null : This type is used to store a Null value.
• Symbol : This datatype is used identically to a string however,
it's generally reserved for languages that use a specific symbol
type.
• Date : This datatype is used to store the current date or time in
UNIX time format. You can specify your own date time by
creating object of Date and passing day, month, year into it.
• Object ID : This datatype is used to store the document’s ID.
• Binary data : This datatype is used to store binay data.
• Code : This datatype is used to store javascript code into
document.
• Regular expression : This datatype is used to store regular
expression
Data Types
Outline
Difference Between SQL and NoSQL
Study of Open Source NOSQL Database
MongoDB Installation,
Basic CRUD operations,
Execution
enter the following commands in the
Command Prompt or Powershell:
wmic os get caption
wmic os get osarchitecture
Find version of Windows
Installation in Windows
• Download MongoDB from Website:
https://www.mongodb.org/downloads
• Select option
Windows
• Download and Run

Recommended for you

Principles of Roods Approach!!!!!!!.pptx
Principles of Roods Approach!!!!!!!.pptxPrinciples of Roods Approach!!!!!!!.pptx
Principles of Roods Approach!!!!!!!.pptx

Principles of Rood’s Approach Treatment technique used in physiotherapy for neurological patients which aids them to recover and improve quality of life Facilitatory techniques Inhibitory techniques

#physiotherapy##roodsapproach##neurophysiotherapy#
Righteous among Nations - eTwinning e-book (1).pdf
Righteous among Nations - eTwinning e-book (1).pdfRighteous among Nations - eTwinning e-book (1).pdf
Righteous among Nations - eTwinning e-book (1).pdf

edu

Delegation Inheritance in Odoo 17 and Its Use Cases
Delegation Inheritance in Odoo 17 and Its Use CasesDelegation Inheritance in Odoo 17 and Its Use Cases
Delegation Inheritance in Odoo 17 and Its Use Cases

There are 3 types of inheritance in odoo Classical, Extension, and Delegation. Delegation inheritance is used to sink other models to our custom model. And there is no change in the views. This slide will discuss delegation inheritance and its use cases in odoo 17.

inheritance in odooodoo 17inheritance in odoo 17
Create one folder (eg SNJB) in bin folder of MongoDB
Goto command prompt
Goto bin dir of MongoDB and write following command
mongod --storageEngine=mmapv1 --dbpath SNJB
(Server will started and listen at 27017 port)
Open another command prompt and give command mongo
(Client will be started)
Starting MongoDB in Windows
Installation in Ubuntu
• Download MongoDB from Website:
https://www.mongodb.org/downloads
• Select option
Linux
• Download and Run
Starting MongoDB in Ubuntu
Create a folder in bin directory of mongodb
Open terminal
Goto mongodb bin folder (cd mongo….)
Type ./mongod (Server is started)
Open another terminal
Goto mongodb bin folder (cd mongo….)
Type ./mongo (client will be started)
Run all commands on client terminal
Outline
Difference Between SQL and NoSQL
Study of Open Source NOSQL Database
MongoDB Installation,
Basic CRUD operations,
Execution

Recommended for you

How to Install Theme in the Odoo 17 ERP
How to  Install Theme in the Odoo 17 ERPHow to  Install Theme in the Odoo 17 ERP
How to Install Theme in the Odoo 17 ERP

With Odoo, we can select from a wide selection of attractive themes. Many excellent ones are free to use, while some require payment. Putting an Odoo theme in the Odoo module directory on our server, downloading the theme, and then installing it is a simple process.

odoo 17theme in odoohow to install theme in odoo
Split Shifts From Gantt View in the Odoo 17
Split Shifts From Gantt View in the  Odoo 17Split Shifts From Gantt View in the  Odoo 17
Split Shifts From Gantt View in the Odoo 17

Odoo allows users to split long shifts into multiple segments directly from the Gantt view.Each segment retains details of the original shift, such as employee assignment, start time, end time, and specific tasks or descriptions.

gantt viewodoo 17gantt view in odoo
Credit limit improvement system in odoo 17
Credit limit improvement system in odoo 17Credit limit improvement system in odoo 17
Credit limit improvement system in odoo 17

In Odoo 17, confirmed and uninvoiced sales orders are now factored into a partner's total receivables. As a result, the credit limit warning system now considers this updated calculation, leading to more accurate and effective credit management.

credit limit improvementodoo 17odoo erp
Database
collection
Basic Database Operations
• switched to database provided with
ciommand
use <database
name>
• To check currently selected
database use the command db
db
• Displays the list of databases
show dbs
• To Drop the database
db.dropDatabase
()
Basic Database Operations- Database
• To create collection
db.createCollection (name)
Ex:- db.createCollection(Stud)
• List out all names of collection in current
database
>show collections
• In mongodb you don't need to
create collection. MongoDB
creates collection automatically,
when you insert some document.
db.databasename.insert
({Key : Value})
Ex:- db.Stud.insert({{Name:”Jiya”})
• MongoDB's db.collection.drop() is used to
drop a collection from the database.
db.collection.drop()
Example:- db.Stud.drop()
Basic DatabaseOperations-Collection
Insert
Find
Update
Delete
CRUD Operations

Recommended for you

The Jewish Trinity : Sabbath,Shekinah and Sanctuary 4.pdf
The Jewish Trinity : Sabbath,Shekinah and Sanctuary 4.pdfThe Jewish Trinity : Sabbath,Shekinah and Sanctuary 4.pdf
The Jewish Trinity : Sabbath,Shekinah and Sanctuary 4.pdf

we may assume that God created the cosmos to be his great temple, in which he rested after his creative work. Nevertheless, his special revelatory presence did not fill the entire earth yet, since it was his intention that his human vice-regent, whom he installed in the garden sanctuary, would extend worldwide the boundaries of that sanctuary and of God’s presence. Adam, of course, disobeyed this mandate, so that humanity no longer enjoyed God’s presence in the little localized garden. Consequently, the entire earth became infected with sin and idolatry in a way it had not been previously before the fall, while yet in its still imperfect newly created state. Therefore, the various expressions about God being unable to inhabit earthly structures are best understood, at least in part, by realizing that the old order and sanctuary have been tainted with sin and must be cleansed and recreated before God’s Shekinah presence, formerly limited to heaven and the holy of holies, can dwell universally throughout creation

shekinah sanctuary sabbath
References
• https://docs.mongodb.com/manual/introduction/
• http://metadata-standards.org/Document-library/Documents-
by-number/WG2-N1501-
N1550/WG2_N1537_SQL_Standard_and_NoSQL_Databases%
202011-05.ppt
• https://www.slideshare.net/raviteja2007/introduction-to-
mongodb-12246792
• https://docs.mongodb.com/manual/core/databases-and-
collections/
• https://docs.mongodb.com/manual/crud/

More Related Content

Similar to mongodb_DS.pptx

Non-Relational Databases at ACCU2011
Non-Relational Databases at ACCU2011Non-Relational Databases at ACCU2011
Non-Relational Databases at ACCU2011
Gavin Heavyside
 
Migrating to postgresql
Migrating to postgresqlMigrating to postgresql
Migrating to postgresql
botsplash.com
 
NoSQL for SQL Users
NoSQL for SQL UsersNoSQL for SQL Users
NoSQL for SQL Users
IBM Cloud Data Services
 
NoSQL.pptx
NoSQL.pptxNoSQL.pptx
NoSQL.pptx
RithikRaj25
 
Javascript on Server-Side
Javascript on Server-SideJavascript on Server-Side
Javascript on Server-Side
ASIMYILDIZ
 
NoSQL in the context of Social Web
NoSQL in the context of Social WebNoSQL in the context of Social Web
NoSQL in the context of Social Web
Bogdan Gaza
 
Mongo db basics
Mongo db basicsMongo db basics
Mongo db basics
Claudio Montoya
 
CosmosDB.pptx
CosmosDB.pptxCosmosDB.pptx
CosmosDB.pptx
Udaiappa Ramachandran
 
Nosql part1 8th December
Nosql part1 8th December Nosql part1 8th December
Nosql part1 8th December
Ruru Chowdhury
 
MongoDB
MongoDBMongoDB
Mongo presentation conf
Mongo presentation confMongo presentation conf
Mongo presentation conf
Shridhar Joshi
 
TechEd AU 2014: Microsoft Azure DocumentDB Deep Dive
TechEd AU 2014: Microsoft Azure DocumentDB Deep DiveTechEd AU 2014: Microsoft Azure DocumentDB Deep Dive
TechEd AU 2014: Microsoft Azure DocumentDB Deep Dive
Intergen
 
MongoDB Basics
MongoDB BasicsMongoDB Basics
MongoDB Basics
Sarang Shravagi
 
Cloud architectural patterns and Microsoft Azure tools
Cloud architectural patterns and Microsoft Azure toolsCloud architectural patterns and Microsoft Azure tools
Cloud architectural patterns and Microsoft Azure tools
Pushkar Chivate
 
NOsql Presentation.pdf
NOsql Presentation.pdfNOsql Presentation.pdf
NOsql Presentation.pdf
AkshayDwivedi31
 
20210427 azure lille_meetup_azure_data_stack
20210427 azure lille_meetup_azure_data_stack20210427 azure lille_meetup_azure_data_stack
20210427 azure lille_meetup_azure_data_stack
Alexandre BERGERE
 
Azure cosmos db, Azure no-SQL database,
Azure cosmos db, Azure no-SQL database, Azure cosmos db, Azure no-SQL database,
Azure cosmos db, Azure no-SQL database,
BRIJESH KUMAR
 
No sql bigdata and postgresql
No sql bigdata and postgresqlNo sql bigdata and postgresql
No sql bigdata and postgresql
Zaid Shabbir
 
Sqlite
SqliteSqlite
Sqlite
Kumar
 
SQL To NoSQL - Top 6 Questions Before Making The Move
SQL To NoSQL - Top 6 Questions Before Making The MoveSQL To NoSQL - Top 6 Questions Before Making The Move
SQL To NoSQL - Top 6 Questions Before Making The Move
IBM Cloud Data Services
 

Similar to mongodb_DS.pptx (20)

Non-Relational Databases at ACCU2011
Non-Relational Databases at ACCU2011Non-Relational Databases at ACCU2011
Non-Relational Databases at ACCU2011
 
Migrating to postgresql
Migrating to postgresqlMigrating to postgresql
Migrating to postgresql
 
NoSQL for SQL Users
NoSQL for SQL UsersNoSQL for SQL Users
NoSQL for SQL Users
 
NoSQL.pptx
NoSQL.pptxNoSQL.pptx
NoSQL.pptx
 
Javascript on Server-Side
Javascript on Server-SideJavascript on Server-Side
Javascript on Server-Side
 
NoSQL in the context of Social Web
NoSQL in the context of Social WebNoSQL in the context of Social Web
NoSQL in the context of Social Web
 
Mongo db basics
Mongo db basicsMongo db basics
Mongo db basics
 
CosmosDB.pptx
CosmosDB.pptxCosmosDB.pptx
CosmosDB.pptx
 
Nosql part1 8th December
Nosql part1 8th December Nosql part1 8th December
Nosql part1 8th December
 
MongoDB
MongoDBMongoDB
MongoDB
 
Mongo presentation conf
Mongo presentation confMongo presentation conf
Mongo presentation conf
 
TechEd AU 2014: Microsoft Azure DocumentDB Deep Dive
TechEd AU 2014: Microsoft Azure DocumentDB Deep DiveTechEd AU 2014: Microsoft Azure DocumentDB Deep Dive
TechEd AU 2014: Microsoft Azure DocumentDB Deep Dive
 
MongoDB Basics
MongoDB BasicsMongoDB Basics
MongoDB Basics
 
Cloud architectural patterns and Microsoft Azure tools
Cloud architectural patterns and Microsoft Azure toolsCloud architectural patterns and Microsoft Azure tools
Cloud architectural patterns and Microsoft Azure tools
 
NOsql Presentation.pdf
NOsql Presentation.pdfNOsql Presentation.pdf
NOsql Presentation.pdf
 
20210427 azure lille_meetup_azure_data_stack
20210427 azure lille_meetup_azure_data_stack20210427 azure lille_meetup_azure_data_stack
20210427 azure lille_meetup_azure_data_stack
 
Azure cosmos db, Azure no-SQL database,
Azure cosmos db, Azure no-SQL database, Azure cosmos db, Azure no-SQL database,
Azure cosmos db, Azure no-SQL database,
 
No sql bigdata and postgresql
No sql bigdata and postgresqlNo sql bigdata and postgresql
No sql bigdata and postgresql
 
Sqlite
SqliteSqlite
Sqlite
 
SQL To NoSQL - Top 6 Questions Before Making The Move
SQL To NoSQL - Top 6 Questions Before Making The MoveSQL To NoSQL - Top 6 Questions Before Making The Move
SQL To NoSQL - Top 6 Questions Before Making The Move
 

Recently uploaded

Ardra Nakshatra (आर्द्रा): Understanding its Effects and Remedies
Ardra Nakshatra (आर्द्रा): Understanding its Effects and RemediesArdra Nakshatra (आर्द्रा): Understanding its Effects and Remedies
Ardra Nakshatra (आर्द्रा): Understanding its Effects and Remedies
Astro Pathshala
 
The basics of sentences session 10pptx.pptx
The basics of sentences session 10pptx.pptxThe basics of sentences session 10pptx.pptx
The basics of sentences session 10pptx.pptx
heathfieldcps1
 
"DANH SÁCH THÍ SINH XÉT TUYỂN SỚM ĐỦ ĐIỀU KIỆN TRÚNG TUYỂN ĐẠI HỌC CHÍNH QUY ...
"DANH SÁCH THÍ SINH XÉT TUYỂN SỚM ĐỦ ĐIỀU KIỆN TRÚNG TUYỂN ĐẠI HỌC CHÍNH QUY ..."DANH SÁCH THÍ SINH XÉT TUYỂN SỚM ĐỦ ĐIỀU KIỆN TRÚNG TUYỂN ĐẠI HỌC CHÍNH QUY ...
"DANH SÁCH THÍ SINH XÉT TUYỂN SỚM ĐỦ ĐIỀU KIỆN TRÚNG TUYỂN ĐẠI HỌC CHÍNH QUY ...
thanhluan21
 
(T.L.E.) Agriculture: Essentials of Gardening
(T.L.E.) Agriculture: Essentials of Gardening(T.L.E.) Agriculture: Essentials of Gardening
(T.L.E.) Agriculture: Essentials of Gardening
MJDuyan
 
Is Email Marketing Really Effective In 2024?
Is Email Marketing Really Effective In 2024?Is Email Marketing Really Effective In 2024?
Is Email Marketing Really Effective In 2024?
Rakesh Jalan
 
The membership Module in the Odoo 17 ERP
The membership Module in the Odoo 17 ERPThe membership Module in the Odoo 17 ERP
The membership Module in the Odoo 17 ERP
Celine George
 
How to Show Sample Data in Tree and Kanban View in Odoo 17
How to Show Sample Data in Tree and Kanban View in Odoo 17How to Show Sample Data in Tree and Kanban View in Odoo 17
How to Show Sample Data in Tree and Kanban View in Odoo 17
Celine George
 
BRIGADA ESKWELA OPENING PROGRAM KICK OFF.pptx
BRIGADA ESKWELA OPENING PROGRAM KICK OFF.pptxBRIGADA ESKWELA OPENING PROGRAM KICK OFF.pptx
BRIGADA ESKWELA OPENING PROGRAM KICK OFF.pptx
kambal1234567890
 
Final_SD_Session3_Ferriols, Ador Dionisio, Fajardo.pptx
Final_SD_Session3_Ferriols, Ador Dionisio, Fajardo.pptxFinal_SD_Session3_Ferriols, Ador Dionisio, Fajardo.pptx
Final_SD_Session3_Ferriols, Ador Dionisio, Fajardo.pptx
shimeathdelrosario1
 
How to Add Colour Kanban Records in Odoo 17 Notebook
How to Add Colour Kanban Records in Odoo 17 NotebookHow to Add Colour Kanban Records in Odoo 17 Notebook
How to Add Colour Kanban Records in Odoo 17 Notebook
Celine George
 
The basics of sentences session 9pptx.pptx
The basics of sentences session 9pptx.pptxThe basics of sentences session 9pptx.pptx
The basics of sentences session 9pptx.pptx
heathfieldcps1
 
2024 KWL Back 2 School Summer Conference
2024 KWL Back 2 School Summer Conference2024 KWL Back 2 School Summer Conference
2024 KWL Back 2 School Summer Conference
KlettWorldLanguages
 
NLC English 7 Consolidation Lesson plan for teacher
NLC English 7 Consolidation Lesson plan for teacherNLC English 7 Consolidation Lesson plan for teacher
NLC English 7 Consolidation Lesson plan for teacher
AngelicaLubrica
 
Principles of Roods Approach!!!!!!!.pptx
Principles of Roods Approach!!!!!!!.pptxPrinciples of Roods Approach!!!!!!!.pptx
Principles of Roods Approach!!!!!!!.pptx
ibtesaam huma
 
Righteous among Nations - eTwinning e-book (1).pdf
Righteous among Nations - eTwinning e-book (1).pdfRighteous among Nations - eTwinning e-book (1).pdf
Righteous among Nations - eTwinning e-book (1).pdf
Zuzana Mészárosová
 
Delegation Inheritance in Odoo 17 and Its Use Cases
Delegation Inheritance in Odoo 17 and Its Use CasesDelegation Inheritance in Odoo 17 and Its Use Cases
Delegation Inheritance in Odoo 17 and Its Use Cases
Celine George
 
How to Install Theme in the Odoo 17 ERP
How to  Install Theme in the Odoo 17 ERPHow to  Install Theme in the Odoo 17 ERP
How to Install Theme in the Odoo 17 ERP
Celine George
 
Split Shifts From Gantt View in the Odoo 17
Split Shifts From Gantt View in the  Odoo 17Split Shifts From Gantt View in the  Odoo 17
Split Shifts From Gantt View in the Odoo 17
Celine George
 
Credit limit improvement system in odoo 17
Credit limit improvement system in odoo 17Credit limit improvement system in odoo 17
Credit limit improvement system in odoo 17
Celine George
 
The Jewish Trinity : Sabbath,Shekinah and Sanctuary 4.pdf
The Jewish Trinity : Sabbath,Shekinah and Sanctuary 4.pdfThe Jewish Trinity : Sabbath,Shekinah and Sanctuary 4.pdf
The Jewish Trinity : Sabbath,Shekinah and Sanctuary 4.pdf
JackieSparrow3
 

Recently uploaded (20)

Ardra Nakshatra (आर्द्रा): Understanding its Effects and Remedies
Ardra Nakshatra (आर्द्रा): Understanding its Effects and RemediesArdra Nakshatra (आर्द्रा): Understanding its Effects and Remedies
Ardra Nakshatra (आर्द्रा): Understanding its Effects and Remedies
 
The basics of sentences session 10pptx.pptx
The basics of sentences session 10pptx.pptxThe basics of sentences session 10pptx.pptx
The basics of sentences session 10pptx.pptx
 
"DANH SÁCH THÍ SINH XÉT TUYỂN SỚM ĐỦ ĐIỀU KIỆN TRÚNG TUYỂN ĐẠI HỌC CHÍNH QUY ...
"DANH SÁCH THÍ SINH XÉT TUYỂN SỚM ĐỦ ĐIỀU KIỆN TRÚNG TUYỂN ĐẠI HỌC CHÍNH QUY ..."DANH SÁCH THÍ SINH XÉT TUYỂN SỚM ĐỦ ĐIỀU KIỆN TRÚNG TUYỂN ĐẠI HỌC CHÍNH QUY ...
"DANH SÁCH THÍ SINH XÉT TUYỂN SỚM ĐỦ ĐIỀU KIỆN TRÚNG TUYỂN ĐẠI HỌC CHÍNH QUY ...
 
(T.L.E.) Agriculture: Essentials of Gardening
(T.L.E.) Agriculture: Essentials of Gardening(T.L.E.) Agriculture: Essentials of Gardening
(T.L.E.) Agriculture: Essentials of Gardening
 
Is Email Marketing Really Effective In 2024?
Is Email Marketing Really Effective In 2024?Is Email Marketing Really Effective In 2024?
Is Email Marketing Really Effective In 2024?
 
The membership Module in the Odoo 17 ERP
The membership Module in the Odoo 17 ERPThe membership Module in the Odoo 17 ERP
The membership Module in the Odoo 17 ERP
 
How to Show Sample Data in Tree and Kanban View in Odoo 17
How to Show Sample Data in Tree and Kanban View in Odoo 17How to Show Sample Data in Tree and Kanban View in Odoo 17
How to Show Sample Data in Tree and Kanban View in Odoo 17
 
BRIGADA ESKWELA OPENING PROGRAM KICK OFF.pptx
BRIGADA ESKWELA OPENING PROGRAM KICK OFF.pptxBRIGADA ESKWELA OPENING PROGRAM KICK OFF.pptx
BRIGADA ESKWELA OPENING PROGRAM KICK OFF.pptx
 
Final_SD_Session3_Ferriols, Ador Dionisio, Fajardo.pptx
Final_SD_Session3_Ferriols, Ador Dionisio, Fajardo.pptxFinal_SD_Session3_Ferriols, Ador Dionisio, Fajardo.pptx
Final_SD_Session3_Ferriols, Ador Dionisio, Fajardo.pptx
 
How to Add Colour Kanban Records in Odoo 17 Notebook
How to Add Colour Kanban Records in Odoo 17 NotebookHow to Add Colour Kanban Records in Odoo 17 Notebook
How to Add Colour Kanban Records in Odoo 17 Notebook
 
The basics of sentences session 9pptx.pptx
The basics of sentences session 9pptx.pptxThe basics of sentences session 9pptx.pptx
The basics of sentences session 9pptx.pptx
 
2024 KWL Back 2 School Summer Conference
2024 KWL Back 2 School Summer Conference2024 KWL Back 2 School Summer Conference
2024 KWL Back 2 School Summer Conference
 
NLC English 7 Consolidation Lesson plan for teacher
NLC English 7 Consolidation Lesson plan for teacherNLC English 7 Consolidation Lesson plan for teacher
NLC English 7 Consolidation Lesson plan for teacher
 
Principles of Roods Approach!!!!!!!.pptx
Principles of Roods Approach!!!!!!!.pptxPrinciples of Roods Approach!!!!!!!.pptx
Principles of Roods Approach!!!!!!!.pptx
 
Righteous among Nations - eTwinning e-book (1).pdf
Righteous among Nations - eTwinning e-book (1).pdfRighteous among Nations - eTwinning e-book (1).pdf
Righteous among Nations - eTwinning e-book (1).pdf
 
Delegation Inheritance in Odoo 17 and Its Use Cases
Delegation Inheritance in Odoo 17 and Its Use CasesDelegation Inheritance in Odoo 17 and Its Use Cases
Delegation Inheritance in Odoo 17 and Its Use Cases
 
How to Install Theme in the Odoo 17 ERP
How to  Install Theme in the Odoo 17 ERPHow to  Install Theme in the Odoo 17 ERP
How to Install Theme in the Odoo 17 ERP
 
Split Shifts From Gantt View in the Odoo 17
Split Shifts From Gantt View in the  Odoo 17Split Shifts From Gantt View in the  Odoo 17
Split Shifts From Gantt View in the Odoo 17
 
Credit limit improvement system in odoo 17
Credit limit improvement system in odoo 17Credit limit improvement system in odoo 17
Credit limit improvement system in odoo 17
 
The Jewish Trinity : Sabbath,Shekinah and Sanctuary 4.pdf
The Jewish Trinity : Sabbath,Shekinah and Sanctuary 4.pdfThe Jewish Trinity : Sabbath,Shekinah and Sanctuary 4.pdf
The Jewish Trinity : Sabbath,Shekinah and Sanctuary 4.pdf
 

mongodb_DS.pptx

  • 2. Outline Difference Between SQL and NoSQL Study of Open Source NOSQL Database MongoDB Installation, Basic CRUD operations, Execution
  • 3. Difference Between SQL and NoSQL • SQL Databases • SQL Standard • SQL Characteristics • SQL Database Examples • NoSQL Databases • NoSQL Defintion • General Characteristics • NoSQL Database Types • NoSQL Database Examples 5 August 2023 3
  • 4. SQL Characteristics Data stored in tables Relationships represented by data Data Manipulation Language Data Definition Language Transactions Abstraction from physical layer 5 August 2023 4
  • 5. Data Definition Language Schema defined at the start Create Table Constraints to define and enforce relationships •Primary Key •Foreign Key •Etc. Triggers to respond to Insert, Update , & Delete Stored Modules Alter … Drop … Security and Access Control 5 August 2023 5
  • 6. Data Manipulation Language (DML) Data manipulated with Select, Insert, Update, & Delete Data Aggregation Compound statements Functions and Procedures Explicit transaction control 5 August 2023 6
  • 7. Transactions – ACID Properties Atomic – All of the work in a transaction completes (commit) or none of it completes Consistent – A transaction transforms the database from one consistent state to another consistent state. Consistency is defined in terms of constraints. Isolated – The results of any changes made during a transaction are not visible until the transaction has committed. Durable – The results of a committed transaction survive failures 5 August 2023 7
  • 8. SQL Database Examples • Commercial • IBM DB2 • Oracle RDMS • Microsoft SQL Server • Sybase SQL Anywhere • Open Source (with commercial options) • MySQL • Ingres Significant portions of the world’s economy use SQL databases! 5 August 2023 8
  • 9. NoSQL Definition- Fromwww.nosql-database.org Next Generation Databases mostly addressing some of the points: • non-relational, • distributed, • open-source and • horizontal scalable. Often more characteristics apply as: • schema-free, • easy replication support, • simple API, • eventually consistent / BASE (not ACID), • huge data amount, and more. 5 August 2023 9
  • 10. NoSQL Products/Projects http://www.nosql-database.org/ lists 122 NoSQL Databases • Cassandra • CouchDB • Hadoop & Hbase • MongoDB • StupidDB • Etc. 5 August 2023 10
  • 11. NoSQL Distinguishing Characteristics Large data volumes • Google’s “big data” Scalable replication and distribution • Potentially thousands of machines • Potentially distributed around the world Queries need to return answers quickly Schema-less ACID transaction properties are not needed – BASE CAP Theorem Open source development 5 August 2023 11
  • 12. BASE Transactions • Acronym contrived to be the opposite of ACID • Basically Available, • Soft state, • Eventually Consistent • Characteristics • Weak consistency – stale data OK • Availability first • Best effort • Approximate answers OK • Aggressive (optimistic) • Simpler and faster 5 August 2023 12
  • 13. Brewer’s CAP Theorem CAP Theorem Consistency Availability Partition tolerance 5 August 2023 13
  • 14. Consistency • all nodes see the same data at the same time – Wikipedia • client perceives that a set of operations has occurred all at once – Pritchett • More like Atomic in ACID transaction properties 5 August 2023 14
  • 15. Availability • node failures do not prevent survivors from continuing to operate – Wikipedia • Every operation must terminate in an intended response – Pritchett 5 August 2023 15
  • 16. Partition Tolerance • the system continues to operate despite arbitrary message loss – Wikipedia • Operations will complete, even if individual components are unavailable – Pritchett 5 August 2023 16
  • 17. Outline Difference Between SQL and NoSQL Study of Open Source NOSQL Database MongoDB Installation, Basic CRUD operations, Execution
  • 18. Open Source Small upfront software costs Suitable for large scale distribution on commodity hardware 5 August 2023 18
  • 19. NoSQL Database Types Column Store – Each storage block contains data from only one column Document Store – stores documents made up of tagged elements Key-Value Store – Hash table of keys 5 August 2023 19
  • 20. Other Non-SQL Databases • XML Databases • Graph Databases • Codasyl Databases • Object Oriented Databases • Etc… 5 August 2023 20
  • 21. NoSQL Example: Column Store Each storage block contains data from only one column Example: Hadoop/Hbase • http://hadoop.apache.org/ • Yahoo, Facebook Example: Ingres VectorWise • Column Store integrated with an SQL database • http://www.ingres.com/products/vectorwise 5 August 2023 21
  • 22. Column Store Comments • More efficient than row (or document) store if: • Multiple row/record/documents are inserted at the same time so updates of column blocks can be aggregated • Retrievals access only some of the columns in a row/record/document 5 August 2023 22
  • 23. NoSQL Examples: Key-Value Store • Hash tables of Keys • Values stored with Keys • Fast access to small data values • Example – Project-Voldemort • http://www.project-voldemort.com/ • Linkedin • Example – MemCacheDB • http://memcachedb.org/ • Backend storage is Berkeley-DB 5 August 2023 23
  • 24. Map Reduce • Technique for indexing and searching large data volumes • Two Phases, Map and Reduce • Map • Extract sets of Key-Value pairs from underlying data • Potentially in Parallel on multiple machines • Reduce • Merge and sort sets of Key-Value pairs • Results may be useful for other searches 5 August 2023 24
  • 25. Map Reduce Patent Google granted US Patent 7,650,331, January 2010 System and method for efficient large-scale data processing A large-scale data processing system and method includes one or more application-independent map modules configured to read input data and to apply at least one application-specific map operation to the input data to produce intermediate data values, wherein the map operation is automatically parallelized across multiple processors in the parallel processing environment. A plurality of intermediate data structures are used to store the intermediate data values. One or more application-independent reduce modules are configured to retrieve the intermediate data values and to apply at least one application-specific reduce operation to the intermediate data values to provide output data. 5 August 2023 25
  • 26. NoSQL Example: Document Store Example: CouchDB • http://couchdb.apache.org/ • BBC Example: MongoDB • http://www.mongodb.org/ • Foursquare, Shutterfly JSON – JavaScript Object Notation 5 August 2023 26
  • 27. CouchDB JSON Example { "_id": "guid goes here", "_rev": "314159", "type": "abstract", "author": "Keith W. Hare" "title": "SQL Standard and NoSQL Databases", "body": "NoSQL databases (either no-SQL or Not Only SQL) are currently a hot topic in some parts of computing.", "creation_timestamp": "2011/05/10 13:30:00 +0004" } 5 August 2023 27
  • 28. CouchDB JSON Tags • "_id" • GUID – Global Unique Identifier • Passed in or generated by CouchDB • "_rev" • Revision number • Versioning mechanism • "type", "author", "title", etc. • Arbitrary tags • Schema-less • Could be validated after the fact by user-written routine 5 August 2023 28
  • 30. What is MongoDB ? • Scalable High-Performance Open-source, Document-orientated database. • Built for Speed • Rich Document based queries for Easy readability. • Full Index Support for High Performance. • Replication and Failover for High Availability. • Auto Sharding for Easy Scalability. • Map / Reduce for Aggregation.
  • 31. Why use MongoDB? • SQL was invented in the 70’s to store data. • MongoDB stores documents (or) objects. • Now-a-days, everyone works with objects (Python/Ruby/Java/etc.) • And we need Databases to persist our objects. Then why not store objects directly ? • Embedded documents and arrays reduce need for joins. No Joins and No-multi document transactions.
  • 32. What is MongoDB great for? • RDBMS replacement for Web Applications. • Semi-structured Content Management. • Real-time Analytics & High-Speed Logging. • Caching and High Scalability Web 2.0, Media, SAAS, Gaming HealthCare, Finance, Telecom, Government
  • 33. Not great for? • Highly Transactional Applications. • Problems requiring SQL. Some Companies using MongoDB in Production
  • 34. Schema less : Number of fields, content and size of the document can be differ from one document to another. No complex joins Data is stored as JSON style Index on any attribute Replication and High availability
  • 35. 35 MongoDB Terminologies for RDBMS concepts RDBMS MongoDB Database Database Table, View Collection Row Document (JSON, BSON) Column Field Index Index Join Embedded Document Foreign Key Reference Partition Shard
  • 36. JSON “JavaScript Object Notation” Easy for humans to write/read, easy for computers to parse/generate Objects can be nested Built on • name/value pairs • Ordered list of values http://json.org/
  • 37. BSON “Binary JSON” Binary-encoded serialization of JSON-like docs Embedded structure reduces need for joins Goals • Lightweight • Traversable • Efficient (decoding and encoding) http://bsonspec.org/
  • 38. BSON Example { "_id" : "37010" “City" : “Nashik", “Pin" : 423201, "state" : “MH", “Postman” : { name: “Ramesh Jadhav” address: “Panchavati” } }
  • 40. • String : This is most commonly used datatype to store the data. String in mongodb must be UTF-8 valid. • Integer : This type is used to store a numerical value. Integer can be 32 bit or 64 bit depending upon your server. • Boolean : This type is used to store a boolean (true/ false) value. • Double : This type is used to store floating point values. • Min/ Max keys : This type is used to compare a value against the lowest and highest BSON elements. • Arrays : This type is used to store arrays or list or multiple values into one key. • Timestamp : ctimestamp. This can be handy for recording when a document has been modified or added. • Object : This datatype is used for embedded documents. Data Types
  • 41. • Null : This type is used to store a Null value. • Symbol : This datatype is used identically to a string however, it's generally reserved for languages that use a specific symbol type. • Date : This datatype is used to store the current date or time in UNIX time format. You can specify your own date time by creating object of Date and passing day, month, year into it. • Object ID : This datatype is used to store the document’s ID. • Binary data : This datatype is used to store binay data. • Code : This datatype is used to store javascript code into document. • Regular expression : This datatype is used to store regular expression Data Types
  • 42. Outline Difference Between SQL and NoSQL Study of Open Source NOSQL Database MongoDB Installation, Basic CRUD operations, Execution
  • 43. enter the following commands in the Command Prompt or Powershell: wmic os get caption wmic os get osarchitecture Find version of Windows
  • 44. Installation in Windows • Download MongoDB from Website: https://www.mongodb.org/downloads • Select option Windows • Download and Run
  • 45. Create one folder (eg SNJB) in bin folder of MongoDB Goto command prompt Goto bin dir of MongoDB and write following command mongod --storageEngine=mmapv1 --dbpath SNJB (Server will started and listen at 27017 port) Open another command prompt and give command mongo (Client will be started) Starting MongoDB in Windows
  • 46. Installation in Ubuntu • Download MongoDB from Website: https://www.mongodb.org/downloads • Select option Linux • Download and Run
  • 47. Starting MongoDB in Ubuntu Create a folder in bin directory of mongodb Open terminal Goto mongodb bin folder (cd mongo….) Type ./mongod (Server is started) Open another terminal Goto mongodb bin folder (cd mongo….) Type ./mongo (client will be started) Run all commands on client terminal
  • 48. Outline Difference Between SQL and NoSQL Study of Open Source NOSQL Database MongoDB Installation, Basic CRUD operations, Execution
  • 50. • switched to database provided with ciommand use <database name> • To check currently selected database use the command db db • Displays the list of databases show dbs • To Drop the database db.dropDatabase () Basic Database Operations- Database
  • 51. • To create collection db.createCollection (name) Ex:- db.createCollection(Stud) • List out all names of collection in current database >show collections • In mongodb you don't need to create collection. MongoDB creates collection automatically, when you insert some document. db.databasename.insert ({Key : Value}) Ex:- db.Stud.insert({{Name:”Jiya”}) • MongoDB's db.collection.drop() is used to drop a collection from the database. db.collection.drop() Example:- db.Stud.drop() Basic DatabaseOperations-Collection
  • 53. References • https://docs.mongodb.com/manual/introduction/ • http://metadata-standards.org/Document-library/Documents- by-number/WG2-N1501- N1550/WG2_N1537_SQL_Standard_and_NoSQL_Databases% 202011-05.ppt • https://www.slideshare.net/raviteja2007/introduction-to- mongodb-12246792 • https://docs.mongodb.com/manual/core/databases-and- collections/ • https://docs.mongodb.com/manual/crud/

Editor's Notes

  1. Javascript