SELECT * FROM old_sql_database WHERE db_name LIKE “%sql”
Structured Query Language
Since 1970
No, NoSQL
SELECT * FROM old_sql_database WHERE db_name LIKE “%sql”
noSQL
No JOINs + No complex transactions =
Horizontal Scalability!
NoSQL realy means:
non-relational, next-generation
oper...
http://www.mongodb.org/display/DOCS/Production+Deployments
MongoDB bridges the gap between key-value stores (which are
fast and highly scalable) and traditional RDBMS systems (which...
Easy to start
# wget http://fastdl.mongodb.org/linux/mongodb-linux-i686-1.6.3.tgz
# tar -zvxf mongodb-linux-i686-1.6.3.tgz...
Easy to use
# ./mongo
Easy to start
# ./mongo
MongoDB shell version: 1.6.3
connecting to: test
>
Easy to use
# ./mongo
MongoDB shell version: 1.6.3
connecting to: test
> db.foo.save( { a : 1 } )
>
Easy to use
# ./mongo
MongoDB shell version: 1.6.3
connecting to: test
> db.foo.save( { a : 1 } )
> db.foo.find()
Easy to use
# ./mongo
MongoDB shell version: 1.6.3
connecting to: test
> db.foo.save( { a : 1 } )
> db.foo.find()
{ "_id" ...
Flexible “Schemas”
# ./mongo
MongoDB shell version: 1.6.3
connecting to: test
> db.foo.save( { a : 1 } )
> db.foo.find()
{...
Flexible “Schemas”
# ./mongo
MongoDB shell version: 1.6.3
connecting to: test
> db.foo.save( { a : 1 } )
> db.foo.find()
{...
Flexible “Schemas”
# ./mongo
MongoDB shell version: 1.6.3
connecting to: test
> db.foo.save( { a : 1 } )
> db.foo.find()
{...
Dynamic Quries
> db.foo.find({b:2})
{ "_id" : ObjectId("4ccb4780583566419bd0f444"), "a" : 1, "b" : 2 }
Dynamic Quries
> db.foo.find({b:2})
{ "_id" : ObjectId("4ccb4780583566419bd0f444"), "a" : 1, "b" : 2 }
Last 10 Pages
> db....
Dynamic Quries
> db.foo.find({b:2})
{ "_id" : ObjectId("4ccb4780583566419bd0f444"), "a" : 1, "b" : 2 }
Last 10 Pages
> db....
Focus on performance
depth of functionality
scalability&performance
•memcached
•key/value
•RDBMS
http://www.mongodb.org
http://try.mongodb.org
http://nosql.mypopescu.com
Мартин Лазаров
@mlazarov
lazarov@mail.bg
http://marto.lazarov.org
MongoDB
Upcoming SlideShare
Loading in …5
×

MongoDB

1,908 views
1,813 views

Published on

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

  • Be the first to like this

No Downloads
Views
Total views
1,908
On SlideShare
0
From Embeds
0
Number of Embeds
312
Actions
Shares
0
Downloads
24
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

MongoDB

  1. 1. SELECT * FROM old_sql_database WHERE db_name LIKE “%sql” Structured Query Language Since 1970
  2. 2. No, NoSQL SELECT * FROM old_sql_database WHERE db_name LIKE “%sql”
  3. 3. noSQL No JOINs + No complex transactions = Horizontal Scalability! NoSQL realy means: non-relational, next-generation operational datastores and databases
  4. 4. http://www.mongodb.org/display/DOCS/Production+Deployments
  5. 5. MongoDB bridges the gap between key-value stores (which are fast and highly scalable) and traditional RDBMS systems (which provide rich queries and deep functionality). MongoDB (from "humongous") is a scalable, high-performance, open source, document-oriented database. Written in C++, MongoDB features: • Document-oriented storage »JSON-style documents with dynamic schemas offer simplicity and power. • Full Index Support »Index on any attribute, just like you're used to. • Replication & High Availability »Mirror across LANs and WANs for scale and peace of mind. • Auto-Sharding »Scale horizontally without compromising functionality. • Querying »Rich, document-based queries. • Fast In-Place Updates »Atomic modifiers for contention-free performance. • Map/Reduce »Flexible aggregation and data processing. • GridFS »Store files of any size without complicating your stack. • Commercial Support »Commercial support, training, and consulting available.
  6. 6. Easy to start # wget http://fastdl.mongodb.org/linux/mongodb-linux-i686-1.6.3.tgz # tar -zvxf mongodb-linux-i686-1.6.3.tgz # cd mongodb-linux-i686-1.6.3/bin # ./mongod --fork –logpath=/var/log/mongo.log
  7. 7. Easy to use # ./mongo
  8. 8. Easy to start # ./mongo MongoDB shell version: 1.6.3 connecting to: test >
  9. 9. Easy to use # ./mongo MongoDB shell version: 1.6.3 connecting to: test > db.foo.save( { a : 1 } ) >
  10. 10. Easy to use # ./mongo MongoDB shell version: 1.6.3 connecting to: test > db.foo.save( { a : 1 } ) > db.foo.find()
  11. 11. Easy to use # ./mongo MongoDB shell version: 1.6.3 connecting to: test > db.foo.save( { a : 1 } ) > db.foo.find() { "_id" : ObjectId("4ccb4699583566419bd0f443"), "a" : 1 } >
  12. 12. Flexible “Schemas” # ./mongo MongoDB shell version: 1.6.3 connecting to: test > db.foo.save( { a : 1 } ) > db.foo.find() { "_id" : ObjectId("4ccb4699583566419bd0f443"), "a" : 1 } > db.foo.save( { a : 1, b: 2} ) >
  13. 13. Flexible “Schemas” # ./mongo MongoDB shell version: 1.6.3 connecting to: test > db.foo.save( { a : 1 } ) > db.foo.find() { "_id" : ObjectId("4ccb4699583566419bd0f443"), "a" : 1 } > db.foo.save( { a : 1, b: 2} ) > db.foo.find()
  14. 14. Flexible “Schemas” # ./mongo MongoDB shell version: 1.6.3 connecting to: test > db.foo.save( { a : 1 } ) > db.foo.find() { "_id" : ObjectId("4ccb4699583566419bd0f443"), "a" : 1 } > db.foo.save( { a : 1, b: 2} ) > db.foo.find() { "_id" : ObjectId("4ccb4699583566419bd0f443"), "a" : 1 } { "_id" : ObjectId("4ccb4780583566419bd0f444"), "a" : 1, "b" : 2 } >
  15. 15. Dynamic Quries > db.foo.find({b:2}) { "_id" : ObjectId("4ccb4780583566419bd0f444"), "a" : 1, "b" : 2 }
  16. 16. Dynamic Quries > db.foo.find({b:2}) { "_id" : ObjectId("4ccb4780583566419bd0f444"), "a" : 1, "b" : 2 } Last 10 Pages > db.pages.find({date:-1}).limit(10)
  17. 17. Dynamic Quries > db.foo.find({b:2}) { "_id" : ObjectId("4ccb4780583566419bd0f444"), "a" : 1, "b" : 2 } Last 10 Pages > db.pages.find({date:-1}).limit(10) Page since 1 October > oct_1 = new Date(2010, 10, 1) > db.pages.find({date: {$gt: oct_1}}
  18. 18. Focus on performance depth of functionality scalability&performance •memcached •key/value •RDBMS
  19. 19. http://www.mongodb.org http://try.mongodb.org http://nosql.mypopescu.com
  20. 20. Мартин Лазаров @mlazarov lazarov@mail.bg http://marto.lazarov.org

×