SlideShare une entreprise Scribd logo
1  sur  27
Web Data Management, Search and Retrieval Course (MCOM7348)
University of Birzeit, Palestine
January, 2014

Synthesis Paper Talk

Nosql Database
Fayez shayeb

bbbbb

Master of Computing, Birzeit University
Fayez.aauj@hotmail.com

Master of Computing, Birzeit University
bbbbbbb@yahoo.com

This is a student talk, at the Web Data Management, Search and Retrieval
Course, each student is is asked to present his/her synthesis paper.
Course Page: http://jarrar-courses.blogspot.com/2013/11/web-data-management.html
1
Document-oriented database
• document-oriented database is a computer
program designed for storing, retrieving, and
managing document-oriented, or semi structured
data, information
Comparison
 Document db

 Relational
Article
- id
- authorid
- title
- content

Author
- id
- name
- email

Comment
- id
- articleid
- message

Article
- _id
- title
- content
- author
- _id
- name
- email
- comments[]
Concepts
 Joins
 No joins
 Joins at "design time", not at "query time“
 Due to embedded docs and arrays less joins are needed

 Constraints
 No foreign key constraints
 Unique indexes

 Transactions
 No commit/rollback
 Atomic operations
 Multiple actions inside the same document
 Incl. embedded documents
Benefits

 Scalable: good for a lot of data / traffic
 Horizontal scaling: to more nodes
 Good for web-apps

 Performance
 No joins and constraints

 Dev/user friendly
 Data is modeled to how the app is going to use it
 No conversion between object oriented > relational
 No static schema = agile
One-to-many
 Embedded array / array keys
 Some queries get harder
 You can index arrays!

 Normalized approach
 More flexibility
 A lot less performance

Article
- _id
- content
- tags: {“foo”, “bar”}
- comments: {“id1”, “id2”}
many-to-many
 Using array keys
 No join table
 References on both sides
Article
- _id
- content
- category_ids : {“id1”, “id2”}

Category
- _id
- name
- article_ids: {“id7”, “id8”}

 Advantage: simple queries
articles.Where(p => p.CategoryIds.Contains(categoryId))
categories.Where(c => c.ArticleIds.Contains(articleId))

 Disadvantage: duplication, update two docs
json

•
•
•

Stands for Javascript Object Notation
Derived from Javascript scripting language
Used for representing simple data
structures and associative arrays

{

{
"_id": "BCCD12CBB",
"type": "person",
"name": "Darth Vader",
"age": 63,
"headware":
["Helmet", "Sombrero"],
"dark_side": true

}

"_id": "BCCD12CBC",
"type": "person",
"name": "Luke",
"age": 35,
"powers":
["Pull", "Jedi Mind Trick"],
"dark_side": false
}
Replication
 Only one server is active for writes (the primary, or

master) at a given time – this is to allow strong
consistent (atomic) operations. One can optionally
send read operations to the secondaries when
eventual consistency semantics are acceptable.
Sharding
 Sharding is the partitioning of data among multiple

machines in an order-preserving manner.(horizontal
scaling )
Machine 1

Machine 2

Machine 3

Alabama → Arizona

Colorado → Florida

Arkansas → California

Indiana → Kansas

Idaho → Illinois

Georgia → Hawaii

Maryland → Michigan

Kentucky → Maine

Minnesota → Missouri

Montana → Montana

Nebraska → New Jersey

Ohio → Pennsylvania

New Mexico → North Dakota

Rhode Island → South Dakota

Tennessee → Utah

Vermont → West Virgina

Wisconsin → Wyoming
Sharding
 The set of servers/mongod process within the shard

comprise a replica set
Replication & Sharding conclusion
 sharding is the tool for scaling a system, and

replication is the tool for data safety, high availability,
and disaster recovery. The two work in tandem yet are
orthogonal concepts in the design.
Document Databases
What is MongoDB?
 Creator: 10 gen, former doublick
 Name: short for humongous (
 Language: C++

)
What is MongoDB?
 Defination: MongoDB is an open source, document-

