Why NoSQL Makes Sense
-
Upload
mongodb -
Category
Technology
-
view
917 -
download
3
description
Transcript of Why NoSQL Makes Sense
Why NoSQL Makes Sense
and when to use something else?
Dwight Merriman / 10gen / MongoDB
The Scaling Imperative
It already was needed but now...
http://www.globalnerdy.com/2007/09/07/multicore-musings/
cloud
commodity
NoSQL = Non-relational next generation operation data stores
and databases
no joins +light transactional semantics = horizontally scalable architectures
Scaling Out
distribution & query models
Consistent hashing
Order preserving range chunking
Scatter gather
Data models
no joins +light transactional semantics = horizontally scalable architectures
Important side effect : new data models = improved ways to develop apps (“Agility”)
{ _id : ObjectId("4e2e3f92268cdda473b628f6"),title : “Too Big to Fail”,when : Date(“2011-07-26”),author : “joe”,text : “blah”
}
{ _id : ObjectId("4e2e3f92268cdda473b628f6"),title : “Too Big to Fail”,when : Date(“2011-07-26”),author : “joe”,text : “blah”,tags : [“business”, “news”, “north america”]
}
> db.posts.find( { tags : “news” } )
{ _id : ObjectId("4e2e3f92268cdda473b628f6"),title : “Too Big to Fail”,when : Date(“2011-07-26”),author : “joe”,text : “blah”,tags : [“business”, “news”, “north america”],votes : 3,voters : [“dmerr”, “sj”, “jane” ]
}
{ _id : ObjectId("4e2e3f92268cdda473b628f6"),title : “Too Big to Fail”,when : Date(“2011-07-26”),author : “joe”,text : “blah”,tags : [“business”, “news”, “north america”],votes : 3,voters : [“dmerr”, “sj”, “jane” ],comments : [
{ by : “tim157”, text : “great story” },{ by : “gora”, text : “i don’t think so” },{ by : “dmerr”, text : “also check out...” }
]}
{ _id : ObjectId("4e2e3f92268cdda473b628f6"),title : “Too Big to Fail”,when : Date(“2011-07-26”),author : “joe”,text : “blah”,tags : [“business”, “news”, “north america”],votes : 3,voters : [“dmerr”, “sj”, “jane” ],comments : [
{ by : “tim157”, text : “great story” },{ by : “gora”, text : “i don’t think so” },{ by : “dmerr”, text : “also check out...” }
]}
> db.posts.find({title:”Too Big to Fail”})
`
{ _id : ObjectId("4e2e3f92268cdda473b628f6"),title : “Too Big to Fail”,when : Date(“2011-07-26”),author : “joe”,text : “blah”,tags : [“business”, “news”, “north america”],votes : 3,voters : [“dmerr”, “sj”, “jane” ],comments : [
{ by : “tim157”, text : “great story” },{ by : “gora”, text : “i don’t think so” },{ by : “dmerr”, text : “also check out...” }
]}
> db.posts.find( { “comments.by” : “gora” } )> db.posts.ensureIndex( { “comments.by” : 1 } )
the db space 2000 - 2010
OLTP / operational
BI / reporting
+ great for complex transactions+ great for tabular data+ ad hoc queries easy- O<->R mapping hard- speed/scale challenges- not super agile
+ ad hoc queries easy+ SQL gives us a standard protocol for the interface between clients and servers+ scales horizontally better than operational dbs. some scale limits at massive scale- schemas are rigid- real time is hard; very good at bulk nightly data loads
the db space 2000 - 2010
OLTP / operational
BI / reporting
+ great for complex transactions+ great for tabular data+ ad hoc queries easy- O<->R mapping hard- speed/scale challenges- not super agile
+ ad hoc queries easy+ SQL gives us a standard protocol for the interface between clients and servers+ scales horizontally better than operational dbs. some scale limits at massive scale- schemas are rigid- real time is hard; very good at bulk nightly data loads
less issues here
the db space 2000 - 2010
OLTP / operational
BI / reporting
+ great for complex transactions+ great for tabular data+ ad hoc queries easy- O<->R mapping hard- speed/scale challenges- not super agile
+ ad hoc queries easy+ SQL gives us a standard protocol for the interface between clients and servers+ scales horizontally better than operational dbs. some scale limits at massive scale- schemas are rigid- real time is hard; very good at bulk nightly data loads
caching
flat filesmap/reduce
app layer partitioning
the db space
scalable nonrelational
(“nosql”)
OLTP / operational
BI / reporting
+ fits OO programming well+ agile+ speed/scale- querying a little less add hoc- not super transactional- not sql
Thanks
Dwight MerrimanCEO 10gen
http://blog.mongodb.org/@mongodb
me - @[email protected]
www.mongodb.orgwww.mongodb.org/display/DOCS/Events