cvs: presentations / db-phptek6.xml /slides/dbdesign 1-1.png 1-n.png 1nf.xml 2nf.xml 3nf.xml back-to-1nf.xml content.xml erd1.png erd1.xml erd2.png
erd2.xml exemple-data-et.xml n-m.png naming-columns.xml relations-1-1.xml relations-1-n.xml relations-n-m.xml singular-vs-plural-names.xml
surrogate-pks.xml surrogate-pks2.xml table-et-0NF.xml table-et-1NF-primary-key.xml table-et-1NF.xml table-et-2NF.xml table-et-3NF.xml title.xml
| From: | Derick Rethans | Date: | Sun, 23 Apr 2006 19:07:04 +0000 |
| Subject: | cvs: presentations / db-phptek6.xml /slides/dbdesign 1-1.png 1-n.png 1nf.xml 2nf.xml 3nf.xml back-to-1nf.xml content.xml erd1.png erd1.xml erd2.png erd2.xml exemple-data-et.xml n-m.png naming-columns.xml relations-1-1.xml relations-1-n.xml relations-n-m.xml singular-vs-plural-names.xml surrogate-pks.xml surrogate-pks2.xml table-et-0NF.xml table-et-1NF-primary-key.xml table-et-1NF.xml table-et-2NF.xml table-et-3NF.xml title.xml |
||
| Groups: | php.pres | ||
| Request: | Send a blank email to pres+get-1299@lists.php.net to get a copy of this message | ||
derick Sun Apr 23 19:07:04 2006 UTC
Added files:
/presentations db-phptek6.xml
/presentations/slides/dbdesign 1-1.png 1-n.png 1nf.xml 2nf.xml
3nf.xml back-to-1nf.xml content.xml
erd1.png erd1.xml erd2.png erd2.xml
exemple-data-et.xml n-m.png
naming-columns.xml relations-1-1.xml
relations-1-n.xml relations-n-m.xml
singular-vs-plural-names.xml
surrogate-pks.xml surrogate-pks2.xml
table-et-0NF.xml
table-et-1NF-primary-key.xml
table-et-1NF.xml table-et-2NF.xml
table-et-3NF.xml title.xml
Log:
- First batch of slides for db design tutorial.
http://cvs.php.net/viewcvs.cgi/presentations/db-phptek6.xml?view=markup&rev=1.1 Index: presentations/db-phptek6.xml +++ presentations/db-phptek6.xml <?xml version="1.0" encoding="iso-8859-1"?> <presentation template="css" navmode="html" navbarbackground="#4373b4" navbartopiclinks="0" navColor="#f1fbff" logo1="" stylesheet="presentations/slides/perf/ezp.css" backgroundfixed="1" > <topic>Databases</topic> <title>A Developer's Guide to Successful Database Design</title> <event>php|tek</event> <location>Orlando, Florida</location> <date>April 25th, 2006</date> <speaker>Derick Rethans</speaker> <email>dr@ez.no</email> <url>http://files.derickrethans.nl/db-phptek6.pdf</url> <slide>slides/dbdesign/title.xml</slide> <!-- CONTENTS --> <slide>slides/dbdesign/content.xml</slide> <!-- DESIGN --> <slide>slides/dbdesign/exemple-data-et.xml</slide> <slide>slides/dbdesign/table-et-0NF.xml</slide> <slide>slides/dbdesign/1nf.xml</slide> <slide>slides/dbdesign/table-et-1NF.xml</slide> <slide>slides/dbdesign/2nf.xml</slide> <slide>slides/dbdesign/table-et-1NF-primary-key.xml</slide> <slide>slides/dbdesign/table-et-2NF.xml</slide> <slide>slides/dbdesign/3nf.xml</slide> <slide>slides/dbdesign/table-et-3NF.xml</slide> <slide>slides/dbdesign/back-to-1nf.xml</slide> <slide>slides/dbdesign/erd1.xml</slide> <slide>slides/dbdesign/surrogate-pks.xml</slide> <slide>slides/dbdesign/surrogate-pks2.xml</slide> <slide>slides/dbdesign/erd2.xml</slide> <slide>slides/dbdesign/relations-1-1.xml</slide> <slide>slides/dbdesign/relations-1-n.xml</slide> <slide>slides/dbdesign/relations-n-m.xml</slide> <slide>slides/dbdesign/singular-vs-plural-names.xml</slide> <slide>slides/dbdesign/naming-columns.xml</slide> <slide>slides/dbdesign/in-sql.xml</slide> <slide>slides/dbdesign/column-types.xml</slide> <slide>slides/dbdesign/.xml</slide> <slide>slides/dbdesign/.xml</slide> <slide>slides/dbdesign/.xml</slide> <slide>slides/dbdesign/.xml</slide> <slide>slides/dbdesign/.xml</slide> <slide>slides/dbdesign/.xml</slide> <slide>slides/dbdesign/.xml</slide> <slide>slides/dbdesign/.xml</slide> </presentation> http://cvs.php.net/viewcvs.cgi/presentations/slides/dbdesign/1nf.xml?view=markup&rev=1.1 Index: presentations/slides/dbdesign/1nf.xml +++ presentations/slides/dbdesign/1nf.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide> <title>First Normal Form</title> <subtitle>1NF</subtitle> <break lines="8"/> <blurb class="large_blurb_center"> All values in each column of a table are atomic. This means that there are no sets of values within a column. </blurb> </slide> http://cvs.php.net/viewcvs.cgi/presentations/slides/dbdesign/2nf.xml?view=markup&rev=1.1 Index: presentations/slides/dbdesign/2nf.xml +++ presentations/slides/dbdesign/2nf.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide> <title>Second Normal Form</title> <subtitle>2NF</subtitle> <break lines="8"/> <blurb class="large_blurb_center"> Any non-key columns must depend on the entire primary key. In the case of a composite primary key, this means that a non-key column cannot depend on only part of the composite key. </blurb> </slide> http://cvs.php.net/viewcvs.cgi/presentations/slides/dbdesign/3nf.xml?view=markup&rev=1.1 Index: presentations/slides/dbdesign/3nf.xml +++ presentations/slides/dbdesign/3nf.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide> <title>Third Normal Form</title> <subtitle>3NF</subtitle> <break lines="8"/> <blurb class="large_blurb_center"> All columns must depend directly on the primary key. </blurb> </slide> http://cvs.php.net/viewcvs.cgi/presentations/slides/dbdesign/back-to-1nf.xml?view=markup&rev=1.1 Index: presentations/slides/dbdesign/back-to-1nf.xml +++ presentations/slides/dbdesign/back-to-1nf.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide> <title>First Normal Form Revised</title> <blurb> *1NF*: "All values in each column of a table are ~atomic~. This means that there are no sets of values within a column." </blurb> <break/> <table columns="2" class="dbtable" title="Component Developer"> <cell class="header-key">Component</cell><cell class="header-key">Name</cell> <cell>Base 1.0</cell><cell>Derick</cell> <cell>DatabaseSchema 1.0</cell><cell>Derick</cell> <cell>File 1.0</cell><cell>Derick</cell> <cell>...</cell><cell>...</cell> </table> <table columns="3" class="dbtable" title="DeveloperComponentVersion"> <cell class="header-key-moved-to">Component</cell><cell class="header-key-moved-to">Component Version</cell><cell class="header-key">Name</cell> <cell class="moved-to">Base</cell><cell class="moved-to">1.0</cell><cell>Derick</cell> <cell class="moved-to">DatabaseSchema</cell><cell class="moved-to">1.0</cell><cell>Derick</cell> <cell class="moved-to">File</cell><cell class="moved-to">1.0</cell><cell>Derick</cell> <cell class="moved-to">...</cell><cell class="moved-to">...</cell><cell>...</cell> </table> </slide> http://cvs.php.net/viewcvs.cgi/presentations/slides/dbdesign/content.xml?view=markup&rev=1.1 Index: presentations/slides/dbdesign/content.xml +++ presentations/slides/dbdesign/content.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide fontsize="6em"> <title>Contents</title> <blurb>Design</blurb> <list> <bullet>Table Design</bullet> <bullet>ER Diagrams</bullet> <bullet>Normalization</bullet> <bullet>Relations</bullet> <bullet>Intregity</bullet> </list> <blurb>Performance</blurb> <list> <bullet>Indexes</bullet> <bullet>Denormalization</bullet> <bullet>Triggers</bullet> <bullet>Stored Procedures</bullet> </list> <blurb>Tips & Tricks</blurb> <list> <bullet>Nested Set</bullet> <bullet>Trees</bullet> </list> </slide> http://cvs.php.net/viewcvs.cgi/presentations/slides/dbdesign/erd1.xml?view=markup&rev=1.1 Index: presentations/slides/dbdesign/erd1.xml +++ presentations/slides/dbdesign/erd1.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide> <title>Entity Relationship Diagram</title> <subtitle>Our Design in an ERD</subtitle> <image filename="erd1.png"/> </slide> http://cvs.php.net/viewcvs.cgi/presentations/slides/dbdesign/erd2.xml?view=markup&rev=1.1 Index: presentations/slides/dbdesign/erd2.xml +++ presentations/slides/dbdesign/erd2.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide> <title>Entity Relationship Diagram</title> <subtitle>Our Extended Design in an ERD</subtitle> <image filename="erd2.png"/> </slide> http://cvs.php.net/viewcvs.cgi/presentations/slides/dbdesign/exemple-data-et.xml?view=markup&rev=1.1 Index: presentations/slides/dbdesign/exemple-data-et.xml +++ presentations/slides/dbdesign/exemple-data-et.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide> <title>Some Sample Data</title> <subtitle>The Data</subtitle> <list> <bullet>"|ff0000|Derick| lives in |00bb00|Netherlands (NL)| and works on |0000ff|Base 1.0, DatabaseSchema 1.0, File 1.0 and 1.1, Translation 1.0 and 1.1, UserInput 1.0 and 1.1|"</bullet> <bullet>"|ff0000|Sergey| lives in |00bb00|Ukraine (UA)| and works on |0000ff|Base 1.1, Database 1.0 and 1.1, PersistentObject 1.1, SystemInformation 1.0|"</bullet> <bullet>"|ff0000|Frederik| lives in |00bb00|Norway (NO)| and works on |0000ff|Database 1.0 and 1.1, Mail 1.0 and 1.1, PersistentObject 1.0|"</bullet> </list> </slide> http://cvs.php.net/viewcvs.cgi/presentations/slides/dbdesign/naming-columns.xml?view=markup&rev=1.1 Index: presentations/slides/dbdesign/naming-columns.xml +++ presentations/slides/dbdesign/naming-columns.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide> <title>Naming Columns</title> <blurb>Normal columns are straight forward.</blurb> <blurb>For columns that refer to another table, it is useful to:</blurb> <list> <bullet> </bullet> </list> </slide> http://cvs.php.net/viewcvs.cgi/presentations/slides/dbdesign/relations-1-1.xml?view=markup&rev=1.1 Index: presentations/slides/dbdesign/relations-1-1.xml +++ presentations/slides/dbdesign/relations-1-1.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide> <title>Relations</title> <subtitle>One to One relations</subtitle> <blurb> Usually does not need a seperate table. But can be useful to save space: </blurb> <break lines="8"/> <image filename="1-1.png" /> </slide> http://cvs.php.net/viewcvs.cgi/presentations/slides/dbdesign/relations-1-n.xml?view=markup&rev=1.1 Index: presentations/slides/dbdesign/relations-1-n.xml +++ presentations/slides/dbdesign/relations-1-n.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide> <title>Relations</title> <subtitle>One to Many relations</subtitle> <blurb> Most frequently used type of relation: </blurb> <break lines="8"/> <image filename="1-n.png" /> </slide> http://cvs.php.net/viewcvs.cgi/presentations/slides/dbdesign/relations-n-m.xml?view=markup&rev=1.1 Index: presentations/slides/dbdesign/relations-n-m.xml +++ presentations/slides/dbdesign/relations-n-m.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide> <title>Relations</title> <subtitle>Many to Many relations</subtitle> <blurb> You need a special table to record the relation itself: </blurb> <break lines="2"/> <image filename="n-m.png" /> </slide> http://cvs.php.net/viewcvs.cgi/presentations/slides/dbdesign/singular-vs-plural-names.xml?view=markup&rev=1.1 Index: presentations/slides/dbdesign/singular-vs-plural-names.xml +++ presentations/slides/dbdesign/singular-vs-plural-names.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide> <title>Naming Tables</title> <blurb>Two major options:</blurb> <list> <bullet>Singular names: Component, ComponentVersion, Developer, Country</bullet> <bullet>Plural names: Component~s~, ComponentVersion~s~, Developer~s~, Countrie~s~</bullet> </list> <break/> <blurb>Naming "connection tables" for Many to Many relations:</blurb> <list> <bullet> Include the names of both tables into the name (|ff0000|Developer| + |0000ff|ComponentVersion| -> |ff0000|Developer||0000ff|ComponentVersion|) </bullet> <bullet> Optionally add ~Relation~ to this name (|ff0000|Developer| + |0000ff|ComponentVersion| -> |ff0000|Developer||0000ff|ComponentVersion|~Relation~) </bullet> </list> </slide> http://cvs.php.net/viewcvs.cgi/presentations/slides/dbdesign/surrogate-pks.xml?view=markup&rev=1.1 Index: presentations/slides/dbdesign/surrogate-pks.xml +++ presentations/slides/dbdesign/surrogate-pks.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide> <title>Primary Key Mangling</title> <table columns="3" class="dbtable" title="DeveloperComponentVersion"> <cell class="header-key">Component</cell><cell class="header-key">Component Version</cell><cell class="header-key">Developer Name</cell> <cell>Base</cell><cell>1.0</cell><cell>Derick</cell> <cell>Base</cell><cell>1.1</cell><cell>Sergey</cell> </table> <table columns="3" class="dbtable" title="ComponentVersion"> <cell class="header-key">Component</cell><cell class="header-key">Component Version</cell><cell class="header">Release Date</cell> <cell>Base</cell><cell>1.0</cell><cell>2006-01-07</cell> <cell>Base</cell><cell>1.1</cell><cell>~NULL~</cell> </table> <div effect="hide"> <blurb>to:</blurb> <table columns="2" class="dbtable" title="DeveloperComponentVersion"> <cell class="header-key">Component Version ID</cell><cell class="header-key">Developer Name</cell> <cell>1</cell><cell>Derick</cell> <cell>3</cell><cell>Sergey</cell> </table> <table columns="4" class="dbtable" title="ComponentVersion"> <cell class="header-key">ID</cell><cell class="header-candidate-key">Component</cell><cell class="header-candidate-key">Component Version</cell><cell class="header">Release Date</cell> <cell>1</cell><cell>Base</cell><cell>1.0</cell><cell>2006-01-07</cell> <cell>3</cell><cell>Base</cell><cell>1.1</cell><cell>~NULL~</cell> </table> </div> </slide> http://cvs.php.net/viewcvs.cgi/presentations/slides/dbdesign/surrogate-pks2.xml?view=markup&rev=1.1 Index: presentations/slides/dbdesign/surrogate-pks2.xml +++ presentations/slides/dbdesign/surrogate-pks2.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide> <title>Primary Key Mangling</title> <subtitle>or surrogate keys as they are called.</subtitle> <table columns="4" class="dbtable" title="ComponentVersion"> <cell class="header-key">ID</cell><cell class="header-candidate-key">Component</cell><cell class="header-candidate-key">Component Version</cell><cell class="header">Release Date</cell> <cell>1</cell><cell>Base</cell><cell>1.0</cell><cell>2006-01-07</cell> <cell>3</cell><cell>Base</cell><cell>1.1</cell><cell>~NULL~</cell> </table> <list> <bullet>|0000ff|Component, Component Version| was the original primary key and still identifies each record uniquely.</bullet> <bullet>A (combination of) key(s) that identify a record uniquely is called a *candidate key*.</bullet> <bullet>One of the candidate keys can be defined as the primary key (|ff0000|ID| in the example above).</bullet> <bullet>|ff0000|ID| is an artificial key (surrogate key).</bullet> <bullet>A surrogate key is not always required, but can increase performance while joining or selecting.</bullet> </list> </slide> http://cvs.php.net/viewcvs.cgi/presentations/slides/dbdesign/table-et-0NF.xml?view=markup&rev=1.1 Index: presentations/slides/dbdesign/table-et-0NF.xml +++ presentations/slides/dbdesign/table-et-0NF.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide> <title>First Attempt</title> <table columns="4" class="dbtable" title="Component Developer"> <cell class="header">Components</cell><cell class="header">Name</cell><cell class="header">C. Code</cell><cell class="header">Country</cell> <cell>Base 1.0</cell><cell>Derick</cell><cell>NL</cell><cell>Netherlands</cell> <cell>DatabaseSchema 1.0</cell><cell>Derick</cell><cell>NL</cell><cell>Netherlands</cell> <cell>File 1.0, File 1.1</cell><cell>Derick</cell><cell>NL</cell><cell>Netherlands</cell> <cell>Translation 1.0, Translation 1.1</cell><cell>Derick</cell><cell>NL</cell><cell>Netherlands</cell> <cell>UserInput 1.0, UserInput 1.1</cell><cell>Derick</cell><cell>NL</cell><cell>Netherlands</cell> <cell>Base 1.1</cell><cell>Sergey</cell><cell>UA</cell><cell>Ukraine</cell> <cell>Database 1.0, Database 1.1</cell><cell>Sergey</cell><cell>UA</cell><cell>Ukraine</cell> <cell>PersistentObject 1.1</cell><cell>Sergey</cell><cell>UA</cell><cell>Ukraine</cell> <cell>SystemInformation 1.0</cell><cell>Sergey</cell><cell>UA</cell><cell>Ukraine</cell> <cell>Database 1.0, Database 1.1</cell><cell>Frederik</cell><cell>NO</cell><cell>Norway</cell> <cell>Mail 1.0, Mail 1.1</cell><cell>Frederik</cell><cell>NO</cell><cell>Norway</cell> <cell>PersistentObject 1.0</cell><cell>Frederik</cell><cell>NO</cell><cell>Norway</cell> </table> <div effect="hide"> <break/> <list> <bullet>It is impossible to find out which component is developed by whom.</bullet> <!-- <bullet>You can not store developers without component.</bullet> --> </list> </div> </slide> http://cvs.php.net/viewcvs.cgi/presentations/slides/dbdesign/table-et-1NF-primary-key.xml?view=markup&rev=1.1 Index: presentations/slides/dbdesign/table-et-1NF-primary-key.xml +++ presentations/slides/dbdesign/table-et-1NF-primary-key.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide> <title>Primary Keys</title> <blurb> *2NF*: "Any non-key columns must depend on the entire ~primary key~..." </blurb> <break lines="2" /> <table columns="4" class="dbtable" title="Component Developer"> <cell class="header">Component</cell><cell class="header">Name</cell><cell class="header">C. Code</cell><cell class="header">Country</cell> <cell>Base 1.0</cell><cell>Derick</cell><cell>NL</cell><cell>Netherlands</cell> <cell>File 1.0</cell><cell>Derick</cell><cell>NL</cell><cell>Netherlands</cell> <cell>File 1.1</cell><cell>Derick</cell><cell>NL</cell><cell>Netherlands</cell> </table> <break/> <blurb> A *primary key* is a value that can be used to identify a unique row in a table. </blurb> <break lines="2" /> <div effect="hide"> <table columns="4" class="dbtable" title="Component Developer"> <cell class="header-key">Component</cell><cell class="header-key">Name</cell><cell class="header">C. Code</cell><cell class="header">Country</cell> <cell>Base 1.0</cell><cell>Derick</cell><cell>NL</cell><cell>Netherlands</cell> <cell>File 1.0</cell><cell>Derick</cell><cell>NL</cell><cell>Netherlands</cell> <cell>File 1.1</cell><cell>Derick</cell><cell>NL</cell><cell>Netherlands</cell> </table> <break/> </div> </slide> http://cvs.php.net/viewcvs.cgi/presentations/slides/dbdesign/table-et-1NF.xml?view=markup&rev=1.1 Index: presentations/slides/dbdesign/table-et-1NF.xml +++ presentations/slides/dbdesign/table-et-1NF.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide> <title>Second Attempt</title> <subtitle>Our data in 1NF</subtitle> <table columns="4" class="dbtable" title="Component Developer"> <cell class="header">Component</cell><cell class="header">Name</cell><cell class="header">C. Code</cell><cell class="header">Country</cell> <cell>Base 1.0</cell><cell>Derick</cell><cell>NL</cell><cell>Netherlands</cell> <cell>DatabaseSchema 1.0</cell><cell>Derick</cell><cell>NL</cell><cell>Netherlands</cell> <cell>File 1.0</cell><cell>Derick</cell><cell>NL</cell><cell>Netherlands</cell> <cell>File 1.1</cell><cell>Derick</cell><cell>NL</cell><cell>Netherlands</cell> <cell>Translation 1.0</cell><cell>Derick</cell><cell>NL</cell><cell>Netherlands</cell> <cell>Translation 1.1</cell><cell>Derick</cell><cell>NL</cell><cell>Netherlands</cell> <cell>UserInput 1.0</cell><cell>Derick</cell><cell>NL</cell><cell>Netherlands</cell> <cell>UserInput 1.1</cell><cell>Derick</cell><cell>NL</cell><cell>Netherlands</cell> <cell>Base 1.1</cell><cell>Sergey</cell><cell>UA</cell><cell>Ukraine</cell> <cell>Database 1.0</cell><cell>Sergey</cell><cell>UA</cell><cell>Ukraine</cell> <cell>...</cell><cell>...</cell><cell>...</cell><cell>...</cell> </table> <break/> <div effect="hide"> <list> <bullet>You can not store developers without component.</bullet> <bullet>Required to update multiple records when somebody moves.</bullet> </list> </div> </slide> http://cvs.php.net/viewcvs.cgi/presentations/slides/dbdesign/table-et-2NF.xml?view=markup&rev=1.1 Index: presentations/slides/dbdesign/table-et-2NF.xml +++ presentations/slides/dbdesign/table-et-2NF.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide> <title>Third Attempt</title> <subtitle>Our data in 2NF</subtitle> <blurb> *2NF*: "Any non-key columns must depend on the entire ~primary key~. In the case of a composite primary key, this means that a non-key column cannot depend on only part of the composite key." </blurb> <break lines="2" /> <table columns="4" class="dbtable" title="Component Developer"> <cell class="header-key">Component</cell><cell class="header-key">Name</cell><cell class="header-moved">C. Code</cell><cell class="header-moved">Country</cell> <cell>Base 1.0</cell><cell>Derick</cell><cell class="moved">NL</cell><cell class="moved">Netherlands</cell> <cell>DatabaseSchema 1.0</cell><cell>Derick</cell><cell class="moved">NL</cell><cell class="moved">Netherlands</cell> <cell>File 1.0</cell><cell>Derick</cell><cell class="moved">NL</cell><cell class="moved">Netherlands</cell> <cell>Base 1.1</cell><cell>Sergey</cell><cell class="moved">UA</cell><cell class="moved">Ukraine</cell> <cell>Database 1.0</cell><cell>Sergey</cell><cell class="moved">UA</cell><cell class="moved">Ukraine</cell> <cell>...</cell><cell>...</cell><cell class="moved">...</cell><cell class="moved">...</cell> </table> <table columns="3" class="dbtable" title="Developer"> <cell class="header-key">Name</cell><cell class="header-moved-to">C. Code</cell><cell class="header-moved-to">Country</cell> <cell>Derick</cell><cell class="moved-to">NL</cell><cell class="moved-to">Netherlands</cell> <cell>Frederik</cell><cell class="moved-to">NO</cell><cell class="moved-to">Norway</cell> <cell>Sergey</cell><cell class="moved-to">UA</cell><cell class="moved-to">Ukraine</cell> </table> </slide> http://cvs.php.net/viewcvs.cgi/presentations/slides/dbdesign/table-et-3NF.xml?view=markup&rev=1.1 Index: presentations/slides/dbdesign/table-et-3NF.xml +++ presentations/slides/dbdesign/table-et-3NF.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide> <title>Fourth Attempt</title> <subtitle>Our data in 3NF</subtitle> <blurb> *3NF*: "All columns must depend directly on the primary key." </blurb> <break lines="2" /> <table columns="3" class="dbtable" title="Developer"> <cell class="header-key">Name</cell><cell class="header">C. Code</cell><cell class="header-moved">Country</cell> <cell>Derick</cell><cell>NL</cell><cell class="moved">Netherlands</cell> <cell>Frederik</cell><cell>NO</cell><cell class="moved">Norway</cell> <cell>Raymond</cell><cell>NL</cell><cell class="moved">Netherlands</cell> <cell>Sergey</cell><cell>UA</cell><cell class="moved">Ukraine</cell> </table> <table columns="2" class="dbtable" title="Country"> <cell class="header-key">C. Code</cell><cell class="header-moved-to">Country</cell> <cell>NL</cell><cell class="moved-to">Netherlands</cell> <cell>NO</cell><cell class="moved-to">Norway</cell> <cell>UA</cell><cell class="moved-to">Ukraine</cell> </table> </slide> http://cvs.php.net/viewcvs.cgi/presentations/slides/dbdesign/title.xml?view=markup&rev=1.1 Index: presentations/slides/dbdesign/title.xml +++ presentations/slides/dbdesign/title.xml <slide template="titlepage" fontsize="3.5em"> <title>Welcome!</title> </slide>
http://cvs.php.net/viewcvs.cgi/presentations/db-phptek6.xml?view=markup&rev=1.1 Index: presentations/db-phptek6.xml +++ presentations/db-phptek6.xml <?xml version="1.0" encoding="iso-8859-1"?> <presentation template="css" navmode="html" navbarbackground="#4373b4" navbartopiclinks="0" navColor="#f1fbff" logo1="" stylesheet="presentations/slides/perf/ezp.css" backgroundfixed="1" > <topic>Databases</topic> <title>A Developer's Guide to Successful Database Design</title> <event>php|tek</event> <location>Orlando, Florida</location> <date>April 25th, 2006</date> <speaker>Derick Rethans</speaker> <email>dr@ez.no</email> <url>http://files.derickrethans.nl/db-phptek6.pdf</url> <slide>slides/dbdesign/title.xml</slide> <!-- CONTENTS --> <slide>slides/dbdesign/content.xml</slide> <!-- DESIGN --> <slide>slides/dbdesign/exemple-data-et.xml</slide> <slide>slides/dbdesign/table-et-0NF.xml</slide> <slide>slides/dbdesign/1nf.xml</slide> <slide>slides/dbdesign/table-et-1NF.xml</slide> <slide>slides/dbdesign/2nf.xml</slide> <slide>slides/dbdesign/table-et-1NF-primary-key.xml</slide> <slide>slides/dbdesign/table-et-2NF.xml</slide> <slide>slides/dbdesign/3nf.xml</slide> <slide>slides/dbdesign/table-et-3NF.xml</slide> <slide>slides/dbdesign/back-to-1nf.xml</slide> <slide>slides/dbdesign/erd1.xml</slide> <slide>slides/dbdesign/surrogate-pks.xml</slide> <slide>slides/dbdesign/surrogate-pks2.xml</slide> <slide>slides/dbdesign/erd2.xml</slide> <slide>slides/dbdesign/relations-1-1.xml</slide> <slide>slides/dbdesign/relations-1-n.xml</slide> <slide>slides/dbdesign/relations-n-m.xml</slide> <slide>slides/dbdesign/singular-vs-plural-names.xml</slide> <slide>slides/dbdesign/naming-columns.xml</slide> <slide>slides/dbdesign/in-sql.xml</slide> <slide>slides/dbdesign/column-types.xml</slide> <slide>slides/dbdesign/.xml</slide> <slide>slides/dbdesign/.xml</slide> <slide>slides/dbdesign/.xml</slide> <slide>slides/dbdesign/.xml</slide> <slide>slides/dbdesign/.xml</slide> <slide>slides/dbdesign/.xml</slide> <slide>slides/dbdesign/.xml</slide> <slide>slides/dbdesign/.xml</slide> </presentation> http://cvs.php.net/viewcvs.cgi/presentations/slides/dbdesign/1nf.xml?view=markup&rev=1.1 Index: presentations/slides/dbdesign/1nf.xml +++ presentations/slides/dbdesign/1nf.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide> <title>First Normal Form</title> <subtitle>1NF</subtitle> <break lines="8"/> <blurb class="large_blurb_center"> All values in each column of a table are atomic. This means that there are no sets of values within a column. </blurb> </slide> http://cvs.php.net/viewcvs.cgi/presentations/slides/dbdesign/2nf.xml?view=markup&rev=1.1 Index: presentations/slides/dbdesign/2nf.xml +++ presentations/slides/dbdesign/2nf.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide> <title>Second Normal Form</title> <subtitle>2NF</subtitle> <break lines="8"/> <blurb class="large_blurb_center"> Any non-key columns must depend on the entire primary key. In the case of a composite primary key, this means that a non-key column cannot depend on only part of the composite key. </blurb> </slide> http://cvs.php.net/viewcvs.cgi/presentations/slides/dbdesign/3nf.xml?view=markup&rev=1.1 Index: presentations/slides/dbdesign/3nf.xml +++ presentations/slides/dbdesign/3nf.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide> <title>Third Normal Form</title> <subtitle>3NF</subtitle> <break lines="8"/> <blurb class="large_blurb_center"> All columns must depend directly on the primary key. </blurb> </slide> http://cvs.php.net/viewcvs.cgi/presentations/slides/dbdesign/back-to-1nf.xml?view=markup&rev=1.1 Index: presentations/slides/dbdesign/back-to-1nf.xml +++ presentations/slides/dbdesign/back-to-1nf.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide> <title>First Normal Form Revised</title> <blurb> *1NF*: "All values in each column of a table are ~atomic~. This means that there are no sets of values within a column." </blurb> <break/> <table columns="2" class="dbtable" title="Component Developer"> <cell class="header-key">Component</cell><cell class="header-key">Name</cell> <cell>Base 1.0</cell><cell>Derick</cell> <cell>DatabaseSchema 1.0</cell><cell>Derick</cell> <cell>File 1.0</cell><cell>Derick</cell> <cell>...</cell><cell>...</cell> </table> <table columns="3" class="dbtable" title="DeveloperComponentVersion"> <cell class="header-key-moved-to">Component</cell><cell class="header-key-moved-to">Component Version</cell><cell class="header-key">Name</cell> <cell class="moved-to">Base</cell><cell class="moved-to">1.0</cell><cell>Derick</cell> <cell class="moved-to">DatabaseSchema</cell><cell class="moved-to">1.0</cell><cell>Derick</cell> <cell class="moved-to">File</cell><cell class="moved-to">1.0</cell><cell>Derick</cell> <cell class="moved-to">...</cell><cell class="moved-to">...</cell><cell>...</cell> </table> </slide> http://cvs.php.net/viewcvs.cgi/presentations/slides/dbdesign/content.xml?view=markup&rev=1.1 Index: presentations/slides/dbdesign/content.xml +++ presentations/slides/dbdesign/content.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide fontsize="6em"> <title>Contents</title> <blurb>Design</blurb> <list> <bullet>Table Design</bullet> <bullet>ER Diagrams</bullet> <bullet>Normalization</bullet> <bullet>Relations</bullet> <bullet>Intregity</bullet> </list> <blurb>Performance</blurb> <list> <bullet>Indexes</bullet> <bullet>Denormalization</bullet> <bullet>Triggers</bullet> <bullet>Stored Procedures</bullet> </list> <blurb>Tips & Tricks</blurb> <list> <bullet>Nested Set</bullet> <bullet>Trees</bullet> </list> </slide> http://cvs.php.net/viewcvs.cgi/presentations/slides/dbdesign/erd1.xml?view=markup&rev=1.1 Index: presentations/slides/dbdesign/erd1.xml +++ presentations/slides/dbdesign/erd1.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide> <title>Entity Relationship Diagram</title> <subtitle>Our Design in an ERD</subtitle> <image filename="erd1.png"/> </slide> http://cvs.php.net/viewcvs.cgi/presentations/slides/dbdesign/erd2.xml?view=markup&rev=1.1 Index: presentations/slides/dbdesign/erd2.xml +++ presentations/slides/dbdesign/erd2.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide> <title>Entity Relationship Diagram</title> <subtitle>Our Extended Design in an ERD</subtitle> <image filename="erd2.png"/> </slide> http://cvs.php.net/viewcvs.cgi/presentations/slides/dbdesign/exemple-data-et.xml?view=markup&rev=1.1 Index: presentations/slides/dbdesign/exemple-data-et.xml +++ presentations/slides/dbdesign/exemple-data-et.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide> <title>Some Sample Data</title> <subtitle>The Data</subtitle> <list> <bullet>"|ff0000|Derick| lives in |00bb00|Netherlands (NL)| and works on |0000ff|Base 1.0, DatabaseSchema 1.0, File 1.0 and 1.1, Translation 1.0 and 1.1, UserInput 1.0 and 1.1|"</bullet> <bullet>"|ff0000|Sergey| lives in |00bb00|Ukraine (UA)| and works on |0000ff|Base 1.1, Database 1.0 and 1.1, PersistentObject 1.1, SystemInformation 1.0|"</bullet> <bullet>"|ff0000|Frederik| lives in |00bb00|Norway (NO)| and works on |0000ff|Database 1.0 and 1.1, Mail 1.0 and 1.1, PersistentObject 1.0|"</bullet> </list> </slide> http://cvs.php.net/viewcvs.cgi/presentations/slides/dbdesign/naming-columns.xml?view=markup&rev=1.1 Index: presentations/slides/dbdesign/naming-columns.xml +++ presentations/slides/dbdesign/naming-columns.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide> <title>Naming Columns</title> <blurb>Normal columns are straight forward.</blurb> <blurb>For columns that refer to another table, it is useful to:</blurb> <list> <bullet> </bullet> </list> </slide> http://cvs.php.net/viewcvs.cgi/presentations/slides/dbdesign/relations-1-1.xml?view=markup&rev=1.1 Index: presentations/slides/dbdesign/relations-1-1.xml +++ presentations/slides/dbdesign/relations-1-1.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide> <title>Relations</title> <subtitle>One to One relations</subtitle> <blurb> Usually does not need a seperate table. But can be useful to save space: </blurb> <break lines="8"/> <image filename="1-1.png" /> </slide> http://cvs.php.net/viewcvs.cgi/presentations/slides/dbdesign/relations-1-n.xml?view=markup&rev=1.1 Index: presentations/slides/dbdesign/relations-1-n.xml +++ presentations/slides/dbdesign/relations-1-n.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide> <title>Relations</title> <subtitle>One to Many relations</subtitle> <blurb> Most frequently used type of relation: </blurb> <break lines="8"/> <image filename="1-n.png" /> </slide> http://cvs.php.net/viewcvs.cgi/presentations/slides/dbdesign/relations-n-m.xml?view=markup&rev=1.1 Index: presentations/slides/dbdesign/relations-n-m.xml +++ presentations/slides/dbdesign/relations-n-m.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide> <title>Relations</title> <subtitle>Many to Many relations</subtitle> <blurb> You need a special table to record the relation itself: </blurb> <break lines="2"/> <image filename="n-m.png" /> </slide> http://cvs.php.net/viewcvs.cgi/presentations/slides/dbdesign/singular-vs-plural-names.xml?view=markup&rev=1.1 Index: presentations/slides/dbdesign/singular-vs-plural-names.xml +++ presentations/slides/dbdesign/singular-vs-plural-names.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide> <title>Naming Tables</title> <blurb>Two major options:</blurb> <list> <bullet>Singular names: Component, ComponentVersion, Developer, Country</bullet> <bullet>Plural names: Component~s~, ComponentVersion~s~, Developer~s~, Countrie~s~</bullet> </list> <break/> <blurb>Naming "connection tables" for Many to Many relations:</blurb> <list> <bullet> Include the names of both tables into the name (|ff0000|Developer| + |0000ff|ComponentVersion| -> |ff0000|Developer||0000ff|ComponentVersion|) </bullet> <bullet> Optionally add ~Relation~ to this name (|ff0000|Developer| + |0000ff|ComponentVersion| -> |ff0000|Developer||0000ff|ComponentVersion|~Relation~) </bullet> </list> </slide> http://cvs.php.net/viewcvs.cgi/presentations/slides/dbdesign/surrogate-pks.xml?view=markup&rev=1.1 Index: presentations/slides/dbdesign/surrogate-pks.xml +++ presentations/slides/dbdesign/surrogate-pks.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide> <title>Primary Key Mangling</title> <table columns="3" class="dbtable" title="DeveloperComponentVersion"> <cell class="header-key">Component</cell><cell class="header-key">Component Version</cell><cell class="header-key">Developer Name</cell> <cell>Base</cell><cell>1.0</cell><cell>Derick</cell> <cell>Base</cell><cell>1.1</cell><cell>Sergey</cell> </table> <table columns="3" class="dbtable" title="ComponentVersion"> <cell class="header-key">Component</cell><cell class="header-key">Component Version</cell><cell class="header">Release Date</cell> <cell>Base</cell><cell>1.0</cell><cell>2006-01-07</cell> <cell>Base</cell><cell>1.1</cell><cell>~NULL~</cell> </table> <div effect="hide"> <blurb>to:</blurb> <table columns="2" class="dbtable" title="DeveloperComponentVersion"> <cell class="header-key">Component Version ID</cell><cell class="header-key">Developer Name</cell> <cell>1</cell><cell>Derick</cell> <cell>3</cell><cell>Sergey</cell> </table> <table columns="4" class="dbtable" title="ComponentVersion"> <cell class="header-key">ID</cell><cell class="header-candidate-key">Component</cell><cell class="header-candidate-key">Component Version</cell><cell class="header">Release Date</cell> <cell>1</cell><cell>Base</cell><cell>1.0</cell><cell>2006-01-07</cell> <cell>3</cell><cell>Base</cell><cell>1.1</cell><cell>~NULL~</cell> </table> </div> </slide> http://cvs.php.net/viewcvs.cgi/presentations/slides/dbdesign/surrogate-pks2.xml?view=markup&rev=1.1 Index: presentations/slides/dbdesign/surrogate-pks2.xml +++ presentations/slides/dbdesign/surrogate-pks2.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide> <title>Primary Key Mangling</title> <subtitle>or surrogate keys as they are called.</subtitle> <table columns="4" class="dbtable" title="ComponentVersion"> <cell class="header-key">ID</cell><cell class="header-candidate-key">Component</cell><cell class="header-candidate-key">Component Version</cell><cell class="header">Release Date</cell> <cell>1</cell><cell>Base</cell><cell>1.0</cell><cell>2006-01-07</cell> <cell>3</cell><cell>Base</cell><cell>1.1</cell><cell>~NULL~</cell> </table> <list> <bullet>|0000ff|Component, Component Version| was the original primary key and still identifies each record uniquely.</bullet> <bullet>A (combination of) key(s) that identify a record uniquely is called a *candidate key*.</bullet> <bullet>One of the candidate keys can be defined as the primary key (|ff0000|ID| in the example above).</bullet> <bullet>|ff0000|ID| is an artificial key (surrogate key).</bullet> <bullet>A surrogate key is not always required, but can increase performance while joining or selecting.</bullet> </list> </slide> http://cvs.php.net/viewcvs.cgi/presentations/slides/dbdesign/table-et-0NF.xml?view=markup&rev=1.1 Index: presentations/slides/dbdesign/table-et-0NF.xml +++ presentations/slides/dbdesign/table-et-0NF.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide> <title>First Attempt</title> <table columns="4" class="dbtable" title="Component Developer"> <cell class="header">Components</cell><cell class="header">Name</cell><cell class="header">C. Code</cell><cell class="header">Country</cell> <cell>Base 1.0</cell><cell>Derick</cell><cell>NL</cell><cell>Netherlands</cell> <cell>DatabaseSchema 1.0</cell><cell>Derick</cell><cell>NL</cell><cell>Netherlands</cell> <cell>File 1.0, File 1.1</cell><cell>Derick</cell><cell>NL</cell><cell>Netherlands</cell> <cell>Translation 1.0, Translation 1.1</cell><cell>Derick</cell><cell>NL</cell><cell>Netherlands</cell> <cell>UserInput 1.0, UserInput 1.1</cell><cell>Derick</cell><cell>NL</cell><cell>Netherlands</cell> <cell>Base 1.1</cell><cell>Sergey</cell><cell>UA</cell><cell>Ukraine</cell> <cell>Database 1.0, Database 1.1</cell><cell>Sergey</cell><cell>UA</cell><cell>Ukraine</cell> <cell>PersistentObject 1.1</cell><cell>Sergey</cell><cell>UA</cell><cell>Ukraine</cell> <cell>SystemInformation 1.0</cell><cell>Sergey</cell><cell>UA</cell><cell>Ukraine</cell> <cell>Database 1.0, Database 1.1</cell><cell>Frederik</cell><cell>NO</cell><cell>Norway</cell> <cell>Mail 1.0, Mail 1.1</cell><cell>Frederik</cell><cell>NO</cell><cell>Norway</cell> <cell>PersistentObject 1.0</cell><cell>Frederik</cell><cell>NO</cell><cell>Norway</cell> </table> <div effect="hide"> <break/> <list> <bullet>It is impossible to find out which component is developed by whom.</bullet> <!-- <bullet>You can not store developers without component.</bullet> --> </list> </div> </slide> http://cvs.php.net/viewcvs.cgi/presentations/slides/dbdesign/table-et-1NF-primary-key.xml?view=markup&rev=1.1 Index: presentations/slides/dbdesign/table-et-1NF-primary-key.xml +++ presentations/slides/dbdesign/table-et-1NF-primary-key.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide> <title>Primary Keys</title> <blurb> *2NF*: "Any non-key columns must depend on the entire ~primary key~..." </blurb> <break lines="2" /> <table columns="4" class="dbtable" title="Component Developer"> <cell class="header">Component</cell><cell class="header">Name</cell><cell class="header">C. Code</cell><cell class="header">Country</cell> <cell>Base 1.0</cell><cell>Derick</cell><cell>NL</cell><cell>Netherlands</cell> <cell>File 1.0</cell><cell>Derick</cell><cell>NL</cell><cell>Netherlands</cell> <cell>File 1.1</cell><cell>Derick</cell><cell>NL</cell><cell>Netherlands</cell> </table> <break/> <blurb> A *primary key* is a value that can be used to identify a unique row in a table. </blurb> <break lines="2" /> <div effect="hide"> <table columns="4" class="dbtable" title="Component Developer"> <cell class="header-key">Component</cell><cell class="header-key">Name</cell><cell class="header">C. Code</cell><cell class="header">Country</cell> <cell>Base 1.0</cell><cell>Derick</cell><cell>NL</cell><cell>Netherlands</cell> <cell>File 1.0</cell><cell>Derick</cell><cell>NL</cell><cell>Netherlands</cell> <cell>File 1.1</cell><cell>Derick</cell><cell>NL</cell><cell>Netherlands</cell> </table> <break/> </div> </slide> http://cvs.php.net/viewcvs.cgi/presentations/slides/dbdesign/table-et-1NF.xml?view=markup&rev=1.1 Index: presentations/slides/dbdesign/table-et-1NF.xml +++ presentations/slides/dbdesign/table-et-1NF.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide> <title>Second Attempt</title> <subtitle>Our data in 1NF</subtitle> <table columns="4" class="dbtable" title="Component Developer"> <cell class="header">Component</cell><cell class="header">Name</cell><cell class="header">C. Code</cell><cell class="header">Country</cell> <cell>Base 1.0</cell><cell>Derick</cell><cell>NL</cell><cell>Netherlands</cell> <cell>DatabaseSchema 1.0</cell><cell>Derick</cell><cell>NL</cell><cell>Netherlands</cell> <cell>File 1.0</cell><cell>Derick</cell><cell>NL</cell><cell>Netherlands</cell> <cell>File 1.1</cell><cell>Derick</cell><cell>NL</cell><cell>Netherlands</cell> <cell>Translation 1.0</cell><cell>Derick</cell><cell>NL</cell><cell>Netherlands</cell> <cell>Translation 1.1</cell><cell>Derick</cell><cell>NL</cell><cell>Netherlands</cell> <cell>UserInput 1.0</cell><cell>Derick</cell><cell>NL</cell><cell>Netherlands</cell> <cell>UserInput 1.1</cell><cell>Derick</cell><cell>NL</cell><cell>Netherlands</cell> <cell>Base 1.1</cell><cell>Sergey</cell><cell>UA</cell><cell>Ukraine</cell> <cell>Database 1.0</cell><cell>Sergey</cell><cell>UA</cell><cell>Ukraine</cell> <cell>...</cell><cell>...</cell><cell>...</cell><cell>...</cell> </table> <break/> <div effect="hide"> <list> <bullet>You can not store developers without component.</bullet> <bullet>Required to update multiple records when somebody moves.</bullet> </list> </div> </slide> http://cvs.php.net/viewcvs.cgi/presentations/slides/dbdesign/table-et-2NF.xml?view=markup&rev=1.1 Index: presentations/slides/dbdesign/table-et-2NF.xml +++ presentations/slides/dbdesign/table-et-2NF.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide> <title>Third Attempt</title> <subtitle>Our data in 2NF</subtitle> <blurb> *2NF*: "Any non-key columns must depend on the entire ~primary key~. In the case of a composite primary key, this means that a non-key column cannot depend on only part of the composite key." </blurb> <break lines="2" /> <table columns="4" class="dbtable" title="Component Developer"> <cell class="header-key">Component</cell><cell class="header-key">Name</cell><cell class="header-moved">C. Code</cell><cell class="header-moved">Country</cell> <cell>Base 1.0</cell><cell>Derick</cell><cell class="moved">NL</cell><cell class="moved">Netherlands</cell> <cell>DatabaseSchema 1.0</cell><cell>Derick</cell><cell class="moved">NL</cell><cell class="moved">Netherlands</cell> <cell>File 1.0</cell><cell>Derick</cell><cell class="moved">NL</cell><cell class="moved">Netherlands</cell> <cell>Base 1.1</cell><cell>Sergey</cell><cell class="moved">UA</cell><cell class="moved">Ukraine</cell> <cell>Database 1.0</cell><cell>Sergey</cell><cell class="moved">UA</cell><cell class="moved">Ukraine</cell> <cell>...</cell><cell>...</cell><cell class="moved">...</cell><cell class="moved">...</cell> </table> <table columns="3" class="dbtable" title="Developer"> <cell class="header-key">Name</cell><cell class="header-moved-to">C. Code</cell><cell class="header-moved-to">Country</cell> <cell>Derick</cell><cell class="moved-to">NL</cell><cell class="moved-to">Netherlands</cell> <cell>Frederik</cell><cell class="moved-to">NO</cell><cell class="moved-to">Norway</cell> <cell>Sergey</cell><cell class="moved-to">UA</cell><cell class="moved-to">Ukraine</cell> </table> </slide> http://cvs.php.net/viewcvs.cgi/presentations/slides/dbdesign/table-et-3NF.xml?view=markup&rev=1.1 Index: presentations/slides/dbdesign/table-et-3NF.xml +++ presentations/slides/dbdesign/table-et-3NF.xml <?xml version="1.0" encoding="ISO-8859-1"?> <slide> <title>Fourth Attempt</title> <subtitle>Our data in 3NF</subtitle> <blurb> *3NF*: "All columns must depend directly on the primary key." </blurb> <break lines="2" /> <table columns="3" class="dbtable" title="Developer"> <cell class="header-key">Name</cell><cell class="header">C. Code</cell><cell class="header-moved">Country</cell> <cell>Derick</cell><cell>NL</cell><cell class="moved">Netherlands</cell> <cell>Frederik</cell><cell>NO</cell><cell class="moved">Norway</cell> <cell>Raymond</cell><cell>NL</cell><cell class="moved">Netherlands</cell> <cell>Sergey</cell><cell>UA</cell><cell class="moved">Ukraine</cell> </table> <table columns="2" class="dbtable" title="Country"> <cell class="header-key">C. Code</cell><cell class="header-moved-to">Country</cell> <cell>NL</cell><cell class="moved-to">Netherlands</cell> <cell>NO</cell><cell class="moved-to">Norway</cell> <cell>UA</cell><cell class="moved-to">Ukraine</cell> </table> </slide> http://cvs.php.net/viewcvs.cgi/presentations/slides/dbdesign/title.xml?view=markup&rev=1.1 Index: presentations/slides/dbdesign/title.xml +++ presentations/slides/dbdesign/title.xml <slide template="titlepage" fontsize="3.5em"> <title>Welcome!</title> </slide>