Brief overview of NoSQL & MongoDB for GTUG Tbilisi Event

  • 743 views
Uploaded on

Brief overview of NoSQL & MongoDB for GTUG Tbilisi Event

Brief overview of NoSQL & MongoDB for GTUG Tbilisi Event

More in: Technology , Education
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
743
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
4
Comments
0
Likes
0

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

Transcript

  • 1. NoSQL Ioseb Dzmanashvili Lead Architect @ Picktek Teacher @ Caucasus School of TechnologyMonday, April 2, 2012
  • 2. NoSQL is a ill-defined and volatile field © Martin FowlerMonday, April 2, 2012
  • 3. It actually means: Not Only SQLMonday, April 2, 2012
  • 4. NoSQL SQL MongoDB MySql CouchDB Oracle Redis M$SQL Neo4j PostgreSQL Cassandra SQLiteMonday, April 2, 2012
  • 5. NoSQL Kinds • Document Oriented • Key Value Oriented • Graph Oriented • ... • Something else OrientedMonday, April 2, 2012
  • 6. Other NoSQL Characteristics • No Relational Structures • No JOIN Queries • No Schema • No Complex TransactionsMonday, April 2, 2012
  • 7. MongoDB open-source, high-performance, document-oriented database © MongoDBMonday, April 2, 2012
  • 8. Why MongoDB? It is not the strongest of the species that survives, nor the most intelligent. It is the one that is most adaptable to change. © Charles DarwinMonday, April 2, 2012
  • 9. Flexible Structure db.blogposts.insert({ name: "ioseb", date: "2012-04-01", title: "NoSQL Sucks", summary: "Yes it Sucks", content: "..." });Monday, April 2, 2012
  • 10. Flexible Structure db.blogposts.update({ name: "ioseb" }, { name: "ioseb", date: "2012-04-01", title: "NoSQL is Cool!", summary: "Yes its Cool!", content: "...", tags: [ "nosql", "sql" ] } );Monday, April 2, 2012
  • 11. Flexible Structure var comment = { name: "john doe", email: "john@doe.com", comment: "NoSQL Rulez!!!" }; db.blogposts.update({ name: "ioseb" }, { $push: { comments: comment } } );Monday, April 2, 2012
  • 12. Flexible Structure var post = db.blogposts.find( {name: "ioseb"} );Monday, April 2, 2012
  • 13. Flexible Structure { name: "ioseb", date: "2012-04-01", title: "NoSQL is Cool!", summary: "Yes its Cool!", content: "...", tags: [ "nosql", "sql" ], comments: [ {author: "john", email: "john@doe.com", ...} ] }Monday, April 2, 2012
  • 14. Flexible Indexing // index by name db.blogposts.ensureIndex( {name: true} ); // index by tags array db.blogposts.ensureIndex( {tags: true} ); // index by comments authors db.blogposts.ensureIndex( {"comments.author": true} );Monday, April 2, 2012
  • 15. Replica Sets • Asynchronous master/slave replication • Automatic failover • Automatic recovery • Consists of two or more nodes • Automatic primary node electionMonday, April 2, 2012
  • 16. ...Replica Sets Member 2 Member 1 Read Member 3 Primary Read/Write ClientMonday, April 2, 2012
  • 17. Easy Configuration config = {_id: GTUG, members: [ {_id: 0, host: localhost:27017}, {_id: 1, host: localhost:27018}, {_id: 2, host: localhost:27019} ]} rs.initiate(config);Monday, April 2, 2012
  • 18. ...Replica Sets Arbiter Member 2 Arbiter No Data Member 1 Read Member 3 Primary Read/Write ClientMonday, April 2, 2012
  • 19. Easy Configuration config = {_id: GTUG, members: [ {_id: 0, host: localhost:27017}, {_id: 1, host: localhost:27018}, {_id: 2, host: localhost:27019, arbiterOnly: true} ]} rs.initiate(config);Monday, April 2, 2012
  • 20. Questions?Monday, April 2, 2012
  • 21. Thank You!Monday, April 2, 2012