com presentations: Added my MongoDB talk for PHP NW.: mongo-phpnw.xml slides/mongodb/indexes-geo2.xml slides/mongodb/indexes4.xml
slides/mongodb/memory-mapped.png slides/mongodb/mmap.xml slides/mongodb/mongougs.xml slides/mongodb/one-to-many4.xml
slides/mongodb/tip-paged-result.xml
| From: | Derick Rethans | Date: | Mon, 02 Apr 2012 15:26:34 +0000 |
| Subject: | com presentations: Added my MongoDB talk for PHP NW.: mongo-phpnw.xml slides/mongodb/indexes-geo2.xml slides/mongodb/indexes4.xml slides/mongodb/memory-mapped.png slides/mongodb/mmap.xml slides/mongodb/mongougs.xml slides/mongodb/one-to-many4.xml slides/mongodb/tip-paged-result.xml |
||
| Groups: | php.pres | ||
| Request: | Send a blank email to pres+get-1792@lists.php.net to get a copy of this message | ||
Commit: 02217368ce69a3786aa7483a6f1d371faca0a6a3
Author: Derick Rethans <github@derickrethans.nl> Mon, 2 Apr 2012 16:26:34 +0100
Parents: 52a29828e86c420d527cec2a1c912735383465c2
Branches: master
Link: http://git.php.net/?p=presentations.git;a=commitdiff;h=02217368ce69a3786aa7483a6f1d371faca0a6a3
Log:
Added my MongoDB talk for PHP NW.
Changed paths:
A mongo-phpnw.xml
A slides/mongodb/indexes-geo2.xml
M slides/mongodb/indexes4.xml
A slides/mongodb/memory-mapped.png
A slides/mongodb/mmap.xml
M slides/mongodb/mongougs.xml
M slides/mongodb/one-to-many4.xml
M slides/mongodb/tip-paged-result.xml
Diff:
diff --git a/mongo-phpnw.xml b/mongo-phpnw.xml
new file mode 100644
index 0000000..ad5c659
--- /dev/null
+++ b/mongo-phpnw.xml
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="utf-8"?>
+<presentation css="10gen.css">
+<topic>mongoDB</topic>
+<title>MongoDB schema design</title>
+<event>PHP NorthWest</event>
+<location>Manchester, UK</location>
+<date>Apr 3rd, 2012</date>
+<speaker>Derick Rethans</speaker>
+<email>derick@10gen.com</email>
+<twitter>derickr</twitter>
+<url>http://derickrethans.nl/talks.html</url>
+<joindin>e-mail me</joindin>
+<slide>slides/mongodb/title.xml</slide>
+<slide>slides/mongodb/me.xml</slide>
+
+<slide>slides/mongodb/databasefield.xml</slide>
+<slide>slides/mongodb/nosql.xml</slide>
+<slide>slides/mongodb/collections-documents.xml</slide>
+<slide>slides/mongodb/document.xml</slide>
+
+Common Patterns
+
+- RDBMS-normalisation.
+
+<slide>slides/mongodb/normalisation.xml</slide>
+<slide>slides/mongodb/blog.xml</slide>
+<slide>slides/mongodb/blog2.xml</slide>
+
+<slide>slides/mongodb/considerations.xml</slide>
+
+**OSMify**
+<slide>slides/mongodb/inherit.xml</slide>
+<slide>slides/mongodb/inherit-rdbms.xml</slide>
+<slide>slides/mongodb/inherit-mongo.xml</slide>
+<slide>slides/mongodb/inherit-summary.xml</slide>
+
+<slide>slides/mongodb/one-to-many1.xml</slide>
+<slide>slides/mongodb/one-to-many2.xml</slide>
+<slide>slides/mongodb/one-to-many3.xml</slide>
+<slide>slides/mongodb/one-to-many4.xml</slide>
+
+<slide>slides/mongodb/many-to-many1.xml</slide>
+<slide>slides/mongodb/many-to-many2.xml</slide>
+<slide>slides/mongodb/many-to-many3.xml</slide>
+<slide>slides/mongodb/many-to-many4.xml</slide>
+
+<slide>slides/mongodb/embed-vs-link.xml</slide>
+<slide>slides/mongodb/tip-array-key.xml</slide>
+<slide>slides/mongodb/tip-paged-result.xml</slide>
+
+<slide>slides/mongodb/mmap.xml</slide>
+
+<slide>slides/mongodb/indexes.xml</slide>
+<slide>slides/mongodb/indexes2.xml</slide>
+<slide>slides/mongodb/indexes3.xml</slide>
+<slide>slides/mongodb/indexes4.xml</slide>
+- ensureIndex
+- single
+- compound
+- sorting
+- regexp with ^
+
+<slide>slides/mongodb/indexes-geo.xml</slide>
+<slide>slides/mongodb/indexes-geo2.xml</slide>
+- 2d index
+- within: box/circle
+
+<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/who-uses.xml</slide>
+<slide>slides/mongodb/mongougs.xml</slide>
+<slide>slides/mongodb/resources.xml</slide>
+
+</presentation>
diff --git a/slides/mongodb/indexes-geo2.xml b/slides/mongodb/indexes-geo2.xml
new file mode 100644
index 0000000..ff88825
--- /dev/null
+++ b/slides/mongodb/indexes-geo2.xml
@@ -0,0 +1,20 @@
+<slide>
+<title>More about 2D indexes</title>
+
+<blurb>A %2d% *geo* index wants two elements. With the first being the
+longitude (*x*) and the second one being the latitude (*y*) (as in
+GeoJSON).</blurb>
+<break/>
+<blurb>The following are all equivalent:</blurb>
+ <example>
+$myCol->insert( [
+ _id: 42, loc: [ 6.43, 52.1233 ]
+] );
+$myCol->insert( [
+ _id: 42, loc: { long: 6.43, lat: 52.1233 }
+] );
+$myCol->insert( [
+ _id: 42, loc: { latitude: 6.43, longitude: 52.1233 }
+] );
+</example>
+</slide>
diff --git a/slides/mongodb/indexes4.xml b/slides/mongodb/indexes4.xml
index e597f69..888f5c8 100644
--- a/slides/mongodb/indexes4.xml
+++ b/slides/mongodb/indexes4.xml
@@ -3,22 +3,17 @@
<list>
<bullet>Compound indexes:
- <example>$myCol->ensureIndex( [ _id: 1, ts: -1 ] )</example></bullet>
+ <example>$myCol->ensureIndex( [ _id => 1, ts => -1 ]
)</example></bullet>
+
+ <bullet>Indexes can be made on nested fields:
+ <example>$myCol->ensureIndex( [ "article.title" => -1 ]
)</example></bullet>
+
+ <bullet>Indexes can be made on array values:
+ <example><![CDATA[$myCol->insert( [ '_id' => 42, 'values' =>
[ 'fourty', 'two' ] ] );
+$myCol->ensureIndex( [ 'values' => 1 ] );]]>
+</example></bullet>
<bullet>Searching with regexp: %^%:
<example>$myCol->find( [ 'name' => new MongoRegex( '/^tan/i' ) ]
)</example></bullet>
- <bullet>%2d% index wants longitude, latitude (as in GeoJSON)
- <example>
-$myCol->insert( [
- _id: 42, loc: [ 6.43, 52.1233 ]
-] );
-$myCol->insert( [
- _id: 42, loc: { long: 6.43, lat: 52.1233 }
-] );
-$myCol->insert( [
- _id: 42, loc: { latitude: 6.43, longitude: 52.1233 }
-] );
-</example>
-</bullet>
</list>
</slide>
diff --git a/slides/mongodb/memory-mapped.png b/slides/mongodb/memory-mapped.png
new file mode 100644
index 0000000..87e184c
Binary files /dev/null and b/slides/mongodb/memory-mapped.png differ
diff --git a/slides/mongodb/mmap.xml b/slides/mongodb/mmap.xml
new file mode 100644
index 0000000..2450fca
--- /dev/null
+++ b/slides/mongodb/mmap.xml
@@ -0,0 +1,5 @@
+<slide>
+<title>How MongoDB stores data</title>
+
+<image filename="memory-mapped.png"/>
+</slide>
diff --git a/slides/mongodb/mongougs.xml b/slides/mongodb/mongougs.xml
index 2873628..9ae1748 100644
--- a/slides/mongodb/mongougs.xml
+++ b/slides/mongodb/mongougs.xml
@@ -10,7 +10,7 @@
<blurb>Mongo UGs</blurb>
<list>
- <bullet>MongoDB London (Mar 29th): bi-monthly</bullet>
+ <bullet>MongoDB London (Apr 24th): bi-monthly</bullet>
<bullet>Office Hours (Apr 4th): bi-weekly near Old Street</bullet>
</list>
</slide>
diff --git a/slides/mongodb/one-to-many4.xml b/slides/mongodb/one-to-many4.xml
index 0481679..eaedd2c 100644
--- a/slides/mongodb/one-to-many4.xml
+++ b/slides/mongodb/one-to-many4.xml
@@ -11,7 +11,7 @@
author: "Hergé",
date: "Tue Mar 28 2012 12:41:29 GMT",
comments: [
- { comment: ObjectId("1") }
+ { comment: "1" }
]
}
@@ -19,5 +19,10 @@ comments: {
_id: "1",
author: "Kyle",
date: "Tue Mar 28 2012 12:41:54 GMT",
+},
+{
+ _id: "2",
+ author: "Derick",
+ in_reply_to: "1",
}]]></example>
</slide>
diff --git a/slides/mongodb/tip-paged-result.xml b/slides/mongodb/tip-paged-result.xml
index 07edaca..4e5fec3 100644
--- a/slides/mongodb/tip-paged-result.xml
+++ b/slides/mongodb/tip-paged-result.xml
@@ -1,11 +1,7 @@
<slide>
<title>Tips and hints: pre-page results</title>
-<example><![CDATA[article: {
- _id: 42,
- title: "Xdebug saves you time!"
-}]]></example>
-<break/>
+<example><![CDATA[article: { _id: 42, title: "Xdebug saves you time!"
}]]></example>
<example><![CDATA[comments:
{