SlideShare a Scribd company logo
1 of 46
Presented by: Group Members
Zubair Ahmed, Jameel Ahmed, Naeem Jan and Hassam Hamid
Instructor: Mr. Mukhtar Hussain
Class: BSCS 8th (2015-2018)
Presented by: Group Members
Date:Tuesday, September 11, 2018
Department: Computer Science
University ofTurbat2 |
PresentationTasks
1) Introduction to MongoDB By Jameel
Ahmed
2) Installing MongoDB By Naeem Jan
3) MongoDB Data Modelling By Zubair
Ahmed
4) MongoDB CRUD Operations By Hassam
Hamid
University ofTurbat3 |
Introduction
University ofTurbat4 |
The Family of NoSQL DBs
Key-values Stores
Hash table where there is a unique key and a pointer to a particular item of data.
Focus on scaling to huge amounts of data
E.g.Oracle BDB
Column Family Stores
To store and process very large amounts of data distributed over many machines
E.g.Cassandra, HBase
Document Databases
Collections of Key-Value collections
The next level of Key/value, allowing nested values associated with each key.
Appropriate for Web apps.
E.g. CouchDB, MongoDb
Graph Databases
Bases on property-graph model
Appropriate for Social networking, Recommendations
E.g. Neo4J, InfiniteGraph
Introduction to MongoDB
University ofTurbat5 |
MongoDB
 Document-oriented NoSQL database
 Schema-free
 Based on Binary JSON; BSON
 Organized in Group of Documents  Collections
 Informal namespacing
 Auto-Sharding in order to scale horizontally
 Simple query language. Rich, document-based queries.
 Map/Reduce support
 Open Source
