Date post: | 06-May-2015 |
Category: |
Technology |
Upload: | david-green |
View: | 697 times |
Download: | 0 times |
MongoDB
AGENDA
• Introduction
• NoSQL
• MongoDB
• Concepts/Fundamentals
• Working with MongoDB (hands-on)
WHO AM I?
• Software Developer/Architect/Consultant for 15 years.
• Working in the .NET stack (mainly in the web space) since 2001.
• Started getting interested in MongoDB about 2-3 years ago.
David Green
@davidjeetabout.me/davidgreen24
WHERE DOES THIS TALK FIT IN?
CLASSIC N-TIER ARCHITECTURE
User Interface (UI)
Business Layer/Service
Data LayerYou Are Here
AGENDA
• Introduction
• NoSQL
• MongoDB
• Concepts/Fundamentals
• Working with MongoDB (hands-on)
WHAT IS NOSQL?
All Databases
Relational Databases (Oracle, mySQL,
Postgres, SQL Server)
NoSQL(MongoDB, Redis, Neo4J, Cassandra,
Hbase)
No schema enforcedOpen source
Designed to run on large clusters
Not using the relational model
Model not using the SQL
language)
What is NoSQL?Martin Fowler: Some characteristics are common amongst these databases, but none are definitional.
NoSQL Database Families*
• HBase• Cassandra• Hypertable
Columnar • Redis
• Riak• Memcached• Voldemort
Key-value
• MongoDB• CouchDB• RavenDB
Document • Neo4J
• GiraffeDB• InfiniteGraph
Graph
* “Seven Databases in Seven Weeks”, Eric Redmond and Jim R. Wilson
memCachedX
SQL ServerX
MongoDB
X
WHO USES THIS NOSQL STUFF?
AGENDA
• Introduction
• NoSQL
• MongoDB
• Concepts/Fundamentals
• Working with MongoDB (hands-on)
WHAT IS MONGODB?
WHAT IS MONGODB?
Open source NoSQL
database
Document-oriented
Stores JSON-like documents
(dynamic schemas)
Includes a strong query
language (Javascript)
Powerful, flexible
indexing (including
geospatial)
Sharding and replication
Cross-Platform (many drivers – e.g. C#, Java, Python, Ruby)
Why MongoDB?
1. Open Source - no licensing fees.
2. Relatively developer friendly and easy to ramp up.
3. Fast reads.
MongoDB Search Trends – Google
WHEN NOT TO USE MONGODB
• Relationships/Join
• Transactions
• Write Safety (High volume of writes/sec. scenarios)
When one or more of the following are insurmountable even after modeling:
AGENDA
• Introduction
• NoSQL
• MongoDB
• Concepts/Fundamentals
• Working with MongoDB (hands-on)
MONGODB FUNDAMENTALS
10GEN QUICK REFERENCE CARD
MONGODB - JSON & BSON
JSON Number String Boolean Array Object null
BSON = JSON + ObjectId DateTime Byte Arrays GeoSpatial
EXAMPLE BSON DOCUMENT{ "_id" : ObjectId("5218282429f4a04648f64870"), "Title": "What's new in MongoDB 2.4", "Content" : "MongoDB 2.4 represents hundreds of
improvements and features driven by user requests...",
"Author" : { "FirstName" : "David", "LastName" : "Green" }, "CreatedOn" : ISODate("2013-07-19T01:30:52Z"), "LastModifiedOn" : ISODate("2013-08-24T03:27:32Z"), "Comments" : [], "Tags" : [ ”Databases", ”Features", "NoSQL", "MongoDB" ]}
INSTALLING MONGO
MONGODB DATABASE INSTALL
Starting Up the Server
USING THE CONSOLE
AGENDA
• Introduction
• NoSQL
• MongoDB
• Concepts/Fundamentals
• Working with MongoDB (hands-on)
https://github.com/davidjeet/OpenDataDay/
THE END