com presentations: Mongo Introduction talk for ConFoo.: mongo-confoo13.xml slides/mongodb/aggregation-example-cuisine1-match.xml
slides/mongodb/aggregation-example-cuisine2-unwind.xml slides/mongodb/aggregation-example-cuisine3-match.xml
slides/mongodb/aggregation-example-cuisine4-group.xml slides/mongodb/aggregation-example-cuisine5-group-with-sum.xml
slides/mongodb/aggregation-example-cuisine6-sort.xml slides/mongodb/idx-cities-by-pop-and-dem6.

From: Date: Mon, 25 Feb 2013 17:37:58 +0000
Subject: com presentations: Mongo Introduction talk for ConFoo.: mongo-confoo13.xml slides/mongodb/aggregation-example-cuisine1-match.xml
slides/mongodb/aggregation-example-cuisine2-unwind.xml slides/mongodb/aggregation-example-cuisine3-match.xml
slides/mongodb/aggregation-example-cuisine4-group.xml slides/mongodb/aggregation-example-cuisine5-group-with-sum.xml
slides/mongodb/aggregation-example-cuisine6-sort.xml slides/mongodb/idx-cities-by-pop-and-dem6.
Groups: php.pres 
Request: Send a blank email to pres+get-1871@lists.php.net to get a copy of this message
Commit: 7bf1c524266f1f684b42cf793280ac18f701d234 Author: Derick Rethans <github@derickrethans.nl> Mon, 25 Feb 2013 18:37:58 +0100 Parents: 7b9f39bc3ac9716733a4a2d9d8257f9d37835471 Branches: master Link: http://git.php.net/?p=presentations.git;a=commitdiff;h=7bf1c524266f1f684b42cf793280ac18f701d234 Log: Mongo Introduction talk for ConFoo. Changed paths: A mongo-confoo13.xml M slides/mongodb/aggregation-example-cuisine1-match.xml M slides/mongodb/aggregation-example-cuisine2-unwind.xml M slides/mongodb/aggregation-example-cuisine3-match.xml M slides/mongodb/aggregation-example-cuisine4-group.xml M slides/mongodb/aggregation-example-cuisine5-group-with-sum.xml M slides/mongodb/aggregation-example-cuisine6-sort.xml M slides/mongodb/idx-cities-by-pop-and-dem6.xml M slides/mongodb/idx-recap2.xml M slides/mongodb/one-to-many4.xml M slides/mongodb/replication.xml M slides/mongodb/replset.png M slides/mongodb/resources.xml A slides/mongodb/selling-points.xml M slides/mongodb/sharding2.png M slides/mongodb/title.xml

