Website/src/teaching/cse-562/2017sp/slides/2017-01-31-Intro.html

755 lines
28 KiB
HTML
Executable File

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>CSE 562 - Database Systems</title>
<meta name="description" content="CSE-562 Database Systems">
<meta name="author" content="Oliver Kennedy">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="stylesheet" href="reveal/css/reveal.css">
<link rel="stylesheet" href="reveal/css/theme/simple.css" id="theme">
<!-- Theme used for syntax highlighting of code -->
<link rel="stylesheet" href="reveal/lib/css/zenburn.css">
<!-- Printing and PDF exports -->
<script>
var link = document.createElement( 'link' );
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = window.location.search.match( /print-pdf/gi ) ? 'reveal/css/print/pdf.css' : 'reveal/css/print/paper.css';
document.getElementsByTagName( 'head' )[0].appendChild( link );
</script>
<!--[if lt IE 9]>
<script src="reveal/lib/js/html5shiv.js"></script>
<![endif]-->
</head>
<body><div class="reveal"><div class="slides">
<!-- ############################################################################# -->
<!-- ########################## BEGIN PRESENTATION BODY ########################## -->
<!-- ############################################################################# -->
<section>
<section>
<h1>CSE 562</h1>
<h2>Database Systems</h2>
<h4>Oliver Kennedy</h4>
<h4><a href="mailto:okennedy@buffalo.edu">okennedy@buffalo.edu</a></h4>
<h4><a href="http://www.buffalo.edu/buildings/building?id=ketter">133A Ketter Hall</a></h4>
</section>
<section>
<h1>Why are databases awesome?</h1>
</section>
<section>
<h2>They're everywhere</h2>
<img src="Images/SqlitePhone.png" />
</section>
<section>
<h2>They combine everything</h2>
<svg width="650" height="500">
<circle cx="150" cy="150" r="120" fill="yellow" opacity="0.4" />
<text x="55" y="110" font-size="26">Algorithms</text>
<circle cx="150" cy="300" r="120" fill="green" opacity="0.4" />
<text x="290" y="110" font-size="26">Systems</text>
<circle cx="300" cy="150" r="120" fill="blue" opacity="0.4" />
<text x="55" y="340" font-size="26">Hardware</text>
<circle cx="300" cy="300" r="120" fill="red" opacity="0.4" />
<text x="290" y="340" font-size="26">Theory</text>
<text x="450" y="240" class="fragment" data-fragment-index="1">Databases</text>
<polygon points="450,227 225,227 240,222 240,232 225,227"
stroke="black" fill="black" stroke-width="2"
class="fragment" data-fragment-index="1"/>
</svg>
</section>
<section>
<h2>They're $$</h2>
<table style="text-align:center; font-size: 16pt">
<thead><tr>
<th class="headerSort" tabindex="0" role="columnheader button" title="Sort ascending">Rank</th>
<th class="headerSort" tabindex="0" role="columnheader button" title="Sort ascending">Organization</th>
<th class="headerSort" tabindex="0" role="columnheader button" title="Sort ascending">Sales</th>
<th class="headerSort" tabindex="0" role="columnheader button" title="Sort ascending">FY</th>
<th class="headerSort" tabindex="0" role="columnheader button" title="Sort ascending">Market cap</th>
<th class="headerSort" tabindex="0" role="columnheader button" title="Sort ascending">Headquarters</th>
</tr></thead><tbody>
<tr>
<td class="fragment highlight-red grow" data-fragment-index="1">1</td>
<td class="fragment highlight-red grow" data-fragment-index="1"><a href="http://wikipedia.org/wiki/Microsoft" title="Microsoft">Microsoft</a></td>
<td>$97.58</td>
<td>2015</td>
<td>$340.8</td>
<td><a href="http://wikipedia.org/wiki/Redmond,_Washington" title="Redmond, Washington">Redmond</a>, WA, US</td>
</tr>
<tr>
<td class="fragment highlight-red grow" data-fragment-index="1">2</td>
<td class="fragment highlight-red grow" data-fragment-index="1"><a href="http://wikipedia.org/wiki/Oracle_Corporation" title="Oracle Corporation">Oracle</a></td>
<td>$38.8</td>
<td>2015</td>
<td>$187.6</td>
<td><a href="http://wikipedia.org/wiki/Redwood_City,_California" title="Redwood City, California">Redwood City</a>, CA, US</td>
</tr>
<tr>
<td class="fragment highlight-red grow" data-fragment-index="1">3</td>
<td class="fragment highlight-red grow" data-fragment-index="1"><a href="http://wikipedia.org/wiki/SAP_AG" class="mw-redirect" title="SAP AG">SAP</a></td>
<td>$23.3</td>
<td>2015</td>
<td>$90.2</td>
<td><a href="http://wikipedia.org/wiki/Walldorf" title="Walldorf">Walldorf</a>, Germany</td>
</tr>
<tr>
<td>4</td>
<td><a href="http://wikipedia.org/wiki/VMware" title="VMware">VMware</a></td>
<td>$6</td>
<td>2015</td>
<td>$35.7</td>
<td><a href="http://wikipedia.org/wiki/Palo_Alto,_California" title="Palo Alto, California">Palo Alto</a>, CA, US</td>
</tr>
<tr>
<td>5</td>
<td><a href="http://wikipedia.org/wiki/Symantec" title="Symantec">Symantec</a></td>
<td>$6.6</td>
<td>2015</td>
<td>$16.3</td>
<td><a href="http://wikipedia.org/wiki/Mountain_View,_California" title="Mountain View, California">Mountain View</a>, CA, US</td>
</tr>
<tr>
<td>6</td>
<td><a href="http://wikipedia.org/wiki/HCL_Technologies" title="HCL Technologies">HCL Technologies</a></td>
<td>$5.2</td>
<td>2015</td>
<td>$21.1</td>
<td><a href="http://wikipedia.org/wiki/Noida" title="Noida">Noida</a>, UP, India</td>
</tr>
<tr>
<td class="fragment highlight-red grow" data-fragment-index="1">7</td>
<td class="fragment highlight-red grow" data-fragment-index="1"><a href="http://wikipedia.org/wiki/Fiserv" title="Fiserv">Fiserv</a></td>
<td>$5.1</td>
<td>2015</td>
<td>$19</td>
<td><a href="http://wikipedia.org/wiki/Brookfield,_Wisconsin" title="Brookfield, Wisconsin">Brookfield</a>, WI, US</td>
</tr>
<tr>
<td class="fragment highlight-red grow" data-fragment-index="1">8</td>
<td class="fragment highlight-red grow" data-fragment-index="1"><a href="http://wikipedia.org/wiki/Intuit" title="Intuit">Intuit</a></td>
<td>$4.6</td>
<td>2015</td>
<td>$27.1</td>
<td><a href="http://wikipedia.org/wiki/Mountain_View,_California" title="Mountain View, California">Mountain View</a>, CA, US</td>
</tr>
<tr>
<td class="fragment highlight-red grow" data-fragment-index="1">9</td>
<td class="fragment highlight-red grow" data-fragment-index="1"><a href="http://wikipedia.org/wiki/Amadeus_IT_Group" title="Amadeus IT Group">Amadeus IT Group</a></td>
<td>$4.5</td>
<td>2013</td>
<td>$19.8</td>
<td><a href="http://wikipedia.org/wiki/Madrid" title="Madrid">Madrid</a>, Spain</td>
</tr>
<tr>
<td class="fragment highlight-red grow" data-fragment-index="1">10</td>
<td class="fragment highlight-red grow" data-fragment-index="1"><a href="http://wikipedia.org/wiki/CA_Technologies" title="CA Technologies">CA Technologies</a></td>
<td>$4.3</td>
<td>2015</td>
<td>$14.3</td>
<td><a href="http://wikipedia.org/wiki/Islandia,_New_York" title="Islandia, New York">Islandia</a>, NY, US</td>
</tr>
</tbody><tfoot></tfoot></table>
<font size="2pt">(<a href="https://en.wikipedia.org/wiki/List_of_the_largest_software_companies">https://en.wikipedia.org/wiki/List_of_the_largest_software_companies</a>)</font>
<p style="font-size:20pt" class="fragment" data-fragment-index="1">7 out of the largest 10 software companies ($698.8bn out of $771.9bn)<br/>make their money in databases <span class="fragment" data-fragment-index="2">(and most of the others are data-adjacent)</span></p>
</section>
</section>
<section>
<section>
<h1>Ok... so what's "databases"?</h1>
</section>
<section>
<h2>Databases</h2>
<div class="fragment">
<h3>Answering questions about data</h3>
<ul>
<li>Ensuring Result Accuracy</li>
<li>Combining Multiple Sources</li>
<li>Making question-answering fast</li>
<li>Summarizing big data</li>
</ul>
</div>
<div class="fragment" style="margin-top:20px">
<h3>Safely making changes to data</h3>
<ul>
<li>Preventing "buggy" data</li>
<li>Keeping copies consistent</li>
<li>Updating data in parallel</li>
</ul>
</section>
<section>
<h3>Techniques</h3>
<ul>
<li>Data Modeling</li>
<li>Cost-Based Optimization</li>
</ul>
<h3 style="margin-top:20px">Recipes</h3>
<ul>
<li>Join Algorithms</li>
<li>Index Data Structures</li>
</ul>
<h3 style="margin-top:20px">Knowledge</h3>
<ul>
<li>The Memory Hierarchy</li>
<li>Equivalence Rules</li>
</ul>
</section>
<section>
<h2>Which tools to use</h2><h2 class="fragment">... and when</h2>
</section>
<section>
<h2>This Course in Short</h2>
<p>For <b>X</b>, the best, correct choice is <b>Y</b>, at least when <b>Z</b></p>
<ul>
<li>How do you define 'correct' and 'best'?</li>
<li>What correct alternatives are available?</li>
<li>How do you find the best available alternative?</li>
</ul>
</section>
<section>
<h2>What is 'Better'?</h2>
<ul>
<li><b>Declarative Queries</b>: 'Easy to think about' vs 'Fast'
<li><b>Data Layouts</b>: Space vs Fast Updates vs Fast Queries</li>
<li><b>Parallel Updates</b>: Reactive vs Proactive Concurrency</li>
</ul>
</section>
</section>
<section>
<section>
<h2>Today</h2>
<ul>
<li><b>Logistics</b>: What you need to know </li>
<li><b>Project Outline</b>: A relational query engine</li>
<li><b>Ways to Fail</b>: What not to do and why</li>
<li><b>Intro</b>: So what is a database anyway?</li>
<li><b>SQL</b>: Recapping everyone's favorite language</li>
</ul>
</section>
<section>
<h2>People</h2>
<ul>
<li><b>Oliver Kennedy</b> (<a href="mailto:okennedy@buffalo.edu">okennedy@buffalo.edu</a>)<br/><a href="http://www.buffalo.edu/buildings/building?id=ketter">Ketter 133A</a>; Thu 2:00-3:00</li>
<li><b>Liuyi Yao</b> (<a href="mailto:liuyiyao@buffalo.edu">liuyiyao@buffalo.edu</a>)<br/><a href="http://www.buffalo.edu/buildings/building?id=davis">Davis 338H</a>; Mon 4:00-5:00</li>
<li><b>Alex Stachnik</b> (<a href="mailto:ajstachn@buffalo.edu">ajstachn@buffalo.edu</a>)<br/><a href="http://www.buffalo.edu/buildings/building?id=davis">Davis 338H</a>; Wed 3:00-4:00</li>
</ul>
</section>
<section>
<h2>Syllabus &amp; Website<h2>
<h4><a href="https://odin.cse.buffalo.edu/teaching/cse-562">https://odin.cse.buffalo.edu/teaching/cse-562</a></h4>
<h2>Course Project<h2>
<h4><a href="http://dubstep.odin.cse.buffalo.edu">http://dubstep.odin.cse.buffalo.edu</a></h4>
</section>
<section>
<h2>Course Structure</h2>
<ul>
<li style="margin-top: 30px"><b>Programming Assignment</b> (50% of overall grade)<br/>
3-person Groups
Build a Relational Query Engine
</li>
<li style="margin-top: 30px"><b>Theoretical Content</b> (50% of overall grade)<ul>
<li><b>Midterm on <u>March 4</u></b> (15% of overall grade)</li>
<li><b>Midterm on <u>Apr 8</u></b> (15% of overall grade)</li>
<li><b>Comprehensive Final Exam</b> (20% of overall grade)</li>
</ul></li>
</ul>
</section>
<section>
<h2>Optional Textbook 1</h2>
<a href="https://smile.amazon.com/Patterns-Data-Management-Flipped-Textbook/dp/1523853964/ref=sr_1_1?ie=UTF8&qid=1483409680&sr=8-1&keywords=patterns+in+data+management"><img src="Images/Books/PatternsInDM.jpg" /></a>
</section>
<section>
<h2>Optional Textbook 2</h2>
<table>
<tr><th style="text-align: center;">Hardcover</th><th style="text-align: center;">Softcover</th></tr>
<tr><td style="text-align: center;">
<a href="https://smile.amazon.com/Database-Systems-Complete-Book-2nd/dp/0131873253/ref=sr_1_2?ie=UTF8&qid=1485812362&sr=8-2&keywords=database+systems+the+complete+book"><img src="Images/Books/DBSystemsHardcover.jpg" height="270px"/></a>
</td><td style="text-align: center;">
<a href="https://smile.amazon.com/Database-Systems-Complete-Book-Garcia-Molina/dp/933251867X/ref=sr_1_1?ie=UTF8&qid=1485812362&sr=8-1&keywords=database+systems+the+complete+book"><img src="Images/Books/DBSystemsSoftcover.jpg" height="270px"/></a>
</td></tr>
<tr>
<td style="text-align: center;">$160<br/></td>
<td style="text-align: center;">$25<br/></td>
</tr>
<tr class="fragment">
<td>has Index, ToC</td>
<td>no Index, ToC</td>
</tr>
</table>
</section>
<section>
<h2>Optional Textbook 3</h2>
<a href="https://smile.amazon.com/SQL-Minutes-Sams-Teach-Yourself/dp/0672336073/ref=sr_1_1?ie=UTF8&qid=1485829170&sr=8-1&keywords=sql+in+minutes"><img src="Images/Books/SqlIn10Min.jpg" /></a>
</section>
</section>
<section>
<section>
<h1>Course Project</h1>
<h2>Data µBases</h2>
</section>
<section>
<h3>Embedded Databases</h3>
<ul>
<li>SQLite is in your browser, computer, phone, ...</li>
<li>Declarative data management is awesome!</li>
<li>Tech needs small data: Mobile, IoT, Web</li>
</ul>
<p class="fragment"><b>Your team's goal:</b><br/>build <span style="color: grey">(part of)</span> an embedded database</p>
</section>
<section>
<h3>The Project</h3>
<ul>
<li>I give you data (CSV Files + A Schema)</li>
<li>I ask you questions about the data (SQL)</li>
<li>You give me an answer</li>
</ul>
</section>
<section>
<p><b>Real world challenge:</b> You start with...</p>
<ul>
<li>... an empty GIT repository</li>
<li>... a few open-source libraries</li>
</ul>
</section>
<section>
<p><b>Real world challenge:</b> You get graded on...</p>
<dl>
<dt>... Correctness</dt>
<dd>Do you produce the right answer?<br/>
<small>1/3 grade for computing the correct answer</small></dd>
<dt>... Speed</dt>
<dd>How fast did you produce the answer?<br/>
<small>2/3 grade for meeting or beating the reference implementation</small></dd>
</dl>
</section>
<section>
<h2>Submission</h2>
<!--class="fragment" data-fragment-index="1"-->
<svg width="600" height="500">
<g transform="translate(0 -100)">
<image x="0" y="150" xlink:href="Images/Java.png" width="120" height="120"
class="fragment" data-fragment-index="1" />
<text x="0" y="120" font-size="18pt"
class="fragment" data-fragment-index="1" >You write code</text>
<polygon points="120,210 240,210 220,206 220,214 240,210"
stroke="black" fill="black" stroke-width="2"
class="fragment" data-fragment-index="2" />
<image x="240" y="150" xlink:href="Images/GIT.png" width="120" height="120"
class="fragment" data-fragment-index="2" />
<text x="220" y="120" font-size="18pt"
class="fragment" data-fragment-index="2" >You push to GIT</text>
<polygon points="360,210 470,210 450,206 450,214 470,210"
stroke="black" fill="black" stroke-width="2"
class="fragment" data-fragment-index="3" />
<image x="480" y="150" xlink:href="Images/Submit.png" width="120" height="102"
class="fragment" data-fragment-index="3" />
<text x="480" y="120" font-size="18pt"
class="fragment" data-fragment-index="3" >Hit Submit</text>
<polygon points="540,262 540,345 536,325 544,325 540,345"
stroke="black" fill="black" stroke-width="2"
class="fragment" data-fragment-index="4" />
<image x="480" y="350" xlink:href="Images/JAR.png" width="120" height="120"
class="fragment" data-fragment-index="4" />
<text x="400" y="520" font-size="18pt"
class="fragment" data-fragment-index="4" >DµBStep compiles</text>
<polygon points="485,410 370,410 390,406 390,414 370,410"
stroke="black" fill="black" stroke-width="2"
class="fragment" data-fragment-index="5" />
<image x="240" y="320" xlink:href="Images/PiGrader.jpeg" width="120" height="160"
class="fragment" data-fragment-index="5" />
<text x="265" y="520" font-size="18pt"
class="fragment" data-fragment-index="5" >π&nbsp;s Run</text>
<polygon points="230,410 120,410 140,406 140,414 120,410"
stroke="black" fill="black" stroke-width="2"
class="fragment" data-fragment-index="6" />
<image x="0" y="350" xlink:href="Images/Email.png" width="120" height="107"
class="fragment" data-fragment-index="6" />
<text x="0" y="520" font-size="18pt"
class="fragment" data-fragment-index="6" >You get emailed</text>
<polygon points="60,350 60,270 56,290 64,290 60,270"
stroke="black" stroke-width="2"
class="fragment" data-fragment-index="7" />
<text x="20" y="320" font-size="18pt"
class="fragment" data-fragment-index="7" >Try&nbsp;&nbsp;&nbsp;again</text>
</g>
</svg>
</section>
<section>
<h2>Query Processor</h2>
<svg width="800" height="500">
<text x="0" y="70">SQL Query</text>
<g class="fragment">
<polygon points="80,0 0,0 20,-4 20,4 0,0"
stroke="black" fill="black" stroke-width="2"
transform="translate(287 58) rotate(180)"/>
<text x="300" y="70">Parsed SQL</text>
</g>
<g class="fragment">
<polygon points="80,0 0,0 20,-4 20,4 0,0"
stroke="black" fill="black" stroke-width="2"
transform="translate(587 58) rotate(180)"/>
<text x="600" y="70">Rel. Alg.</text>
</g>
<g class="fragment">
<polygon points="120,0 0,0 20,-4 20,4 0,0"
stroke="black" fill="black" stroke-width="2"
transform="translate(660 210) rotate(270)"/>
<text x="470" y="160">Statistics</text>
<polygon points="55,0 0,0 20,-4 20,4 0,0"
stroke="black" fill="black" stroke-width="2"
transform="translate(630 210) rotate(230)"/>
<text x="502" y="250">Optimized RA</text>
</g>
<g class="fragment">
<polygon points="120,0 0,0 20,-4 20,4 0,0"
stroke="black" fill="black" stroke-width="2"
transform="translate(660 390) rotate(270)"/>
<text x="490" y="430">Execution Plan</text>
</g>
<g class="fragment">
<polygon points="220,0 0,0 20,-4 20,4 0,0"
stroke="black" fill="black" stroke-width="2"
transform="translate(260 418)"/>
<text x="315" y="390">Data</text>
<polygon points="60,0 0,0 20,-4 20,4 0,0"
stroke="black" fill="black" stroke-width="2"
transform="translate(260 410) rotate(330)"/>
<text x="0" y="430">Query Results</text>
</g>
<g class="fragment">
<text x="140" y="120" fill="red" font-size="16pt">JSQLParser</text>
<polyline points="200,100 240,60" stroke="red">
</g>
<g class="fragment">
<rect x="505" y="0" fill="white" width="250" height="800" opacity="0.7"/>
<rect x="250" y="100" fill="white" width="255" height="400" opacity="0.7"/>
<polygon points="350,0 0,0 20,-4 20,4 0,0"
stroke="black" fill="black" stroke-width="2"
transform="translate(215 395) rotate(295)"/>
<text x="50" y="250" font-size="20pt">Checkpoint 0</text>
</g>
</svg>
</section>
<section>
<h2>DµBStep</h2>
<dl>
<dt>Checkpoint 0: "Hello World" due Feb 10</dt>
<dd><pre><code class="sql">SELECT * FROM FOO</code></pre></dd>
<dt>Checkpoint 1: "Expressions" due Mar 9</dt>
<dd><pre><code class="sql">SELECT A*23 FROM FOO WHERE B > 10</code></pre></dd>
<dt>Checkpoint 2: "Precomputation" due Apr 13</dt>
<dd><pre><code class="sql">SELECT SUM(A) FROM FOO WHERE B > 10</code></pre></dd>
<dt>Checkpoint 3: "Joins" due May 11</dt>
<dd><pre><code class="sql">SELECT SUM(A) FROM FOO, BAR WHERE B > 10</code></pre></dd>
</section>
</section>
<section>
<section>
<h2>Getting Started</h2>
</section>
<section>
<img src="Images/DuBStep/Syllabus.png" height="400px"/>
<p>A link to the submission system is on the syllabus.</p>
</section>
<section>
<img src="Images/DuBStep/Signin.png" />
<p>There's a handy "create account" link.</p>
</section>
<section>
<img src="Images/DuBStep/CreateAccount.png" />
<p>Use your UBIT email address to create an account.</p>
</section>
<section>
<h3>TODO By <u>Feb 10</u></h3>
<ol>
<li>Create a group of up to 3 people</li>
<li>Register your group</li>
<li>Access your group's GIT repository</li>
<li>Download <a href="http://maven.mimirdb.info/info/mimirdb/jsqlparser/1.0.0/jsqlparser-1.0.0.jar">JSQLParser</a></li>
<li>Look at the <a href="http://doc.odin.cse.buffalo.edu/jsqlparser/">JSQLParser Javadoc</a></li>
<li>Read the <a href="https://odin.cse.buffalo.edu/teaching/cse-562/2017sp/checkpoint0.html">Checkpoint 0 Overview</a></li>
<li>Create a SQL "Hello World" program</li>
<li>Hit Submit</li>
</ol>
</section>
<section>
<h2>A SQL "Hello World"</h2>
<ol>
<li>Read <b style="font-family: Courier, fixed-width;">SELECT * FROM [tablename]</b> from <b style="font-family: Courier, fixed-width;"><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/System.html#in">System.in</a></b></li>
<li style="margin-top: 20px">Use <a href="http://maven.mimirdb.info/info/mimirdb/jsqlparser/1.0.0/jsqlparser-1.0.0.jar">JSQLParser</a> to parse the query
<ul>
<li style="font-size:20pt">You don't need to use JSQLParser... but it will make your life easier later.</li>
</ul></li>
<li style="margin-top: 20px">Get the <a href="http://doc.odin.cse.buffalo.edu/jsqlparser/net/sf/jsqlparser/statement/select/PlainSelect.html#getFromItem--">Table Name</a></li>
<li style="margin-top: 20px">Read in the file <b style="font-family: Courier, fixed-width;">data/[tablename].csv</b></li>
<li style="margin-top: 20px">Write the contents out to <b style="font-family: Courier, fixed-width;"><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/System.html#out">System.out</a></b></li>
</ol>
</section>
<section>
<h3>Submit as many times as you need to</h3>
<h4>Your grade will never ever decrease because you decided to submit just one more time</h4>
</section>
</section>
<section>
<section data-transition="fade-out">
<h3>Ways to Fail</h3>
<h4 class="fragment">(please do not do these things)</h4>
<ul>
<li>Start your project the weekend before it's due.</li>
<li style="margin-top:20px">Avoid your TAs and their office hours.</li>
<li style="margin-top:20px">Stay quiet in class when your professor says something you don't understand.</li>
<li style="margin-top:20px">Wait until the deadline to submit for the first time.</li>
<li style="margin-top:20px" class="fragment">Cheat.</li>
</ul>
</section>
<section data-transition="fade-in">
<img src="Images/Graargh.png" height="400px"/>
</section>
<section>
<h3>Academic Integrity</h3>
<p><small>Cheating is submitting any work that you did not do yourself, as if you did</small></p>
<dl>
<dt class="fragment" data-fragment-index="1">References (properly cited)</dt>
<dd class="fragment" data-fragment-index="1">Wikipedia, Wikibooks: <span style="color: green; font-weight: bold">OK</span></dd>
<dt class="fragment" data-fragment-index="2">Public Code</dt>
<dd class="fragment" data-fragment-index="2">StackExchange, GitHub: <span style="color: red; font-weight: bold">NOT OK</span></dd>
<dt class="fragment" data-fragment-index="3">Discussing <u>concepts</u> with classmates</dt>
<dd class="fragment" data-fragment-index="3">"HashTables have O(1) lookups": <span style="color: green; font-weight: bold">OK</span> <span style="color: red; font-weight: bold; font-size: 16pt" class="fragment" data-fragment-index="4">(except exams)</span></dd>
<dt class="fragment" data-fragment-index="5">Sharing <u>code or answers</u> with classmates</dt>
<dd class="fragment" data-fragment-index="5">"Just look at how I did it": <span style="color: red; font-weight: bold">NOT OK</span></dd>
</dl>
</section>
<section>
<h2>MOSS</h2>
<img src="Images/MOSS.png" height="400px">
</section>
<section>
<h2>MOSS</h2>
<img src="Images/MOSSDetails.png" height="400px">
</section>
<section>
<h3>Academic Integrity</h3>
<dl>
<dt>Zero Tolerance</dt>
<dd>If I catch you submitting someone else's code, <u>you will fail the class</u>.</dd>
<dt>Group Responsibility</dt>
<dd>If your teammate cheats on a group project, <u>the entire group will be penalized</u>.</dd>
<dt>Share Code, Share Blame</dt>
<dd>If someone else submits your code, <u>you will be penalized as well</u>.</dd>
</dl>
</section>
<section>
<h3>Any Questions or Concerns?</h3>
</section>
</section>
<section>
<section>
<h3>What does a Database<br/>Management System Do?</h3>
</section>
<section>
<h3>Data Management</h3>
<dl>
<dt><u>Analysis</u>: Answering user questions about a dataset</dt>
<dd>What kind of tools can we give users?<ul>
<li>Declarative Languages</li>
<li>Organizational Datastructures (e.g., Indexes)</li>
</ul></dd>
<dt><u>Transactions</u>: Safely saving and sharing changing data</dt>
<dd>What kind of tools can we give users?<ul>
<li>Consistency Primitives</li>
<li>Data Validation Primitives</li>
</ul></dd>
</dl>
</section>
<section>
<h3>Data</h3>
<img src="Images/HDD.png" style="vertical-align: middle; border: none;"/>
<span style="margin-left: 50px; margin-right: 50px">vs</span>
<img src="Images/DB.png" style="vertical-align: middle; border: none;" />
</section>
<section data-transition="convex-out">
<h3>Files</h3>
<img src="Images/File.png" style="border: none;"/>
</section>
<section data-transition="convex-in">
<h3>Databases</h3>
<pre><code style="json">{
"firstName": "John", "lastName": "Smith","age": 25,
"address": {
"streetAddress": "21 2nd Street",
"city": "New York", "state": "NY",
"postalCode": 10021
},
"phoneNumbers": [
{ "type": "home",
"number": "212 555-1234"
},{ "type": "fax",
"number": "646 555-4567"
}
]
}</code></pre>
</section>
<section>
<h4>Databases understand and exploit the data's structure</h4>
</section>
<section>
<h3>Types</h3>
<dl>
<dt>Primitives</dt>
<dd>Integer, String, Floating Point Number, Date</dd>
<dt>Collections</dt>
<dd>List/Array, Set, Bag</dd>
<dt>Tuple</dt>
<dd>Struct, Dictionary/Object</dd>
</dl>
</section>
<section>
<h3>Type Glossary</h3>
<dl>
<dt>Primitive</dt>
<dd>Basic Building Blocks</dd>
<dt>Tuple (aka Record)</dt>
<dd>Several 'fields' of different types<br/>(a <u>schema</u> defines names/types for each field)</dd>
<dt>Set</dt>
<dd>Collection of <u>unique</u> records all of the same type.</dd>
<dt>Bag</dt>
<dd><u>Unsorted</u> collection of records of the same type.</dd>
<dt>List</dt>
<dd><u>Sorted</u> collection of records of the same type.</dd>
</dl>
</section>
<section>
<h3>Relational Database Glossary</h3>
<img src="Images/RelDBGlossary.png">
</section>
<section>
<p>Your data is currently an unsorted <i>set</i><br/> of 100-attribute Tuples.</p>
<p>Tomorrow, you will be repeatedly asked for the value of <u>1 specific attribute</u> from <u>5 specific rows</u>, each identified by a <u>1 specific attribute</u>.</p>
</section>
</section>
<!-- ############################################################################# -->
<!-- ########################### END PRESENTATION BODY ########################### -->
<!-- ############################################################################# -->
</div></div>
<script src="reveal/lib/js/head.min.js"></script>
<script src="reveal/js/reveal.js"></script>
<script>
// More info https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({
controls: true,
progress: true,
history: true,
center: true,
transition: 'slide', // none/fade/slide/convex/concave/zoom
// More info https://github.com/hakimel/reveal.js#dependencies
dependencies: [
{ src: 'reveal/lib/js/classList.js', condition: function() { return !document.body.classList; } },
{ src: 'reveal/plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'reveal/plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'reveal/plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
{ src: 'reveal/plugin/zoom-js/zoom.js', async: true },
{ src: 'reveal/plugin/notes/notes.js', async: true }
]
});
</script>
</body>
</html>