com presentations: PHPNW Mongo tutorial.: mongo-tut-phpnw14.xml slides/mongodb/half-tutorial-sql2nosql-topics.xml slides/mongodb/normal-form1.xml slides/mongodb/normal-form2.xml slides/mongodb/normal-form3.xml templates/default/title.ezt

[email protected] (Derick Rethans)
Newsgroups php.pres
Message-ID <[email protected]>
Commit:    1a6bc0608c19979a1d998dcaea05f8c02f9f2ddb
Author:    Derick Rethans <[email protected]>         Wed, 15 Oct 2014 12:41:12 +0100
Parents:   02b9a62a928ec6d3989a213abc3f74353bc29e21
Branches:  master

Link:       http://git.php.net/?p=presentations.git;a=commitdiff;h=1a6bc0608c19979a1d998dcaea05f8c02f9f2ddb

Log:
PHPNW Mongo tutorial.

Changed paths:
  A  mongo-tut-phpnw14.xml
  A  slides/mongodb/half-tutorial-sql2nosql-topics.xml
  M  slides/mongodb/normal-form1.xml
  M  slides/mongodb/normal-form2.xml
  M  slides/mongodb/normal-form3.xml
  M  templates/default/title.ezt
diff_1a6bc0608c19979a1d998dcaea05f8c02f9f2ddb.txt (text/plain, 11.2 KB)
diff --git a/mongo-tut-phpnw14.xml b/mongo-tut-phpnw14.xml
new file mode 100644
index 0000000..42e91f1
--- /dev/null
+++ b/mongo-tut-phpnw14.xml
@@ -0,0 +1,189 @@
+<?xml version="1.0" encoding="utf-8"?>
+<presentation css="10gen-strict.css">
+<topic>mongoDB</topic>
+<title>From SQL to NoSQL</title>
+<event>PHP NorthWest 2014</event>
+<location>Manchester, UK</location>
+<date>October 3, 2014</date>
+<speaker>Derick Rethans</speaker>
+<email>[email protected]</email>
+<twitter>derickr</twitter>
+<url>http://derickrethans.nl/talks.html</url>
+<joindin>http://joind.in/11775</joindin>
+<slide>slides/mongodb/title.xml</slide>
+<slide>slides/mongodb/me.xml</slide>
+<slide>slides/mongodb/half-tutorial-sql2nosql-topics.xml</slide>
+
+
+<!-- DINOSAUR vs PLATIPUS -->
+<slide>slides/mongodb/section-intro.xml</slide>
+<slide>slides/mongodb/relational-model.xml</slide>
+<slide>slides/mongodb/normal-form.xml</slide>
+<slide>slides/mongodb/normal-form1.xml</slide>
+<slide>slides/mongodb/normal-form2.xml</slide>
+<slide>slides/mongodb/normal-form3.xml</slide>
+
+<!-- DIFFERENT NoSQL -->
+<slide>slides/mongodb/nosql.xml</slide>
+<slide>slides/mongodb/nosql-kv.xml</slide>
+<slide>slides/mongodb/nosql-column.xml</slide>
+<slide>slides/mongodb/nosql-graph.xml</slide>
+<slide>slides/mongodb/nosql-document.xml</slide>
+
+
+<slide>slides/mongodb/section-intro.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-js.xml</slide>
+<slide>slides/mongodb/insert-php.xml</slide>
+<slide>slides/mongodb/insert-php-shortarray.xml</slide>
+- single
+
+<!-- FIRST EXCERCISE -->
+<slide>slides/mongodb/excercise.xml</slide>
+<slide>slides/mongodb/excercise-import-untappd.xml</slide>
+
+<slide>slides/mongodb/query.xml</slide>
+<slide>slides/mongodb/query2.xml</slide>
+- findOne
+- find
+
+<slide>slides/mongodb/query-advanced-ops.xml</slide>
+
+<slide>slides/mongodb/cursors.xml</slide>
+- cursor
+<slide>slides/mongodb/limit-skip.xml</slide>
+- limit/skip
+
+<!-- SECOND EXCERCISE -->
+<slide>slides/mongodb/excercise.xml</slide>
+<slide>slides/mongodb/excercise-finding-data.xml</slide>
+
+<slide>slides/mongodb/types.xml</slide>
+<slide>slides/mongodb/types-php.xml</slide>
+
+<!-- THIRD EXCERCISE -->
+<slide>slides/mongodb/excercise.xml</slide>
+<slide>slides/mongodb/excercise-import-with-types.xml</slide>
+
+
+<slide>slides/mongodb/update2a.xml</slide>
+
+<!-- SCHEMA DESIGN -->
+<slide>slides/mongodb/section-schema-design.xml</slide>
+Common Patterns
+
+- RDBMS-normalisation.
+
+<slide>slides/mongodb/blog.xml</slide>
+<slide>slides/mongodb/blog2.xml</slide>
+
+<slide>slides/mongodb/considerations.xml</slide>
+
+
+<slide>slides/mongodb/one-to-many1.xml</slide>
+<slide>slides/mongodb/one-to-many2.xml</slide>
+<slide>slides/mongodb/tip-array-key.xml</slide>
+<slide>slides/mongodb/one-to-many4.xml</slide>
+
+<!-- SECOND EXCERCISE -->
+<slide>slides/mongodb/excercise.xml</slide>
+<slide>slides/mongodb/excercise02-distillers-storage.xml</slide>
+<slide>slides/mongodb/excercise02-distillers-example.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>
+
+
+<!-- THIRD EXCERCISE -->
+<slide>slides/mongodb/excercise.xml</slide>
+<slide>slides/mongodb/excercise03-reviews.xml</slide>
+<slide>slides/mongodb/excercise03-reviews-example.xml</slide>
+<slide>slides/mongodb/excercise03-push-to-add-review.xml</slide>
+<slide>slides/mongodb/excercise03-add-like.xml</slide>
+
+
+<!-- COMMANDS and AGGREGATION -->
+<slide>slides/mongodb/commands.xml</slide>
+
+<slide>slides/mongodb/section-aggregation.xml</slide>
+<slide>slides/mongodb/aggr-aggr-framework.xml</slide>
+
+<slide>slides/mongodb/aggr-pipeline.xml</slide>
+<slide>slides/mongodb/aggr-pipelines-ops.xml</slide>
+<slide>slides/mongodb/aggr-our-example-data.xml</slide>
+<slide>slides/mongodb/aggr-op-match.xml</slide>
+<slide>slides/mongodb/aggr-op-match-example.xml</slide>
+<slide>slides/mongodb/aggr-op-match-with-query-example.xml</slide>
+<slide>slides/mongodb/aggr-op-project.xml</slide>
+<slide>slides/mongodb/aggr-op-project-incl-excl-example.xml</slide>
+<slide>slides/mongodb/aggr-op-project-rename-compute-example.xml</slide>
+<slide>slides/mongodb/aggr-op-project-create-sub-example.xml</slide>
+<slide>slides/mongodb/aggr-op-group.xml</slide>
+<slide>slides/mongodb/aggr-op-group-sum-count-example.xml</slide>
+<slide>slides/mongodb/aggr-op-group-collect-example.xml</slide>
+<slide>slides/mongodb/aggr-op-group-compound-example.xml</slide>
+<slide>slides/mongodb/aggr-op-unwind.xml</slide>
+<slide>slides/mongodb/aggr-op-unwind-example.xml</slide>
+<slide>slides/mongodb/aggr-op-sort-skip-limit.xml</slide>
+<slide>slides/mongodb/aggr-op-sort-example.xml</slide>
+<slide>slides/mongodb/aggr-op-limit-example.xml</slide>
+<slide>slides/mongodb/aggr-op-skip-example.xml</slide>
+<slide>slides/mongodb/aggr-op-sort-limit-skip-example.xml</slide>
+
+<!-- FOURTH EXCERCISE -->
+<slide>slides/mongodb/aggregation-example-cuisine6-sort.xml</slide>
+<slide>slides/mongodb/excercise.xml</slide>
+<slide>slides/mongodb/excercise04-reviews-aggr.xml</slide>
+
+<slide>slides/mongodb/questions.xml</slide>
+<!--
+
+ INDEXES 
+<slide>slides/mongodb/section-indexes.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-name-and-pop3.xml</slide>
+
+<slide>slides/mongodb/excercise.xml</slide>
+<slide>slides/mongodb/excercise05-indexes.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-stored2.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/idx-which-one-is-picked.xml</slide>
+<slide>slides/mongodb/questions.xml</slide>
+-->
+<!-- REPLICATION -->
+<slide>slides/mongodb/section-replication.xml</slide>
+<slide>slides/mongodb/repl-use-cases.xml</slide>
+<slide>slides/mongodb/repl-features.xml</slide>
+<slide>slides/mongodb/repl-works-basic.xml</slide>
+<slide>slides/mongodb/repl-works-normal.xml</slide>
+<slide>slides/mongodb/repl-works-failover.xml</slide>
+<slide>slides/mongodb/repl-oplog.xml</slide>
+
+<slide>slides/mongodb/repl-eventual-consistency.xml</slide>
+
+<slide>slides/mongodb/questions.xml</slide>
+<slide>slides/mongodb/resources.xml</slide>
+</presentation>
diff --git a/slides/mongodb/half-tutorial-sql2nosql-topics.xml b/slides/mongodb/half-tutorial-sql2nosql-topics.xml
new file mode 100644
index 0000000..6f316b0
--- /dev/null
+++ b/slides/mongodb/half-tutorial-sql2nosql-topics.xml
@@ -0,0 +1,11 @@
+<slide>
+<title>Today's Topics</title>
+
+<list>
+	<bullet>NoSQL‽</bullet>
+	<bullet>Introduction into MongoDB with PHP</bullet>
+	<bullet>Schema Design</bullet>
+	<bullet>Introduction to Replication</bullet>
+	<bullet>Questions and Answers</bullet>
+</list>
+</slide>
diff --git a/slides/mongodb/normal-form1.xml b/slides/mongodb/normal-form1.xml
index 13562a1..d2339fe 100644
--- a/slides/mongodb/normal-form1.xml
+++ b/slides/mongodb/normal-form1.xml
@@ -6,9 +6,9 @@ only atomic values, and the value of each attribute contains only a single
 value from that domain.</blurb>
 
 <table>
