0
by Klevis
Mino
What is NoSQL?
 NoSQL features
 NoSQL database types
 What is MongoDB?
 Who uses MongoDB?
 Installation and Running
...
What is NoSQL?
Definition: “Next generation databases mostly
addressing some of the points: being non-relational,
distribu...
What is NoSQL?
Definition: “Next generation databases mostly
addressing some of the points: being non-relational,
distribu...
What is MongoDB?
Definition: “MongoDB (from "humongous") is an
open-source document database that provides high
performanc...
Who uses MongoDB?
Installation




Download MongoDB from mongodb.org
Extract to local disk C:
Rename the extracted folder to “mongodb”

R...
Documents and Collections


A document is the basic unit of data. Documents
are stored on disk in BSON (binary JSON)
seri...
Documents and Collections


A collection is a group of documents (equivalent to
a table in a RDBMS). A collection exists ...
MongoDB features
Querying
 Indexing
 Replication
 Load balancing
 File storage
 Aggregation
 Server-side JavaScrip e...
Querying
MongoDB supports search by field, range queries,
regular expression searches.
Querying
The find() method returns a cursor to the results
To display all the results:
var c = db.testData.find()
while ( ...
Querying
Projections
Used to return or exclude certain fields of matching
documents in a query.
Indexing
Indexes provide high performance read operations
for frequently used queries. Indexes are special data
structures...
Replication
MongoDB provides high availability and increased
throughput with replica sets. A replica set consists of
two o...
Load balancing
MongoDB scales horizontally using sharding. The
user chooses a shard key, which determines how the
data in ...
File storage
MongoDB can be used as a file system, taking
advantage of load balancing and data replication
features over m...
Aggregation
MapReduce can be used for batch processing of
data and aggregation operations. The aggregation
framework enabl...
References
mongodb.org
 nosql-database.org
 db-engines.com
 wikipedia.org
 Carlo Vaccari’s lecture on Big Data

Upcoming SlideShare
Loading in...5
×

Klevis Mino: MongoDB

698

Published on

Project by Klevis Mino
Course "Innovation and New Technologies" - University of Camerino
(teacher C. Vaccari)

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
698
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
6
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Transcript of "Klevis Mino: MongoDB"

  1. 1. by Klevis Mino
  2. 2. What is NoSQL?  NoSQL features  NoSQL database types  What is MongoDB?  Who uses MongoDB?  Installation and Running  Documents and Collections  MongoDB features        Querying Indexing Replication Load balancing File storage Aggregation
  3. 3. What is NoSQL? Definition: “Next generation databases mostly addressing some of the points: being non-relational, distributed, open source and horizontally scalable… schema-free, easy replication support, simple API, eventually consistent, huge amount of data…” - nosql-database.org
  4. 4. What is NoSQL? Definition: “Next generation databases mostly addressing some of the points: being non-relational, distributed, open source and horizontally scalable… schema-free, easy replication support, simple API, eventually consistent, huge amount of data…” NoSQL database types • • • • Document databases Graph stores Key-value stores Wide-column stores - nosql-database.org
  5. 5. What is MongoDB? Definition: “MongoDB (from "humongous") is an open-source document database that provides high performance, high availability, and automatic scaling.” - mongodb.org Key features High performance  High availability  Automatic scaling 
  6. 6. Who uses MongoDB?
  7. 7. Installation    Download MongoDB from mongodb.org Extract to local disk C: Rename the extracted folder to “mongodb” Running MongoDB    Create a folder to store files, C:datadb To start MongoDB with Command Prompt: C:mongodbbinmongod.exe Open another CMD and execute: C:monogodbbinmongo.exe
  8. 8. Documents and Collections  A document is the basic unit of data. Documents are stored on disk in BSON (binary JSON) serialization format. { name: “klevis”, value age: 21, value status: “A”, groups: [ “news”, “sports” ] } field: field: field: value field: value
  9. 9. Documents and Collections  A collection is a group of documents (equivalent to a table in a RDBMS). A collection exists within a single database.
  10. 10. MongoDB features Querying  Indexing  Replication  Load balancing  File storage  Aggregation  Server-side JavaScrip execution  Capped collections 
  11. 11. Querying MongoDB supports search by field, range queries, regular expression searches.
  12. 12. Querying The find() method returns a cursor to the results To display all the results: var c = db.testData.find() while ( c.hasNext() ) printjson( c.next() ) To limit the number of results db.testData.find().limit(3) To print a certain result printjson( c [1] ) Searching for certain values of a field db.testData.find({x:3})
  13. 13. Querying Projections Used to return or exclude certain fields of matching documents in a query.
  14. 14. Indexing Indexes provide high performance read operations for frequently used queries. Indexes are special data structures that store a small portion of the collection’s data set in an easy to traverse form.
  15. 15. Replication MongoDB provides high availability and increased throughput with replica sets. A replica set consists of two or more copies of the data. Each replica may act in the role of primary or secondary replica at any time.
  16. 16. Load balancing MongoDB scales horizontally using sharding. The user chooses a shard key, which determines how the data in a collection will be distributed. The data is split into ranges and distributed across multiple shards. MongoDB can run over multiple servers, balancing the load and/or duplicating data to keep the system up and running in case of hardware failure. Automatic configuration is easy to deploy, and new machines can be added to a running database.
  17. 17. File storage MongoDB can be used as a file system, taking advantage of load balancing and data replication features over multiple machines for storing files. The function GriFS is included with MongoDB drivers and available with no difficulty for development languages. MongoDB exposes functions for file manipulation and content to developers. In a multimachine MongoDB system, files can be distributed and copied multiple times between machines transparently, thus effectively creating a loadbalanced and fault-tolerant system.
  18. 18. Aggregation MapReduce can be used for batch processing of data and aggregation operations. The aggregation framework enables users to obtain the kind of results for which the SQL GROUP BY clause is used.
  19. 19. References mongodb.org  nosql-database.org  db-engines.com  wikipedia.org  Carlo Vaccari’s lecture on Big Data 
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×