diff --git a/mongo-confoo13.xml b/mongo-confoo13.xml new file mode 100644 index 0000000..a13c09e --- /dev/null +++ b/mongo-confoo13.xml @@ -0,0 +1,95 @@ +<?xml version="1.0" encoding="utf-8"?> +<presentation css="10gen-strict.css"> +<topic>mongoDB</topic> +<title>MongoDB Introduction</title> +<event>ConFoo 2013</event> +<location>Montréal, Canada</location> +<date>February 27th, 2013</date> +<speaker>Derick Rethans</speaker> +<email>derick@10gen.com</email> +<twitter>derickr</twitter> +<url>http://derickrethans.nl/talks.html</url> +<joindin>http://joind.in/7866</joindin> +<slide>slides/mongodb/title.xml</slide> +<slide>slides/mongodb/databasefield.xml</slide> +<slide>slides/mongodb/me.xml</slide> + +<slide>slides/mongodb/collections-documents.xml</slide> +<slide>slides/mongodb/document.xml</slide> +<slide>slides/mongodb/connecting.xml</slide> +<slide>slides/mongodb/insert.xml</slide> +<slide>slides/mongodb/id.xml</slide> + +<slide>slides/mongodb/query.xml</slide> +<slide>slides/mongodb/query2.xml</slide> +- findOne +- find + +<slide>slides/mongodb/cursors.xml</slide> +- cursor +<slide>slides/mongodb/limit-skip.xml</slide> + +Common Patterns + +- RDBMS-normalisation. + +<slide>slides/mongodb/blog.xml</slide> +<slide>slides/mongodb/blog2.xml</slide> + +<slide>slides/mongodb/considerations.xml</slide> + +**OSMify** +<slide>slides/mongodb/inherit-rdbms.xml</slide> +<slide>slides/mongodb/inherit-mongo.xml</slide> + +<slide>slides/mongodb/osm-to-mongo-data.xml</slide> +<slide>slides/mongodb/osm-to-mongo-data2.xml</slide> +<slide>slides/mongodb/osm-to-mongo-data3.xml</slide> +<slide>slides/mongodb/osm-to-mongo-data4.xml</slide> + +<slide>slides/mongodb/one-to-many2.xml</slide> +<slide>slides/mongodb/one-to-many4.xml</slide> +<slide>slides/mongodb/embed-vs-link.xml</slide> + +<slide>slides/mongodb/commands-aggregation.xml</slide> +<slide>slides/mongodb/aggregation-example-cuisine.xml</slide> +<slide>slides/mongodb/aggregation-example-cuisine1-match.xml</slide> +<slide>slides/mongodb/aggregation-example-cuisine2-unwind.xml</slide> +<slide>slides/mongodb/aggregation-example-cuisine3-match.xml</slide> +<slide>slides/mongodb/aggregation-example-cuisine4-group.xml</slide> +<slide>slides/mongodb/aggregation-example-cuisine5-group-with-sum.xml</slide> +<slide>slides/mongodb/aggregation-example-cuisine6-sort.xml</slide> + +<slide>slides/mongodb/idx-startup-quotes.xml</slide> + +<slide>slides/mongodb/idx-create-php.xml</slide> + +<slide>slides/mongodb/idx-cities-by-name-and-pop.xml</slide> +<slide>slides/mongodb/idx-cities-by-name-and-pop2.xml</slide> +<slide>slides/mongodb/idx-cities-by-pop-and-dem.xml</slide> +<slide>slides/mongodb/idx-cities-by-pop-and-dem2.xml</slide> +<slide>slides/mongodb/idx-cities-by-pop-and-dem4.xml</slide> +<slide>slides/mongodb/idx-cities-by-pop-and-dem6.xml</slide> +<slide>slides/mongodb/idx-cities-by-pop-and-dem5.xml</slide> + +<slide>slides/mongodb/idx-recap1.xml</slide> +<slide>slides/mongodb/idx-recap2.xml</slide> +<slide>slides/mongodb/idx-recap3.xml</slide> + +<slide>slides/mongodb/replication.xml</slide> +- setup +- slaveOk +- journal +- write concerns +- tags (mention briefly) +- php connection string + +<slide>slides/mongodb/sharding.xml</slide> +- mongos +- diagram +- transparent + +<slide>slides/mongodb/selling-points.xml</slide> +<slide>slides/mongodb/resources.xml</slide> + +</presentation> diff --git a/slides/mongodb/aggregation-example-cuisine1-match.xml b/slides/mongodb/aggregation-example-cuisine1-match.xml index 62a4a37..ccd19ab 100644 --- a/slides/mongodb/aggregation-example-cuisine1-match.xml +++ b/slides/mongodb/aggregation-example-cuisine1-match.xml @@ -4,7 +4,7 @@ <example result="3"><![CDATA[<?php $m = new MongoClient(); -$res = $m->demo->poi->aggregate( [ +$res = $m->demo->poiConcat->aggregate( [ /* First we match all documents that have a cuisine tag: */ [ '$match' => [ 'tags' => new MongoRegex( '/^cuisine=/' ) ] ], ] ); diff --git a/slides/mongodb/aggregation-example-cuisine2-unwind.xml b/slides/mongodb/aggregation-example-cuisine2-unwind.xml index 73a3c96..8b0a54e 100644 --- a/slides/mongodb/aggregation-example-cuisine2-unwind.xml +++ b/slides/mongodb/aggregation-example-cuisine2-unwind.xml @@ -4,7 +4,7 @@ <example result="3"><![CDATA[<?php $m = new MongoClient(); -$res = $m->demo->poi->aggregate( [ +$res = $m->demo->poiConcat->aggregate( [ [ '$match' => [ 'tags' => new MongoRegex( '/^cuisine=/' ) ] ], /* Then we unwind all the tags */ [ '$unwind' => '$tags' ], diff --git a/slides/mongodb/aggregation-example-cuisine3-match.xml b/slides/mongodb/aggregation-example-cuisine3-match.xml index 462e7b7..7d608a7 100644 --- a/slides/mongodb/aggregation-example-cuisine3-match.xml +++ b/slides/mongodb/aggregation-example-cuisine3-match.xml @@ -4,7 +4,7 @@ <example result="3"><![CDATA[<?php $m = new MongoClient(); -$res = $m->demo->poi->aggregate( [ +$res = $m->demo->poiConcat->aggregate( [ [ '$match' => [ 'tags' => new MongoRegex( '/^cuisine=/' ) ] ], [ '$unwind' => '$tags' ], /* Match again to get rid of all the useless tags */ diff --git a/slides/mongodb/aggregation-example-cuisine4-group.xml b/slides/mongodb/aggregation-example-cuisine4-group.xml index 545d3ec..79e9d25 100644 --- a/slides/mongodb/aggregation-example-cuisine4-group.xml +++ b/slides/mongodb/aggregation-example-cuisine4-group.xml @@ -4,7 +4,7 @@ <example result="3"><![CDATA[<?php $m = new MongoClient(); -$res = $m->demo->poi->aggregate( [ +$res = $m->demo->poiConcat->aggregate( [ [ '$match' => [ 'tags' => new MongoRegex( '/^cuisine=/' ) ] ], [ '$unwind' => '$tags' ], [ '$match' => [ 'tags' => new MongoRegex( '/^cuisine=/' ) ] ], diff --git a/slides/mongodb/aggregation-example-cuisine5-group-with-sum.xml b/slides/mongodb/aggregation-example-cuisine5-group-with-sum.xml index 78bc7b6..3406115 100644 --- a/slides/mongodb/aggregation-example-cuisine5-group-with-sum.xml +++ b/slides/mongodb/aggregation-example-cuisine5-group-with-sum.xml @@ -4,7 +4,7 @@ <example result="3"><![CDATA[<?php $m = new MongoClient(); -$res = $m->demo->poi->aggregate( [ +$res = $m->demo->poiConcat->aggregate( [ [ '$match' => [ 'tags' => new MongoRegex( '/^cuisine=/' ) ] ], [ '$unwind' => '$tags' ], [ '$match' => [ 'tags' => new MongoRegex( '/^cuisine=/' ) ] ], diff --git a/slides/mongodb/aggregation-example-cuisine6-sort.xml b/slides/mongodb/aggregation-example-cuisine6-sort.xml index d481859..4861ece 100644 --- a/slides/mongodb/aggregation-example-cuisine6-sort.xml +++ b/slides/mongodb/aggregation-example-cuisine6-sort.xml @@ -4,7 +4,7 @@ <example result="3"><![CDATA[<?php $m = new MongoClient(); -$res = $m->demo->poi->aggregate( [ +$res = $m->demo->poiConcat->aggregate( [ [ '$match' => [ 'tags' => new MongoRegex( '/^cuisine=/' ) ] ], [ '$unwind' => '$tags' ], [ '$match' => [ 'tags' => new MongoRegex( '/^cuisine=/' ) ] ], diff --git a/slides/mongodb/idx-cities-by-pop-and-dem6.xml b/slides/mongodb/idx-cities-by-pop-and-dem6.xml index b323b7a..7130f2d 100644 --- a/slides/mongodb/idx-cities-by-pop-and-dem6.xml +++ b/slides/mongodb/idx-cities-by-pop-and-dem6.xml @@ -20,7 +20,8 @@ db.cities.find( { dem: { $gte : 1654 } } ).explain(); } </example> <div effect="fade-in"> -<blurb>MongoDB can not use only the second part of a compound index<br/> (%{ population: 1, dem: 1 }%).</blurb> +<break/> +<blurb>MongoDB uses indexes in order from left to right</blurb> </div> </slide> diff --git a/slides/mongodb/idx-recap2.xml b/slides/mongodb/idx-recap2.xml index 91cccad..09ecfce 100644 --- a/slides/mongodb/idx-recap2.xml +++ b/slides/mongodb/idx-recap2.xml @@ -1,11 +1,27 @@ <slide> <title>Indexes (2)</title> -<blurb>Be aware of redundant indexes. Order is important. With an index on<br/> %{ dem: 1, population: 1 }%:</blurb> -<list> - <bullet>You *don't* need an index on %{ dem: 1 }%.</bullet> - <bullet>You *do* need an index on %{ population: 1 }%.</bullet> - <bullet>The index can be used for sorting on *dem* and then *population*, but not on *population* and then *dem*.</bullet> - <bullet>Range search work best if used on the last field only (remember range on *population* and *dem*).</bullet> -</list> +<blurb>Indexes are used from left to right.</blurb> + +<example inline="1">$c->ensureIndex( [ 'country_code' => 1, 'timezone' => 1, 'asciiname' => 1 ] )</example> +<break/> +<div effect="fade-in"> +<example inline="1">|00aa00|✔| %$c->find(['country_code' => 'GB']);%</example> +<example inline="1">|00aa00|✔| %$c->find(['country_code' => 'GB', 'timezone' => 'Europe/London']);%</example> +<example inline="1">|00aa00|✔| %$c->find(['country_code' => 'GB']).sort(['timezone' => 1]);%</example> +</div> +<div effect="fade-in"> +<example inline="1">|ffaa00|✘| %$c->find(['country_code' => 'GB', 'asciiname' => 'London']);%</example> +<example inline="1">|ffaa00|✘| %$c->find(['country_code' => 'GB']).sort(['asciiname' => 1]);%</example> +</div> +<div effect="fade-in"> +<example inline="1">|ff0000|✘| %$c->find(['timezone' => 'Europe/London']);%</example> +<example inline="1">|ff0000|✘| %$c->find(['asciiname' => 'Europe/London']);%</example> +</div> +<div effect="fade-in"> +<example inline="1">|00aa00|✔| %$c->find(['country_code' => 'GB']).sort(['timezone' => 1, 'asciiname' => 1]);%</example> +<example inline="1">|ffaa00|✘| %$c->find(['country_code' => 'GB']).sort(['timezone' => 1, 'asciiname' => -1]);%</example> +<example inline="1">|ffaa00|✘| %$c->find(['country_code' => 'GB']).sort(['timezone' => -1, 'asciiname' => 1]);%</example> +<example inline="1">|00aa00|✔| %$c->find(['country_code' => 'GB']).sort(['timezone' => -1, 'asciiname' => -1]);%</example> +</div> </slide> diff --git a/slides/mongodb/one-to-many4.xml b/slides/mongodb/one-to-many4.xml index bc538bc..03fbcd5 100644 --- a/slides/mongodb/one-to-many4.xml +++ b/slides/mongodb/one-to-many4.xml @@ -1,8 +1,6 @@ <slide> <title>Linking Articles and Views</title> -<blurb>By splitting views out into their own collection</blurb> - <blurb>Article collection:</blurb> <example><![CDATA[{ _id: 4, diff --git a/slides/mongodb/replication.xml b/slides/mongodb/replication.xml index af7b559..ec2d456 100644 --- a/slides/mongodb/replication.xml +++ b/slides/mongodb/replication.xml @@ -4,9 +4,8 @@ <image filename="replset.png" pdf-scale="0.8"/> <list> - <bullet>Failover/Availability</bullet> + <bullet>Failover/High Availability</bullet> <bullet>Scaling reads</bullet> <bullet>Primaries, secondaries and arbiters</bullet> - <bullet>Odd number to prevent split brain</bullet> </list> </slide> diff --git a/slides/mongodb/replset.png b/slides/mongodb/replset.png index 9790aba..7c43ef5 100644 Binary files a/slides/mongodb/replset.png and b/slides/mongodb/replset.png differ diff --git a/slides/mongodb/resources.xml b/slides/mongodb/resources.xml index 5698f3d..4d133ca 100644 --- a/slides/mongodb/resources.xml +++ b/slides/mongodb/resources.xml @@ -2,10 +2,10 @@ <title>Resources</title> <qrcode>http://derickrethans.nl/talks/:-:talk_id:-:</qrcode> +<break/> <list> - <bullet>Slides: http://derickrethans.nl/talks/:-:talk_id:-:</bullet> + <bullet>Slides and Feedback: :-:joindin:-:</bullet> <bullet>Contact me: :-:speaker:-:: @:-:twitter:-:, :-:email:-:</bullet> - <bullet>Feedback: :-:joindin:-:</bullet> </list> <div class="footer"> <image align="left" filename="10gen.png" pdf-scale="0.4" x-offset="2" y-offset="12.3"/> diff --git a/slides/mongodb/selling-points.xml b/slides/mongodb/selling-points.xml new file mode 100644 index 0000000..d2b2c20 --- /dev/null +++ b/slides/mongodb/selling-points.xml @@ -0,0 +1,10 @@ +<slide> +<title>Wrap-up</title> + +<list> + <bullet>MongoDB is a document store</bullet> + <bullet>Schemaless doesn't mean "no design necessary"</bullet> + <bullet>It's fast and easy to scale</bullet> + <bullet>No knobs</bullet> +</list> +</slide> diff --git a/slides/mongodb/sharding2.png b/slides/mongodb/sharding2.png index 98c99a7..1c0cfb3 100644 Binary files a/slides/mongodb/sharding2.png and b/slides/mongodb/sharding2.png differ diff --git a/slides/mongodb/title.xml b/slides/mongodb/title.xml index 3c299f3..30a1328 100644 --- a/slides/mongodb/title.xml +++ b/slides/mongodb/title.xml @@ -1,10 +1,12 @@ <slide type="title"> -<break lines="6"/> +<break lines="4"/> <blurb class="event-title">:-:title:-:</blurb> <break lines="1"/> -<blurb class="event-presenter">Derick Rethans - :-:email:-:</blurb> -<blurb class="event-presenter">@:-:twitter:-:</blurb> -<blurb class="event-presenter">:-:joindin:-:</blurb> +<blurb class="event-presenter"> +Derick Rethans - :-:email:-:<br/> +@:-:twitter:-:<br/> +:-:joindin:-: +</blurb> <div class="footer"> <image align="left" filename="10gen-small.png" pdf-scale="0.4" x-offset="2" y-offset="12.3"/> <image align="right" filename="mongodb-small.png" pdf-scale="0.4" x-offset="18" y-offset="13.3"/>
« previous php.pres (#1871) next »