-<tr><th>Customer ID</th><th>First Name</th><th>Surname</th><th>Telephone Number</th></tr>
-<tr><td>123</td><td>Robert</td><td>Ingram</td><td>555-861-2025</td></tr>
-<tr><td>456</td><td>Jane</td><td>Wright</td><td>|ff0000|555-403-1659, 555-776-4100|</td></tr>
-<tr><td>789</td><td>Maria</td><td>Fernandez</td><td>555-808-9633</td></tr>
+<tr><th>_ID_</th><th>Brewery</th><th>Beers</th></tr>
+<tr><td>123</td><td>BrewDog</td><td>Brixton Porter</td></tr>
+<tr><td>456</td><td>Nøgne Ø</td><td>|ff0000|Blonde, Funky Geyser|</td></tr>
+<tr><td>789</td><td>Pookhill</td><td>Irish Whiskey Cask</td></tr>
 </table>
 </slide>
diff --git a/slides/mongodb/normal-form2.xml b/slides/mongodb/normal-form2.xml
index 2775a2b..8a6dd66 100644
--- a/slides/mongodb/normal-form2.xml
+++ b/slides/mongodb/normal-form2.xml
@@ -5,12 +5,11 @@
 proper subset of any candidate key</blurb>
 
 <table>
-<tr><th>Employee</th><th>Skill</th><th>Current Work Location</th></tr>
-<tr><td>Brown</td><td>Light Cleaning</td><td>73 Industrial Way</td></tr>
-<tr><td>Brown</td><td>Typing</td><td>|ff0000|73 Industrial Way|</td></tr>
-<tr><td>Harrison</td><td>Light Cleaning</td><td>73 Industrial Way</td></tr>
-<tr><td>Jones</td><td>Shorthand</td><td>114 Main Street</td></tr>
-<tr><td>Jones</td><td>Typing</td><td>|ff0000|114 Main Street|</td></tr>
-<tr><td>Jones</td><td>Whittling</td><td>|ff0000|114 Main Street|</td></tr>
+<tr><th>_Brewery_</th><th>_Beer_</th><th>Brewery Country</th></tr>
+<tr><td>BrewDog</td><td>Brixton Porter</td><td>Scotland</td></tr>
+<tr><td>BrewDog</td><td>Cocoa Psycho</td><td>|ff0000|Scotland|</td></tr>
+<tr><td>Nøgne Ø</td><td>Blonde</td><td>Norway</td></tr>
+<tr><td>Nøgne Ø</td><td>Funky Geyser</td><td>Norway</td></tr>
+<tr><td>Pookhill</td><td>Irish Whiskey Cask</td><td>England</td></tr>
 </table>
 </slide>