oriented database designed with both scalability and
developer agility in mind. Instead of storing your data
in tables and rows as you would with a relational
database, in MongoDB you store JSON-like
documents with dynamic schemas(schemafree, schemaless).
What is MongoDB?
 Goal: bridge the gap between key-value stores (which

are fast and scalable) and relational databases (which
have rich functionality).
MongoDB terms ?
Term mapping
MongoDB Data model
 Data model: Using BSON (binary JSON), developers

can easily map to modern object-oriented languages
without a complicated ORM layer.
 BSON is a binary format in which zero or more
key/value pairs are stored as a single entity.
 lightweight, traversable, efficient
Schema design
 RDBMS: join
Schema design
Schema design
Query MongoDB Vs sql?
SQL

mongodb

Create table

db.CreateCollection()

Insert into

db.coll.save()

select

db.coll.find()

update

db.coll.update

delete

db.coll.remove()

drop

db.coll.drop()
Query MongoDB Vs sql?
Query MongoDB Vs sql?
API for MongoDB :
C
C++
C#
Erlang
Haskell
Java
node.js

PHP
Perl
Python
Ruby
Scala (Casbah)
Thank You

27

Contenu connexe

Tendances

MongoDB: An Introduction - june-2011
MongoDB:  An Introduction - june-2011MongoDB:  An Introduction - june-2011
MongoDB: An Introduction - june-2011Chris Westin
 
MongoDB NoSQL database a deep dive -MyWhitePaper
MongoDB  NoSQL database a deep dive -MyWhitePaperMongoDB  NoSQL database a deep dive -MyWhitePaper
MongoDB NoSQL database a deep dive -MyWhitePaperRajesh Kumar
 
An introduction to MongoDB
An introduction to MongoDBAn introduction to MongoDB
An introduction to MongoDBCésar Trigo
 
MongoDB NoSQL - Developer Guide
MongoDB NoSQL - Developer GuideMongoDB NoSQL - Developer Guide
MongoDB NoSQL - Developer GuideShiv K Sah
 
MongoDB Schema Design by Examples
MongoDB Schema Design by ExamplesMongoDB Schema Design by Examples
MongoDB Schema Design by ExamplesHadi Ariawan
 
MongoDB presentation
MongoDB presentationMongoDB presentation
MongoDB presentationHyphen Call
 
Basics of MongoDB
Basics of MongoDB Basics of MongoDB
Basics of MongoDB Habilelabs
 
MongoDB by Emroz sardar.
MongoDB by Emroz sardar.MongoDB by Emroz sardar.
MongoDB by Emroz sardar.Emroz Sardar
 
A Study on Mongodb Database
A Study on Mongodb DatabaseA Study on Mongodb Database
A Study on Mongodb DatabaseIJSRD
 
Mongo DB: Operational Big Data Database
Mongo DB: Operational Big Data DatabaseMongo DB: Operational Big Data Database
Mongo DB: Operational Big Data DatabaseXpand IT
 
SURVEY ON MONGODB: AN OPEN-SOURCE DOCUMENT DATABASE
SURVEY ON MONGODB: AN OPEN-SOURCE DOCUMENT DATABASESURVEY ON MONGODB: AN OPEN-SOURCE DOCUMENT DATABASE
SURVEY ON MONGODB: AN OPEN-SOURCE DOCUMENT DATABASEIAEME Publication
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDBMike Dirolf
 
introduction to NOSQL Database
introduction to NOSQL Databaseintroduction to NOSQL Database
introduction to NOSQL Databasenehabsairam
 

Tendances (20)

MongoDB: An Introduction - june-2011
MongoDB:  An Introduction - june-2011MongoDB:  An Introduction - june-2011
MongoDB: An Introduction - june-2011
 
MongoDB NoSQL database a deep dive -MyWhitePaper
MongoDB  NoSQL database a deep dive -MyWhitePaperMongoDB  NoSQL database a deep dive -MyWhitePaper
MongoDB NoSQL database a deep dive -MyWhitePaper
 
An introduction to MongoDB
An introduction to MongoDBAn introduction to MongoDB
An introduction to MongoDB
 
MongoDB NoSQL - Developer Guide
MongoDB NoSQL - Developer GuideMongoDB NoSQL - Developer Guide
MongoDB NoSQL - Developer Guide
 
MongoDB Schema Design by Examples
MongoDB Schema Design by ExamplesMongoDB Schema Design by Examples
MongoDB Schema Design by Examples
 