Introduction to MongoDB
University ofTurbat6 |
MongoDB
Who uses MongoDB
Weather Channel
ADP
Expedia
SourceForge
Bosch
Introduction to MongoDB
7
Document store
RDBMS MongoDB
Database Database
Table,View Collection
Row Document (JSON,
BSON)
Column Field
Index Index
Join Embedded Document
Foreign Key Reference
Partition Shard
University ofTurbatIntroduction to MongoDB
Document store
RDBMS MongoDB
Database Database
Table,View Collection
Row Document (JSON,
BSON)
Column Field
Index Index
Join Embedded Document
Foreign Key Reference
Partition Shard
> db.user.findOne({age:39})
{
"_id" : ObjectId("5114e0bd42…"),
"first" : "John",
"last" : "Doe",
"age" : 39,
"interests" : [
"Reading",
"Mountain Biking ]
"favorites": {
"color": "Blue",
"sport": "Soccer"}
}
University ofTurbatIntroduction to MongoDB
University ofTurbat9 |
Installation
University ofTurbat10 |
Installation of MongoDB
How to Download Setup
Installation of MongoDB
 Open a browser
 Write mongodb
 Click MongoDB webite with https://www.mongodb.com
University ofTurbat11 |
Installation of MongoDB
Installation of MongoDB
 Click on Get MongoDB buttion
University ofTurbat12 |
Installation of MongoDB
Installation of MongoDB
 Click on Community Server button in the menu
 Choose an Operating System
 Click on D OWNLOAD button
University ofTurbat13 |
Installation of MongoDB
Installation of MongoDB
 After downloading MongoDB then double click on the setup
 While installing,Accept terms and License Agreement,
 Then click next
University ofTurbat14 |
Installation of MongoDB
Installation of MongoDB
 Click on the Complete button
University ofTurbat15 |
Installation of MongoDB
Installation of MongoDB
 Click on the next button
University ofTurbat16 |
Installation of MongoDB
Installation of MongoDB
 Uncheck “Install MongoDB Compass” then click Next button
University ofTurbat17 |
Installation of MongoDB
Installation of MongoDB
 After installation, copy the path C:Program
FilesMongoDBServer4.0bin
University ofTurbat18 |
Installation of MongoDB
Installation of MongoDB
 Then go toThis Pc properties then click “Advance system setting” button
 Then click on “EnvironmentVariable” to paste the path
University ofTurbat19 |
Installation of MongoDB
Installation of MongoDB
 After, go to c:Program Files
 Create a folder named Data
 Create another folder named db in Data folder
University ofTurbat20 |
Installation of MongoDB
Installation of MongoDB
 Then Open cmd ,Write the command “mongod”
University ofTurbat21 |
Installation of MongoDB
Installation of MongoDB
 Again Open cmd ,Write the command “mongo”
University ofTurbat22 |
Installation of MongoDB
Installation of MongoDB
 Go to https://robomongo.org
University ofTurbat23 |
Installation of MongoDB
Installation of MongoDB
 Go to https://robomongo.org
University ofTurbat24 |
Installation of MongoDB
Installation of MongoDB
 Go to https://robomongo.org
University ofTurbat25 |
Installation of MongoDB
Installation of MongoDB
 Go to https://robomongo.org
University ofTurbat26 |
Installation of MongoDB
Installation of MongoDB
 Go to https://robomongo.org
University ofTurbat27 |
Installation of MongoDB
Installation of MongoDB
 Go to https://robomongo.org
University ofTurbat28 |
Installation of MongoDB
Installation of MongoDB
 Go to https://robomongo.org
University ofTurbat29 |
Installation of MongoDB
Installation of MongoDB
 Go to https://robomongo.org
University ofTurbat30 |
Installation of MongoDB
Installation of MongoDB
 Go to https://robomongo.org
University ofTurbat31 |
MongoDB Data Modelling
University ofTurbat32 |
Schema Design
 Relational
MongoDB Data Modelling
 MongoDB
• Tabular Data-Tables,Rows and Columns
• Normalized- Flatten your data
• Columns with simple values(int, varchar)
• Related rows with foreign key references
• Indexes on values
• Databases > Collections > Documents
• Documents are monolithic units
• Embedded complex data structures
• No joins- repeat data for faster access
• Difficult to relate documents together
University ofTurbat33 |
Flexible Schema and Documents structure
 Flexible Schema
 Document Structure
MongoDB Data Modelling
1. Reference 2. Embedded Data
University ofTurbat34 |
Atomic operations
 Atomic Operations
• supports atomic operations executed against single documents
• An atomic operation is a set of operations that appears to be merely one single
operation to the rest of the system
• It will have positive or negative results
Examples:
1. $set: Sets a particular value.
2. $unset: Removes a particular value.
3.$inc: Increments a particular value by a certain amount.
MongoDB Data Modelling
University ofTurbat35 |
MongoDB Data Modelling
 Data types
1. String
2.Integer
3.Boolean
4.Double
5.Max/Min keys
6.Array
7.TimeStamp
8.Object
9.Null
10.Symbol
11.Date
12.Object ID
13.Binary Data
14.Regular Expression
15.JavaScript Code
MongoDB Data Modelling
University ofTurbat36 |
Some ConsiderationsWhile Designing Schema
 Considerations
• Design your schema according to user requirements.
• Combine objects into one document if you will use them together. Otherwise
separate them (but make sure there
• should not be need of joins.
• Duplicate the data (but limited) because disk space is cheap as compare to
compute time.
• Do joins while write, not on read.
• Optimize your schema for most frequent use cases.
MongoDB Data Modelling
University ofTurbat37 |
Creating Database
 Mongodb Shell
 The use command
• Database is create using “use ” command (use DatabaseName)
Example:
MongoDB Data Modelling
>use UOTDatabase
Switched to db UOTDatabase
University ofTurbat38 |
Creating Database
 commands
• use DatabaseName : Creating Database
• db: Currently selected Databse
• showdb: Shows all Database
MongoDB Data Modelling
University ofTurbat39 |
Creating collection and document
 Creating collection and document
• db.movie.insert({"name":"tutorials point"})
MongoDB Data Modelling
University ofTurbat40 |
CRUD
University ofTurbat41 |
MongoDB CRUD Operations
CRUD Operations
 Create Operations
 Read Operations
 Update Operations
 Delete Operations
MongoDB CRUDOperations
University ofTurbat42 |
MongoDB CRUD Operations
Create Operations
 Create Or Insert operations Add A New DocumentTo A Collection
 MongoDB providesThe Following Methods to InsertA Document
1. Db.collection.insertone()
2. Db.collection.insertmany()
MongoDB CRUDOperations
University ofTurbat43 |
MongoDB CRUD Operations
READ Operations
 Read operations retrieves documents from a collection
 Methods For Reading Or Finding a document…
1. db.collection.find()
MongoDB CRUDOperations
University ofTurbat44 |
MongoDB CRUD Operations
UPDATE Operations
 Update operations modify existing documents in a collection.
 Methods For Updating…….
1. db.collection.updateone()
2. db.collection.updatemany()
3. db.collection.replaceone()
MongoDB CRUDOperations
University ofTurbat45 |
MongoDB CRUD Operations
DELETE Operations
 Delete operations remove documents from a collection
 Methods For Deleting Documents…
1. db.collection.deleteone()
2. db.collection.deletemany()
MongoDB CRUDOperations
University ofTurbat46 |
Thank you
Any Questions

More Related Content

What's hot

Challenges with MongoDB
Challenges with MongoDBChallenges with MongoDB
Challenges with MongoDBStone Gao
 
MongoDB Introduction - Document Oriented Nosql Database
MongoDB Introduction - Document Oriented Nosql DatabaseMongoDB Introduction - Document Oriented Nosql Database
MongoDB Introduction - Document Oriented Nosql DatabaseSudhir Patil
 
11 schema design & crud
11 schema design & crud11 schema design & crud
11 schema design & crudAhmed Elbassel
 
MongoDB: An Introduction - june-2011
MongoDB:  An Introduction - june-2011MongoDB:  An Introduction - june-2011
MongoDB: An Introduction - june-2011Chris Westin
 
MongoDB basics & Introduction
MongoDB basics & IntroductionMongoDB basics & Introduction
MongoDB basics & IntroductionJerwin Roy
 

What's hot (12)

No sql - { If and Else }
No sql - { If and Else }No sql - { If and Else }
No sql - { If and Else }
 
Starting with MongoDB
Starting with MongoDBStarting with MongoDB
Starting with MongoDB
 
Challenges with MongoDB
Challenges with MongoDBChallenges with MongoDB
Challenges with MongoDB
 
MongoDB Introduction - Document Oriented Nosql Database
MongoDB Introduction - Document Oriented Nosql DatabaseMongoDB Introduction - Document Oriented Nosql Database
MongoDB Introduction - Document Oriented Nosql Database
 
mongoDB for sysadmins
mongoDB for sysadminsmongoDB for sysadmins
mongoDB for sysadmins
 
MongoDb - Details on the POC
MongoDb - Details on the POCMongoDb - Details on the POC
MongoDb - Details on the POC
 
11 schema design & crud
11 schema design & crud11 schema design & crud
11 schema design & crud
 
CSCi226PPT1
CSCi226PPT1CSCi226PPT1
CSCi226PPT1
 
Mongodb
MongodbMongodb
Mongodb
 
Mongo db workshop # 02
Mongo db workshop # 02Mongo db workshop # 02
Mongo db workshop # 02
 
MongoDB: An Introduction - june-2011
MongoDB:  An Introduction - june-2011MongoDB:  An Introduction - june-2011
MongoDB: An Introduction - june-2011
 
MongoDB basics & Introduction
MongoDB basics & IntroductionMongoDB basics & Introduction
MongoDB basics & Introduction
 

Similar to Presentation mongodb

3 scenarios when to use MongoDB!
3 scenarios when to use MongoDB!3 scenarios when to use MongoDB!
3 scenarios when to use MongoDB!Edureka!
 
MongoDB NoSQL - Developer Guide
MongoDB NoSQL - Developer GuideMongoDB NoSQL - Developer Guide
MongoDB NoSQL - Developer GuideShiv K Sah
 
Introduction to MongoDB and its best practices
Introduction to MongoDB and its best practicesIntroduction to MongoDB and its best practices
Introduction to MongoDB and its best practicesAshishRathore72
 
SQL vs NoSQL, an experiment with MongoDB
SQL vs NoSQL, an experiment with MongoDBSQL vs NoSQL, an experiment with MongoDB
SQL vs NoSQL, an experiment with MongoDBMarco Segato
 
Mongo db first steps with csharp
Mongo db first steps with csharpMongo db first steps with csharp
Mongo db first steps with csharpSerdar Buyuktemiz
 
how_can_businesses_address_storage_issues_using_mongodb.pdf
how_can_businesses_address_storage_issues_using_mongodb.pdfhow_can_businesses_address_storage_issues_using_mongodb.pdf
how_can_businesses_address_storage_issues_using_mongodb.pdfsarah david
 
how_can_businesses_address_storage_issues_using_mongodb.pptx
how_can_businesses_address_storage_issues_using_mongodb.pptxhow_can_businesses_address_storage_issues_using_mongodb.pptx
how_can_businesses_address_storage_issues_using_mongodb.pptxsarah david
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDBRaghunath A
 
Webinar: When to Use MongoDB
Webinar: When to Use MongoDBWebinar: When to Use MongoDB
Webinar: When to Use MongoDBMongoDB
 
Node Js, AngularJs and Express Js Tutorial
Node Js, AngularJs and Express Js TutorialNode Js, AngularJs and Express Js Tutorial
Node Js, AngularJs and Express Js TutorialPHP Support
 
What is the significance of MongoDB and what are its usages.docx
What is the significance of MongoDB and what are its usages.docxWhat is the significance of MongoDB and what are its usages.docx
What is the significance of MongoDB and what are its usages.docxkzayra69
 
MongoDB World 2018: Bumps and Breezes: Our Journey from RDBMS to MongoDB
MongoDB World 2018: Bumps and Breezes: Our Journey from RDBMS to MongoDBMongoDB World 2018: Bumps and Breezes: Our Journey from RDBMS to MongoDB
MongoDB World 2018: Bumps and Breezes: Our Journey from RDBMS to MongoDBMongoDB
 
How do you connect your mongo db database with node.js
How do you connect your mongo db database with node.js How do you connect your mongo db database with node.js
How do you connect your mongo db database with node.js MoonTechnolabsPvtLtd
 
MongoDB Pros and Cons
MongoDB Pros and ConsMongoDB Pros and Cons
MongoDB Pros and Consjohnrjenson
 

Similar to Presentation mongodb (20)

3 scenarios when to use MongoDB!
3 scenarios when to use MongoDB!3 scenarios when to use MongoDB!
3 scenarios when to use MongoDB!
 
Mongodb Introduction
Mongodb Introduction Mongodb Introduction
Mongodb Introduction
 
MongoDB NoSQL - Developer Guide
MongoDB NoSQL - Developer GuideMongoDB NoSQL - Developer Guide
MongoDB NoSQL - Developer Guide
 
Introduction to MongoDB and its best practices
Introduction to MongoDB and its best practicesIntroduction to MongoDB and its best practices
Introduction to MongoDB and its best practices
 
SQL vs NoSQL, an experiment with MongoDB
SQL vs NoSQL, an experiment with MongoDBSQL vs NoSQL, an experiment with MongoDB
SQL vs NoSQL, an experiment with MongoDB
 
Mongodb By Vipin
Mongodb By VipinMongodb By Vipin
Mongodb By Vipin
 
Mongo db first steps with csharp
Mongo db first steps with csharpMongo db first steps with csharp
Mongo db first steps with csharp
 
how_can_businesses_address_storage_issues_using_mongodb.pdf
how_can_businesses_address_storage_issues_using_mongodb.pdfhow_can_businesses_address_storage_issues_using_mongodb.pdf
how_can_businesses_address_storage_issues_using_mongodb.pdf
 
MongoDB
MongoDBMongoDB
MongoDB
 
how_can_businesses_address_storage_issues_using_mongodb.pptx
how_can_businesses_address_storage_issues_using_mongodb.pptxhow_can_businesses_address_storage_issues_using_mongodb.pptx
how_can_businesses_address_storage_issues_using_mongodb.pptx
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
Webinar: When to Use MongoDB
Webinar: When to Use MongoDBWebinar: When to Use MongoDB
Webinar: When to Use MongoDB
 
Node Js, AngularJs and Express Js Tutorial
Node Js, AngularJs and Express Js TutorialNode Js, AngularJs and Express Js Tutorial
Node Js, AngularJs and Express Js Tutorial
 
What is the significance of MongoDB and what are its usages.docx
What is the significance of MongoDB and what are its usages.docxWhat is the significance of MongoDB and what are its usages.docx
What is the significance of MongoDB and what are its usages.docx
 
MongoDB World 2018: Bumps and Breezes: Our Journey from RDBMS to MongoDB
MongoDB World 2018: Bumps and Breezes: Our Journey from RDBMS to MongoDBMongoDB World 2018: Bumps and Breezes: Our Journey from RDBMS to MongoDB
MongoDB World 2018: Bumps and Breezes: Our Journey from RDBMS to MongoDB
 
Mongo db
Mongo dbMongo db
Mongo db
 
MongoDB DOC v1.5
MongoDB DOC v1.5MongoDB DOC v1.5
MongoDB DOC v1.5
 
How do you connect your mongo db database with node.js
How do you connect your mongo db database with node.js How do you connect your mongo db database with node.js
How do you connect your mongo db database with node.js
 
MongoDB Pros and Cons
MongoDB Pros and ConsMongoDB Pros and Cons
MongoDB Pros and Cons
 
Mongo db report
Mongo db reportMongo db report
Mongo db report
 

Recently uploaded

原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证
原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证
原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证pwgnohujw
 
obat aborsi Bontang wa 081336238223 jual obat aborsi cytotec asli di Bontang6...
obat aborsi Bontang wa 081336238223 jual obat aborsi cytotec asli di Bontang6...obat aborsi Bontang wa 081336238223 jual obat aborsi cytotec asli di Bontang6...
obat aborsi Bontang wa 081336238223 jual obat aborsi cytotec asli di Bontang6...yulianti213969
 
Identify Rules that Predict Patient’s Heart Disease - An Application of Decis...
Identify Rules that Predict Patient’s Heart Disease - An Application of Decis...Identify Rules that Predict Patient’s Heart Disease - An Application of Decis...
Identify Rules that Predict Patient’s Heart Disease - An Application of Decis...ThinkInnovation
 
SCI8-Q4-MOD11.pdfwrwujrrjfaajerjrajrrarj
SCI8-Q4-MOD11.pdfwrwujrrjfaajerjrajrrarjSCI8-Q4-MOD11.pdfwrwujrrjfaajerjrajrrarj
SCI8-Q4-MOD11.pdfwrwujrrjfaajerjrajrrarjadimosmejiaslendon
 
sourabh vyas1222222222222222222244444444
sourabh vyas1222222222222222222244444444sourabh vyas1222222222222222222244444444
sourabh vyas1222222222222222222244444444saurabvyas476
 
MATERI MANAJEMEN OF PENYAKIT TETANUS.ppt
MATERI  MANAJEMEN OF PENYAKIT TETANUS.pptMATERI  MANAJEMEN OF PENYAKIT TETANUS.ppt
MATERI MANAJEMEN OF PENYAKIT TETANUS.pptRachmaGhifari
 
Bios of leading Astrologers & Researchers
Bios of leading Astrologers & ResearchersBios of leading Astrologers & Researchers
Bios of leading Astrologers & Researchersdarmandersingh4580
 
NOAM AAUG Adobe Summit 2024: Summit Slam Dunks
NOAM AAUG Adobe Summit 2024: Summit Slam DunksNOAM AAUG Adobe Summit 2024: Summit Slam Dunks
NOAM AAUG Adobe Summit 2024: Summit Slam Dunksgmuir1066
 
Identify Customer Segments to Create Customer Offers for Each Segment - Appli...
Identify Customer Segments to Create Customer Offers for Each Segment - Appli...Identify Customer Segments to Create Customer Offers for Each Segment - Appli...
Identify Customer Segments to Create Customer Offers for Each Segment - Appli...ThinkInnovation
 
NO1 Best Kala Jadu Expert Specialist In Germany Kala Jadu Expert Specialist I...
NO1 Best Kala Jadu Expert Specialist In Germany Kala Jadu Expert Specialist I...NO1 Best Kala Jadu Expert Specialist In Germany Kala Jadu Expert Specialist I...
NO1 Best Kala Jadu Expert Specialist In Germany Kala Jadu Expert Specialist I...Amil baba
 
How to Transform Clinical Trial Management with Advanced Data Analytics
How to Transform Clinical Trial Management with Advanced Data AnalyticsHow to Transform Clinical Trial Management with Advanced Data Analytics
How to Transform Clinical Trial Management with Advanced Data AnalyticsBrainSell Technologies
 
What is Insertion Sort. Its basic information
What is Insertion Sort. Its basic informationWhat is Insertion Sort. Its basic information
What is Insertion Sort. Its basic informationmuqadasqasim10
 
Audience Researchndfhcvnfgvgbhujhgfv.pptx
Audience Researchndfhcvnfgvgbhujhgfv.pptxAudience Researchndfhcvnfgvgbhujhgfv.pptx
Audience Researchndfhcvnfgvgbhujhgfv.pptxStephen266013
 
Displacement, Velocity, Acceleration, and Second Derivatives
Displacement, Velocity, Acceleration, and Second DerivativesDisplacement, Velocity, Acceleration, and Second Derivatives
Displacement, Velocity, Acceleration, and Second Derivatives23050636
 
Genuine love spell caster )! ,+27834335081) Ex lover back permanently in At...
Genuine love spell caster )! ,+27834335081)   Ex lover back permanently in At...Genuine love spell caster )! ,+27834335081)   Ex lover back permanently in At...
Genuine love spell caster )! ,+27834335081) Ex lover back permanently in At...BabaJohn3
 
obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...
obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...
obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...yulianti213969
 
Northern New England Tableau User Group (TUG) May 2024
Northern New England Tableau User Group (TUG) May 2024Northern New England Tableau User Group (TUG) May 2024
Northern New England Tableau User Group (TUG) May 2024patrickdtherriault
 
原件一样伦敦国王学院毕业证成绩单留信学历认证
原件一样伦敦国王学院毕业证成绩单留信学历认证原件一样伦敦国王学院毕业证成绩单留信学历认证
原件一样伦敦国王学院毕业证成绩单留信学历认证pwgnohujw
 
Credit Card Fraud Detection: Safeguarding Transactions in the Digital Age
Credit Card Fraud Detection: Safeguarding Transactions in the Digital AgeCredit Card Fraud Detection: Safeguarding Transactions in the Digital Age
Credit Card Fraud Detection: Safeguarding Transactions in the Digital AgeBoston Institute of Analytics
 

Recently uploaded (20)

原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证
原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证
原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证
 
Abortion pills in Riyadh Saudi Arabia (+966572737505 buy cytotec
Abortion pills in Riyadh Saudi Arabia (+966572737505 buy cytotecAbortion pills in Riyadh Saudi Arabia (+966572737505 buy cytotec
Abortion pills in Riyadh Saudi Arabia (+966572737505 buy cytotec
 
obat aborsi Bontang wa 081336238223 jual obat aborsi cytotec asli di Bontang6...
obat aborsi Bontang wa 081336238223 jual obat aborsi cytotec asli di Bontang6...obat aborsi Bontang wa 081336238223 jual obat aborsi cytotec asli di Bontang6...
obat aborsi Bontang wa 081336238223 jual obat aborsi cytotec asli di Bontang6...
 
Identify Rules that Predict Patient’s Heart Disease - An Application of Decis...
Identify Rules that Predict Patient’s Heart Disease - An Application of Decis...Identify Rules that Predict Patient’s Heart Disease - An Application of Decis...
Identify Rules that Predict Patient’s Heart Disease - An Application of Decis...
 
SCI8-Q4-MOD11.pdfwrwujrrjfaajerjrajrrarj
SCI8-Q4-MOD11.pdfwrwujrrjfaajerjrajrrarjSCI8-Q4-MOD11.pdfwrwujrrjfaajerjrajrrarj
SCI8-Q4-MOD11.pdfwrwujrrjfaajerjrajrrarj
 
sourabh vyas1222222222222222222244444444
sourabh vyas1222222222222222222244444444sourabh vyas1222222222222222222244444444
sourabh vyas1222222222222222222244444444
 
MATERI MANAJEMEN OF PENYAKIT TETANUS.ppt
MATERI  MANAJEMEN OF PENYAKIT TETANUS.pptMATERI  MANAJEMEN OF PENYAKIT TETANUS.ppt
MATERI MANAJEMEN OF PENYAKIT TETANUS.ppt
 
Bios of leading Astrologers & Researchers
Bios of leading Astrologers & ResearchersBios of leading Astrologers & Researchers
Bios of leading Astrologers & Researchers
 
NOAM AAUG Adobe Summit 2024: Summit Slam Dunks
NOAM AAUG Adobe Summit 2024: Summit Slam DunksNOAM AAUG Adobe Summit 2024: Summit Slam Dunks
NOAM AAUG Adobe Summit 2024: Summit Slam Dunks
 
Identify Customer Segments to Create Customer Offers for Each Segment - Appli...
Identify Customer Segments to Create Customer Offers for Each Segment - Appli...Identify Customer Segments to Create Customer Offers for Each Segment - Appli...
Identify Customer Segments to Create Customer Offers for Each Segment - Appli...
 
NO1 Best Kala Jadu Expert Specialist In Germany Kala Jadu Expert Specialist I...
NO1 Best Kala Jadu Expert Specialist In Germany Kala Jadu Expert Specialist I...NO1 Best Kala Jadu Expert Specialist In Germany Kala Jadu Expert Specialist I...
NO1 Best Kala Jadu Expert Specialist In Germany Kala Jadu Expert Specialist I...
 
How to Transform Clinical Trial Management with Advanced Data Analytics
How to Transform Clinical Trial Management with Advanced Data AnalyticsHow to Transform Clinical Trial Management with Advanced Data Analytics
How to Transform Clinical Trial Management with Advanced Data Analytics
 
What is Insertion Sort. Its basic information
What is Insertion Sort. Its basic informationWhat is Insertion Sort. Its basic information
What is Insertion Sort. Its basic information
 
Audience Researchndfhcvnfgvgbhujhgfv.pptx
Audience Researchndfhcvnfgvgbhujhgfv.pptxAudience Researchndfhcvnfgvgbhujhgfv.pptx
Audience Researchndfhcvnfgvgbhujhgfv.pptx
 
Displacement, Velocity, Acceleration, and Second Derivatives
Displacement, Velocity, Acceleration, and Second DerivativesDisplacement, Velocity, Acceleration, and Second Derivatives
Displacement, Velocity, Acceleration, and Second Derivatives
 
Genuine love spell caster )! ,+27834335081) Ex lover back permanently in At...
Genuine love spell caster )! ,+27834335081)   Ex lover back permanently in At...Genuine love spell caster )! ,+27834335081)   Ex lover back permanently in At...
Genuine love spell caster )! ,+27834335081) Ex lover back permanently in At...
 
obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...
obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...
obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...
 
Northern New England Tableau User Group (TUG) May 2024
Northern New England Tableau User Group (TUG) May 2024Northern New England Tableau User Group (TUG) May 2024
Northern New England Tableau User Group (TUG) May 2024
 
原件一样伦敦国王学院毕业证成绩单留信学历认证
原件一样伦敦国王学院毕业证成绩单留信学历认证原件一样伦敦国王学院毕业证成绩单留信学历认证
原件一样伦敦国王学院毕业证成绩单留信学历认证
 
Credit Card Fraud Detection: Safeguarding Transactions in the Digital Age
Credit Card Fraud Detection: Safeguarding Transactions in the Digital AgeCredit Card Fraud Detection: Safeguarding Transactions in the Digital Age
Credit Card Fraud Detection: Safeguarding Transactions in the Digital Age
 

Presentation mongodb

  • 1. Presented by: Group Members Zubair Ahmed, Jameel Ahmed, Naeem Jan and Hassam Hamid Instructor: Mr. Mukhtar Hussain Class: BSCS 8th (2015-2018) Presented by: Group Members Date:Tuesday, September 11, 2018 Department: Computer Science
  • 2. University ofTurbat2 | PresentationTasks 1) Introduction to MongoDB By Jameel Ahmed 2) Installing MongoDB By Naeem Jan 3) MongoDB Data Modelling By Zubair Ahmed 4) MongoDB CRUD Operations By Hassam Hamid
  • 4. University ofTurbat4 | The Family of NoSQL DBs Key-values Stores Hash table where there is a unique key and a pointer to a particular item of data. Focus on scaling to huge amounts of data E.g.Oracle BDB Column Family Stores To store and process very large amounts of data distributed over many machines E.g.Cassandra, HBase Document Databases Collections of Key-Value collections The next level of Key/value, allowing nested values associated with each key. Appropriate for Web apps. E.g. CouchDB, MongoDb Graph Databases Bases on property-graph model Appropriate for Social networking, Recommendations E.g. Neo4J, InfiniteGraph Introduction to MongoDB
  • 5. University ofTurbat5 | MongoDB  Document-oriented NoSQL database  Schema-free  Based on Binary JSON; BSON  Organized in Group of Documents  Collections  Informal namespacing  Auto-Sharding in order to scale horizontally  Simple query language. Rich, document-based queries.  Map/Reduce support  Open Source Introduction to MongoDB
  • 6. University ofTurbat6 | MongoDB Who uses MongoDB Weather Channel ADP Expedia SourceForge Bosch Introduction to MongoDB
  • 7. 7 Document store RDBMS MongoDB Database Database Table,View Collection Row Document (JSON, BSON) Column Field Index Index Join Embedded Document Foreign Key Reference Partition Shard University ofTurbatIntroduction to MongoDB
  • 8. Document store RDBMS MongoDB Database Database Table,View Collection Row Document (JSON, BSON) Column Field Index Index Join Embedded Document Foreign Key Reference Partition Shard > db.user.findOne({age:39}) { "_id" : ObjectId("5114e0bd42…"), "first" : "John", "last" : "Doe", "age" : 39, "interests" : [ "Reading", "Mountain Biking ] "favorites": { "color": "Blue", "sport": "Soccer"} } University ofTurbatIntroduction to MongoDB
  • 10. University ofTurbat10 | Installation of MongoDB How to Download Setup Installation of MongoDB  Open a browser  Write mongodb  Click MongoDB webite with https://www.mongodb.com
  • 11. University ofTurbat11 | Installation of MongoDB Installation of MongoDB  Click on Get MongoDB buttion
  • 12. University ofTurbat12 | Installation of MongoDB Installation of MongoDB  Click on Community Server button in the menu  Choose an Operating System  Click on D OWNLOAD button
  • 13. University ofTurbat13 | Installation of MongoDB Installation of MongoDB  After downloading MongoDB then double click on the setup  While installing,Accept terms and License Agreement,  Then click next
  • 14. University ofTurbat14 | Installation of MongoDB Installation of MongoDB  Click on the Complete button
  • 15. University ofTurbat15 | Installation of MongoDB Installation of MongoDB  Click on the next button
  • 16. University ofTurbat16 | Installation of MongoDB Installation of MongoDB  Uncheck “Install MongoDB Compass” then click Next button
  • 17. University ofTurbat17 | Installation of MongoDB Installation of MongoDB  After installation, copy the path C:Program FilesMongoDBServer4.0bin
  • 18. University ofTurbat18 | Installation of MongoDB Installation of MongoDB  Then go toThis Pc properties then click “Advance system setting” button  Then click on “EnvironmentVariable” to paste the path
  • 19. University ofTurbat19 | Installation of MongoDB Installation of MongoDB  After, go to c:Program Files  Create a folder named Data  Create another folder named db in Data folder
  • 20. University ofTurbat20 | Installation of MongoDB Installation of MongoDB  Then Open cmd ,Write the command “mongod”
  • 21. University ofTurbat21 | Installation of MongoDB Installation of MongoDB  Again Open cmd ,Write the command “mongo”
  • 22. University ofTurbat22 | Installation of MongoDB Installation of MongoDB  Go to https://robomongo.org
  • 23. University ofTurbat23 | Installation of MongoDB Installation of MongoDB  Go to https://robomongo.org
  • 24. University ofTurbat24 | Installation of MongoDB Installation of MongoDB  Go to https://robomongo.org
  • 25. University ofTurbat25 | Installation of MongoDB Installation of MongoDB  Go to https://robomongo.org
  • 26. University ofTurbat26 | Installation of MongoDB Installation of MongoDB  Go to https://robomongo.org
  • 27. University ofTurbat27 | Installation of MongoDB Installation of MongoDB  Go to https://robomongo.org
  • 28. University ofTurbat28 | Installation of MongoDB Installation of MongoDB  Go to https://robomongo.org
  • 29. University ofTurbat29 | Installation of MongoDB Installation of MongoDB  Go to https://robomongo.org
  • 30. University ofTurbat30 | Installation of MongoDB Installation of MongoDB  Go to https://robomongo.org
  • 32. University ofTurbat32 | Schema Design  Relational MongoDB Data Modelling  MongoDB • Tabular Data-Tables,Rows and Columns • Normalized- Flatten your data • Columns with simple values(int, varchar) • Related rows with foreign key references • Indexes on values • Databases > Collections > Documents • Documents are monolithic units • Embedded complex data structures • No joins- repeat data for faster access • Difficult to relate documents together
  • 33. University ofTurbat33 | Flexible Schema and Documents structure  Flexible Schema  Document Structure MongoDB Data Modelling 1. Reference 2. Embedded Data
  • 34. University ofTurbat34 | Atomic operations  Atomic Operations • supports atomic operations executed against single documents • An atomic operation is a set of operations that appears to be merely one single operation to the rest of the system • It will have positive or negative results Examples: 1. $set: Sets a particular value. 2. $unset: Removes a particular value. 3.$inc: Increments a particular value by a certain amount. MongoDB Data Modelling
  • 35. University ofTurbat35 | MongoDB Data Modelling  Data types 1. String 2.Integer 3.Boolean 4.Double 5.Max/Min keys 6.Array 7.TimeStamp 8.Object 9.Null 10.Symbol 11.Date 12.Object ID 13.Binary Data 14.Regular Expression 15.JavaScript Code MongoDB Data Modelling
  • 36. University ofTurbat36 | Some ConsiderationsWhile Designing Schema  Considerations • Design your schema according to user requirements. • Combine objects into one document if you will use them together. Otherwise separate them (but make sure there • should not be need of joins. • Duplicate the data (but limited) because disk space is cheap as compare to compute time. • Do joins while write, not on read. • Optimize your schema for most frequent use cases. MongoDB Data Modelling
  • 37. University ofTurbat37 | Creating Database  Mongodb Shell  The use command • Database is create using “use ” command (use DatabaseName) Example: MongoDB Data Modelling >use UOTDatabase Switched to db UOTDatabase
  • 38. University ofTurbat38 | Creating Database  commands • use DatabaseName : Creating Database • db: Currently selected Databse • showdb: Shows all Database MongoDB Data Modelling
  • 39. University ofTurbat39 | Creating collection and document  Creating collection and document • db.movie.insert({"name":"tutorials point"}) MongoDB Data Modelling
  • 41. University ofTurbat41 | MongoDB CRUD Operations CRUD Operations  Create Operations  Read Operations  Update Operations  Delete Operations MongoDB CRUDOperations
  • 42. University ofTurbat42 | MongoDB CRUD Operations Create Operations  Create Or Insert operations Add A New DocumentTo A Collection  MongoDB providesThe Following Methods to InsertA Document 1. Db.collection.insertone() 2. Db.collection.insertmany() MongoDB CRUDOperations
  • 43. University ofTurbat43 | MongoDB CRUD Operations READ Operations  Read operations retrieves documents from a collection  Methods For Reading Or Finding a document… 1. db.collection.find() MongoDB CRUDOperations
  • 44. University ofTurbat44 | MongoDB CRUD Operations UPDATE Operations  Update operations modify existing documents in a collection.  Methods For Updating……. 1. db.collection.updateone() 2. db.collection.updatemany() 3. db.collection.replaceone() MongoDB CRUDOperations
  • 45. University ofTurbat45 | MongoDB CRUD Operations DELETE Operations  Delete operations remove documents from a collection  Methods For Deleting Documents… 1. db.collection.deleteone() 2. db.collection.deletemany() MongoDB CRUDOperations
  • 46. University ofTurbat46 | Thank you Any Questions

Editor's Notes

  1. Javascript
  2. Flexible schema Javascript