diff --git a/slides/mongodb/normal-form3.xml b/slides/mongodb/normal-form3.xml
index df83b33..1346ba3 100644
--- a/slides/mongodb/normal-form3.xml
+++ b/slides/mongodb/normal-form3.xml
@@ -7,10 +7,11 @@ description of the primary key are removed from the table. In other words, no
 transitive dependency is allowed.</blurb>
 
 <table>
-<tr><th>Tournament</th><th>Year</th><th>Winner</th><th>Winner Date of Birth</th></tr>
-<tr><td>Indiana Invitational</td><td>1998</td><td>|ff0000|Al Fredrickson|</td><td>|ff0000|21 July 1975|</td></tr>
-<tr><td>Cleveland Open</td><td>1999</td><td>|ff0000|Bob Albertson|</td><td>|ff0000|28 September 1968|</td></tr>
-<tr><td>Des Moines Masters</td><td>1999</td><td>|ff0000|Al Fredrickson|</td><td>|ff0000|21 July 1975|</td></tr>
-<tr><td>Indiana Invitational</td><td>1999</td><td>|ff0000|Chip Masterson|</td><td>|ff0000|14 March 1977|</td></tr>
+<tr><th>_Brewery_</th><th>_Beer_</th><th>Venue</th><th>Venue City</th></tr>
+<tr><td>BrewDog</td><td>Brixton Porter</td><td>|ff0000|The Flying Dutchman|</td><td>|ff0000|Bergen|</td></tr>
+<tr><td>BrewDog</td><td>Cocoa Psycho</td><td>|ff0000|BrewDog Camden|</td><td>|ff0000|London|</td></tr>
+<tr><td>Nøgne Ø</td><td>Blonde</td><td>|ff0000|Pingvinen|</td><td>|ff0000|Bergen|</td></tr>
+<tr><td>Nøgne Ø</td><td>Funky Geyser</td><td>|ff0000|Cardinal|</td><td>|ff0000|Stavanger|</td></tr>
+<tr><td>Pookhill</td><td>Irish Whiskey Cask</td><td>|ff0000|GBBF|</td><td>|ff0000|London|</td></tr>
 </table>
 </slide>
diff --git a/templates/default/title.ezt b/templates/default/title.ezt
index 0a1c443..5a7a182 100644
--- a/templates/default/title.ezt
+++ b/templates/default/title.ezt
@@ -1,2 +1,3 @@
 {use $node}
-<h1>{$node->nodeValue}</h1>
+{var $style = get_attribute( $node, 'style' )}
+<h1{if $style} class='style-{$style}'{/if}>{$node->nodeValue}</h1>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.