MongoDB presentation
MongoDB presentationMongoDB presentation
MongoDB presentation
 
Mongodb
MongodbMongodb
Mongodb
 
MongodB Internals
MongodB InternalsMongodB Internals
MongodB Internals
 
Mongo db report
Mongo db reportMongo db report
Mongo db report
 
Basics of MongoDB
Basics of MongoDB Basics of MongoDB
Basics of MongoDB
 
MongoDB by Emroz sardar.
MongoDB by Emroz sardar.MongoDB by Emroz sardar.
MongoDB by Emroz sardar.
 
Mongodb tutorial at Easylearning Guru
Mongodb tutorial  at Easylearning GuruMongodb tutorial  at Easylearning Guru
Mongodb tutorial at Easylearning Guru
 
A Study on Mongodb Database
A Study on Mongodb DatabaseA Study on Mongodb Database
A Study on Mongodb Database
 
Mongo DB: Operational Big Data Database
Mongo DB: Operational Big Data DatabaseMongo DB: Operational Big Data Database
Mongo DB: Operational Big Data Database
 
Mongo DB
Mongo DBMongo DB
Mongo DB
 
Introduction to mongodb
Introduction to mongodbIntroduction to mongodb
Introduction to mongodb
 
Object oriented databases
Object oriented databasesObject oriented databases
Object oriented databases
 
SURVEY ON MONGODB: AN OPEN-SOURCE DOCUMENT DATABASE
SURVEY ON MONGODB: AN OPEN-SOURCE DOCUMENT DATABASESURVEY ON MONGODB: AN OPEN-SOURCE DOCUMENT DATABASE
SURVEY ON MONGODB: AN OPEN-SOURCE DOCUMENT DATABASE
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
introduction to NOSQL Database
introduction to NOSQL Databaseintroduction to NOSQL Database
introduction to NOSQL Database
 

En vedette

February Corporate Presentation 2014
February Corporate Presentation 2014February Corporate Presentation 2014
February Corporate Presentation 2014oncolyticsinc
 
たのしいかめらのえらびかた~デジタル一眼編
たのしいかめらのえらびかた~デジタル一眼編たのしいかめらのえらびかた~デジタル一眼編
たのしいかめらのえらびかた~デジタル一眼編Kegani
 
Chamomiletea metroblog com_the_benefits_of_chamomile_tea
Chamomiletea metroblog com_the_benefits_of_chamomile_teaChamomiletea metroblog com_the_benefits_of_chamomile_tea
Chamomiletea metroblog com_the_benefits_of_chamomile_teaDeloris Cooper
 
Quick Finance for Defaulters
Quick Finance for DefaultersQuick Finance for Defaulters
Quick Finance for DefaultersCalvin Baird
 
Satélites artificiais
Satélites artificiaisSatélites artificiais
Satélites artificiaisnondoufeito
 
Cantabrian mountains
Cantabrian mountains Cantabrian mountains
Cantabrian mountains mjuanalcaide
 
Preparation and contest
Preparation and contestPreparation and contest
Preparation and contestmsukms
 
GelecekHane Ticaret 2.0 - Mark Holenstein Sap
GelecekHane Ticaret 2.0 - Mark Holenstein SapGelecekHane Ticaret 2.0 - Mark Holenstein Sap
GelecekHane Ticaret 2.0 - Mark Holenstein SapGelecek Hane
 
Evaluation for preliminary task
Evaluation for preliminary taskEvaluation for preliminary task
Evaluation for preliminary taskAliciaRhodes11
 
yOS tour de Montréal
yOS tour de MontréalyOS tour de Montréal
yOS tour de MontréalLuc Labelle
 
ITFT - Famous wild life sancturies
ITFT - Famous wild life sancturiesITFT - Famous wild life sancturies
ITFT - Famous wild life sancturiesAnuj Tomar
 

En vedette (20)

MapReduce and Hadoop
MapReduce and HadoopMapReduce and Hadoop
MapReduce and Hadoop
 
Visiting card
Visiting cardVisiting card
Visiting card
 
February Corporate Presentation 2014
February Corporate Presentation 2014February Corporate Presentation 2014
February Corporate Presentation 2014
 
