• Like
NoSQL with Mongodb
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

NoSQL with Mongodb

  • 255 views
Published

 

Published in Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
255
On SlideShare
0
From Embeds
0
Number of Embeds
1

Actions

Shares
Downloads
8
Comments
0
Likes
1

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide
  • Need to keep message tight so….??

Transcript

  • 1. The Trusted Technology Partner in Business Innovation August 2010 August 2010 July 2010 June 2010 Ranked as one of the top Ranked as one of the top Named Microsoft Partner of CRN Magazines list of the technology solution providers technology solution providers the Year Finalist in 2 separate largest solution providers in in America by CRN Magazine in America by CRN Magazine categories North America for the past 4 years. for the past 4 years. 2009 2010 2007 2008The Trusted Technology Partner in Business InnovationProducts | Consulting Services | Managed Services
  • 2. NoSQL With MongoDB Select fun, profit from real_world where relational=false Nagaraja S Senior Consultant I Nagaraja.s@neudesic.com twitter.com/nagarajshanbhogThe Trusted Technology Partner in Business InnovationProducts | Consulting Services | Managed Services
  • 3. Agenda • NoSQL!!!! …… ? • Why NoSQL? • NoSQL Use Cases • NoSQL Databases • Overview on MongoDB • Set up MongoDB • DEMO • MongoDB driver for .net • DEMOThe Trusted Technology Partner in Business InnovationProducts | Consulting Services | Managed Services
  • 4. NoSQL!!!!....? • NoSQL != NO SQL • NOSQL == Not Only SQL • Subjective term (like Web 2.0) • Usually do not require a fixed table schema nor do they use the concept of joins (Cont…)The Trusted Technology Partner in Business InnovationProducts | Consulting Services | Managed Services
  • 5. NoSQL!!!....? • Coined in 1998 by “Carlos Strozzi” to describe a database that did not expose a SQL interface • In 2008, Eric Evans Reintroduced the term to describe the growing non- RDBMS movement • Broadly refers to a set of data stores that do not use SQL or a relational model to store data • Popularized by large web sites such as Google, Facebook, Twitter and Digg etc...The Trusted Technology Partner in Business InnovationProducts | Consulting Services | Managed Services
  • 6. Why NoSQL..? • Modern relational databases simply do not scale to internet proportions • Sites like Digg,Facebook and Ebay have datasets 10s and 100s of TB large • ACID support isn’t required for blogs, status updates, product listings etc • Reduce Object relational impedanceThe Trusted Technology Partner in Business InnovationProducts | Consulting Services | Managed Services
  • 7. Why NoSQL..? • GOOD BAD • Flexible (Schema-less) Immature • Very scalable No common standards • Simple to use and operate Poor transaction support • Eventually consistent Poor query support • Cheap New Mindset required • Suited to web applicationsThe Trusted Technology Partner in Business InnovationProducts | Consulting Services | Managed Services
  • 8. NoSQL Use Cases • Good Example – Logging data Shopping carts – Favorites Session Data • Stick with RDBMS – Transactions (Orders etc.) LOB applications – Anything involves $$$ Business-critical data – ReportingThe Trusted Technology Partner in Business InnovationProducts | Consulting Services | Managed Services
  • 9. NoSQL Databases • XML (myXMLDB, Tamino, Senda) • Wide Column ( Cassandra, Hbase, Big Table) • Key/Value (Redis, MemCached with BerkelyDB) • Graph (neo4j, InfoGrid) • Document store ( CouchDB, MongoDB)The Trusted Technology Partner in Business InnovationProducts | Consulting Services | Managed Services
  • 10. Overview On MongoDB • Open source, Document oriented database • 10gen corporate entity behind development • Basics – Document in a MongoDB database are stored in schema-less collections – Documents are stored in BSON (Binary JSON) – JavaScript used to Query and Manipulate collections – Each item in a collection has a unique (primary) key called an “ObjectID”The Trusted Technology Partner in Business InnovationProducts | Consulting Services | Managed Services
  • 11. SQL to Mongo Mapping Chart SQL term Mongo term Database Databse Table Collection Index Index Row BSON Document Column BSON Field Join Embedding and linking Primary key _id fieldThe Trusted Technology Partner in Business InnovationProducts | Consulting Services | Managed Services
  • 12. Installing MongoDB on Windows • Download the binaries from “mongodb.org” • Create a directory “C:datadb” • Run “Mongod.exe” from the command line • Run “Mongo.exe” to execute commandsThe Trusted Technology Partner in Business InnovationProducts | Consulting Services | Managed Services
  • 13. SQL statement Mongo statement Create table users ( a Number, b Number) Implicit; can also by done by explicit db.createCollection(”user”) Insert into users values (4,5) db.users.insert ( { a:3, b:5 } ) Select * from users db.users.find() SELECT * FROM users WHERE age=33 db.users.find({age:33}).sort({name:1}) ORDER BY name SELECT a,b FROM users WHERE age=33 db.users.find({age:33}, {a:1,b:1}) SELECT * FROM users WHERE name LIKE db.users.find({name:/Joe/}) "%Joe%" SELECT * FROM users WHERE name LIKE db.users.find({name:/^Joe/}) "Joe%" SELECT * FROM users WHERE age>33 AND db.users.find({age:{$gt:33,$lte:40}}) age<=40The Trusted Technology Partner in Business InnovationProducts | Consulting Services | Managed Services
  • 14. MongoDBThe Trusted Technology Partner in Business InnovationProducts | Consulting Services | Managed Services
  • 15. For further reference • http://try.mongodb.org/ - Try Commands • http://nosql-database.org/ • http://www.mongodb.org/ • http://github.com/mongodb/mongo-csharp-driver/downloads.The Trusted Technology Partner in Business InnovationProducts | Consulting Services | Managed Services
  • 16. Thank YouThe Trusted Technology Partner in Business InnovationProducts | Consulting Services | Managed Services