たのしいかめらのえらびかた~デジタル一眼編
たのしいかめらのえらびかた~デジタル一眼編たのしいかめらのえらびかた~デジタル一眼編
たのしいかめらのえらびかた~デジタル一眼編
 
Ano 2013 retrospctiva
Ano 2013 retrospctivaAno 2013 retrospctiva
Ano 2013 retrospctiva
 
Chamomiletea metroblog com_the_benefits_of_chamomile_tea
Chamomiletea metroblog com_the_benefits_of_chamomile_teaChamomiletea metroblog com_the_benefits_of_chamomile_tea
Chamomiletea metroblog com_the_benefits_of_chamomile_tea
 
Quick Finance for Defaulters
Quick Finance for DefaultersQuick Finance for Defaulters
Quick Finance for Defaulters
 
Montes de Toledo
Montes de ToledoMontes de Toledo
Montes de Toledo
 
SM_PPT_Example
SM_PPT_ExampleSM_PPT_Example
SM_PPT_Example
 
Satélites artificiais
Satélites artificiaisSatélites artificiais
Satélites artificiais
 
Cantabrian mountains
Cantabrian mountains Cantabrian mountains
Cantabrian mountains
 
Preparation and contest
Preparation and contestPreparation and contest
Preparation and contest
 
Cadde spot site
Cadde spot siteCadde spot site
Cadde spot site
 
Basque mountain
Basque mountain Basque mountain
Basque mountain
 
GelecekHane Ticaret 2.0 - Mark Holenstein Sap
GelecekHane Ticaret 2.0 - Mark Holenstein SapGelecekHane Ticaret 2.0 - Mark Holenstein Sap
GelecekHane Ticaret 2.0 - Mark Holenstein Sap
 
1 1
1 11 1
1 1
 
Evaluation for preliminary task
Evaluation for preliminary taskEvaluation for preliminary task
Evaluation for preliminary task
 
yOS tour de Montréal
yOS tour de MontréalyOS tour de Montréal
yOS tour de Montréal
 
ITFT - Famous wild life sancturies
ITFT - Famous wild life sancturiesITFT - Famous wild life sancturies
ITFT - Famous wild life sancturies
 
Iberian mountain
Iberian mountainIberian mountain
Iberian mountain
 

Similaire à MongoDB

Copy of MongoDB .pptx
Copy of MongoDB .pptxCopy of MongoDB .pptx
Copy of MongoDB .pptxnehabsairam
 
Document databases
Document databasesDocument databases
Document databasesQframe
 
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
 
MongoDB Schema Design (Richard Kreuter's Mongo Berlin preso)
MongoDB Schema Design (Richard Kreuter's Mongo Berlin preso)MongoDB Schema Design (Richard Kreuter's Mongo Berlin preso)
MongoDB Schema Design (Richard Kreuter's Mongo Berlin preso)MongoDB
 
Managing Social Content with MongoDB
Managing Social Content with MongoDBManaging Social Content with MongoDB
Managing Social Content with MongoDBMongoDB
 
Vital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and Spark
Vital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and SparkVital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and Spark
Vital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and SparkVital.AI
 
Mongodb Training Tutorial in Bangalore
Mongodb Training Tutorial in BangaloreMongodb Training Tutorial in Bangalore
Mongodb Training Tutorial in Bangalorerajkamaltibacademy
 
3.Implementation with NOSQL databases Document Databases (Mongodb).pptx
3.Implementation with NOSQL databases Document Databases (Mongodb).pptx3.Implementation with NOSQL databases Document Databases (Mongodb).pptx
3.Implementation with NOSQL databases Document Databases (Mongodb).pptxRushikeshChikane2
 
Introduction to MongoDB Basics from SQL to NoSQL
Introduction to MongoDB Basics from SQL to NoSQLIntroduction to MongoDB Basics from SQL to NoSQL
Introduction to MongoDB Basics from SQL to NoSQLMayur Patil
 
Techorama - Evolvable Application Development with MongoDB
Techorama  - Evolvable Application Development with MongoDBTechorama  - Evolvable Application Development with MongoDB
Techorama - Evolvable Application Development with MongoDBbwullems
 
Saran 01.06.2015
Saran 01.06.2015Saran 01.06.2015
Saran 01.06.2015Saran Raj
 
A Study on Mongodb Database.pdf
A Study on Mongodb Database.pdfA Study on Mongodb Database.pdf
A Study on Mongodb Database.pdfJessica Navarro
 
Spring data presentation
Spring data presentationSpring data presentation
Spring data presentationOleksii Usyk
 
Building your first app with MongoDB
Building your first app with MongoDBBuilding your first app with MongoDB
Building your first app with MongoDBNorberto Leite
 
Asp.net Programming Training (Web design, Web development)
Asp.net Programming Training (Web design, Web  development)Asp.net Programming Training (Web design, Web  development)
Asp.net Programming Training (Web design, Web development)Moutasm Tamimi
 
NOSQL and MongoDB Database
NOSQL and MongoDB DatabaseNOSQL and MongoDB Database
NOSQL and MongoDB DatabaseTariqul islam
 

Similaire à MongoDB (20)

Mongo db basics
Mongo db basicsMongo db basics
Mongo db basics
 
Copy of MongoDB .pptx
Copy of MongoDB .pptxCopy of MongoDB .pptx
Copy of MongoDB .pptx
 
Document databases
Document databasesDocument databases
Document databases
 
Mongo db
Mongo dbMongo db
Mongo db
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
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
 
MongoDB Schema Design (Richard Kreuter's Mongo Berlin preso)
MongoDB Schema Design (Richard Kreuter's Mongo Berlin preso)MongoDB Schema Design (Richard Kreuter's Mongo Berlin preso)
MongoDB Schema Design (Richard Kreuter's Mongo Berlin preso)
 
Managing Social Content with MongoDB
Managing Social Content with MongoDBManaging Social Content with MongoDB
Managing Social Content with MongoDB
 
Vital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and Spark
Vital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and SparkVital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and Spark
Vital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and Spark
 
lecture_34e.pptx
lecture_34e.pptxlecture_34e.pptx
lecture_34e.pptx
 
Mongodb Training Tutorial in Bangalore
Mongodb Training Tutorial in BangaloreMongodb Training Tutorial in Bangalore
Mongodb Training Tutorial in Bangalore
 
3.Implementation with NOSQL databases Document Databases (Mongodb).pptx
3.Implementation with NOSQL databases Document Databases (Mongodb).pptx3.Implementation with NOSQL databases Document Databases (Mongodb).pptx
3.Implementation with NOSQL databases Document Databases (Mongodb).pptx
 
Introduction to MongoDB Basics from SQL to NoSQL
Introduction to MongoDB Basics from SQL to NoSQLIntroduction to MongoDB Basics from SQL to NoSQL
Introduction to MongoDB Basics from SQL to NoSQL
 
Techorama - Evolvable Application Development with MongoDB
Techorama  - Evolvable Application Development with MongoDBTechorama  - Evolvable Application Development with MongoDB
Techorama - Evolvable Application Development with MongoDB
 
Saran 01.06.2015
Saran 01.06.2015Saran 01.06.2015
Saran 01.06.2015
 
A Study on Mongodb Database.pdf
A Study on Mongodb Database.pdfA Study on Mongodb Database.pdf
A Study on Mongodb Database.pdf
 
Spring data presentation
Spring data presentationSpring data presentation
Spring data presentation
 
Building your first app with MongoDB
Building your first app with MongoDBBuilding your first app with MongoDB
Building your first app with MongoDB
 
Asp.net Programming Training (Web design, Web development)
Asp.net Programming Training (Web design, Web  development)Asp.net Programming Training (Web design, Web  development)
Asp.net Programming Training (Web design, Web development)
 
NOSQL and MongoDB Database
NOSQL and MongoDB DatabaseNOSQL and MongoDB Database
NOSQL and MongoDB Database
 

Dernier

Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 

Dernier (20)

Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 

MongoDB

  • 1. Web Data Management, Search and Retrieval Course (MCOM7348) University of Birzeit, Palestine January, 2014 Synthesis Paper Talk Nosql Database Fayez shayeb bbbbb Master of Computing, Birzeit University Fayez.aauj@hotmail.com Master of Computing, Birzeit University bbbbbbb@yahoo.com This is a student talk, at the Web Data Management, Search and Retrieval Course, each student is is asked to present his/her synthesis paper. Course Page: http://jarrar-courses.blogspot.com/2013/11/web-data-management.html 1
  • 2. Document-oriented database • document-oriented database is a computer program designed for storing, retrieving, and managing document-oriented, or semi structured data, information
  • 3. Comparison  Document db  Relational Article - id - authorid - title - content Author - id - name - email Comment - id - articleid - message Article - _id - title - content - author - _id - name - email - comments[]
  • 4. Concepts  Joins  No joins  Joins at "design time", not at "query time“  Due to embedded docs and arrays less joins are needed  Constraints  No foreign key constraints  Unique indexes  Transactions  No commit/rollback  Atomic operations  Multiple actions inside the same document  Incl. embedded documents
  • 5. Benefits  Scalable: good for a lot of data / traffic  Horizontal scaling: to more nodes  Good for web-apps  Performance  No joins and constraints  Dev/user friendly  Data is modeled to how the app is going to use it  No conversion between object oriented > relational  No static schema = agile
  • 6. One-to-many  Embedded array / array keys  Some queries get harder  You can index arrays!  Normalized approach  More flexibility  A lot less performance Article - _id - content - tags: {“foo”, “bar”} - comments: {“id1”, “id2”}
  • 7. many-to-many  Using array keys  No join table  References on both sides Article - _id - content - category_ids : {“id1”, “id2”} Category - _id - name - article_ids: {“id7”, “id8”}  Advantage: simple queries articles.Where(p => p.CategoryIds.Contains(categoryId)) categories.Where(c => c.ArticleIds.Contains(articleId))  Disadvantage: duplication, update two docs
  • 8. json • • • Stands for Javascript Object Notation Derived from Javascript scripting language Used for representing simple data structures and associative arrays { { "_id": "BCCD12CBB", "type": "person", "name": "Darth Vader", "age": 63, "headware": ["Helmet", "Sombrero"], "dark_side": true } "_id": "BCCD12CBC", "type": "person", "name": "Luke", "age": 35, "powers": ["Pull", "Jedi Mind Trick"], "dark_side": false }
  • 9. Replication  Only one server is active for writes (the primary, or master) at a given time – this is to allow strong consistent (atomic) operations. One can optionally send read operations to the secondaries when eventual consistency semantics are acceptable.
  • 10. Sharding  Sharding is the partitioning of data among multiple machines in an order-preserving manner.(horizontal scaling ) Machine 1 Machine 2 Machine 3 Alabama → Arizona Colorado → Florida Arkansas → California Indiana → Kansas Idaho → Illinois Georgia → Hawaii Maryland → Michigan Kentucky → Maine Minnesota → Missouri Montana → Montana Nebraska → New Jersey Ohio → Pennsylvania New Mexico → North Dakota Rhode Island → South Dakota Tennessee → Utah Vermont → West Virgina Wisconsin → Wyoming
  • 11. Sharding  The set of servers/mongod process within the shard comprise a replica set
  • 12. Replication & Sharding conclusion  sharding is the tool for scaling a system, and replication is the tool for data safety, high availability, and disaster recovery. The two work in tandem yet are orthogonal concepts in the design.
  • 14. What is MongoDB?  Creator: 10 gen, former doublick  Name: short for humongous (  Language: C++ )
  • 15. What is MongoDB?  Defination: MongoDB is an open source, document- oriented database designed with both scalability and developer agility in mind. Instead of storing your data in tables and rows as you would with a relational database, in MongoDB you store JSON-like documents with dynamic schemas(schemafree, schemaless).
  • 16. What is MongoDB?  Goal: bridge the gap between key-value stores (which are fast and scalable) and relational databases (which have rich functionality).
  • 19. MongoDB Data model  Data model: Using BSON (binary JSON), developers can easily map to modern object-oriented languages without a complicated ORM layer.  BSON is a binary format in which zero or more key/value pairs are stored as a single entity.  lightweight, traversable, efficient
  • 23. Query MongoDB Vs sql? SQL mongodb Create table db.CreateCollection() Insert into db.coll.save() select db.coll.find() update db.coll.update delete db.coll.remove() drop db.coll.drop()
  • 26. API for MongoDB : C C++ C# Erlang Haskell Java node.js PHP Perl Python Ruby Scala (Casbah)