Skip to content

Commit

Permalink
add quiz slides
Browse files Browse the repository at this point in the history
  • Loading branch information
sob05001 committed Feb 10, 2025
1 parent 6c4b506 commit 74735dc
Showing 1 changed file with 115 additions and 7 deletions.
122 changes: 115 additions & 7 deletions dms/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3925,6 +3925,10 @@ <h5>SQL Query: Find customers who do not have an address</h5>
</code></pre>
</section>

<section id="module-5">
<h5>Module 5<br>Relational Database Advanced SQL</h5>
</section>

<section id="feb-10">
<h5>Today: February 10, 2025</h5>
<ul>
Expand All @@ -3937,6 +3941,71 @@ <h5>Today: February 10, 2025</h5>
</ul>
</section>

<section>
<h5>ER Model Question</h5>
<p>Which of the following best describes an entity in an ER Model?</p>
<ul class="alpha-list">
<li>A real-world object with attributes</li>
<li>A table in a database</li>
<li>A primary key in a table</li>
<li>A stored procedure</li>
</ul>
<button onclick="showAnswer('ans_8347')">Show Answer</button>
<p id="ans_8347" style="display:none; color:green;">Correct Answer: A real-world object with attributes</p>
</section>

<section>
<h5>SQL Question</h5>
<p>Which SQL clause is used to filter records based on a condition?</p>
<ul class="alpha-list">
<li>ORDER BY</li>
<li>GROUP BY</li>
<li>WHERE</li>
<li>HAVING</li>
</ul>
<button onclick="showAnswer('ans_9123')">Show Answer</button>
<p id="ans_9123" style="display:none; color:green;">Correct Answer: WHERE</p>
</section>

<section>
<h5>SQLite Question</h5>
<p>Which of the following is a major limitation of SQLite compared to PostgreSQL?</p>
<ul class="alpha-list">
<li>No support for basic queries</li>
<li>No support for full outer joins</li>
<li>No support for indexing</li>
<li>No support for SELECT statements</li>
</ul>
<button onclick="showAnswer('ans_5278')">Show Answer</button>
<p id="ans_5278" style="display:none; color:green;">Correct Answer: No support for full outer joins</p>
</section>

<section>
<h5>Relational Algebra Question</h5>
<p>Which relational algebra operation is used to retrieve specific attributes from a relation?</p>
<ul class="alpha-list">
<li>Selection (σ)</li>
<li>Projection (π)</li>
<li>Cartesian Product (×)</li>
<li>Union (∪)</li>
</ul>
<button onclick="showAnswer('ans_6754')">Show Answer</button>
<p id="ans_6754" style="display:none; color:green;">Correct Answer: Projection (π)</p>
</section>

<section>
<h5>Foreign Key Question</h5>
<p>What is the primary purpose of a foreign key in a relational database?</p>
<ul class="alpha-list">
<li>To enforce referential integrity</li>
<li>To improve query performance</li>
<li>To store primary key values</li>
<li>To increase storage capacity</li>
</ul>
<button onclick="showAnswer('ans_3941')">Show Answer</button>
<p id="ans_3941" style="display:none; color:green;">Correct Answer: To enforce referential integrity</p>
</section>

<section>
<h5>Why SQL Joins?</h5>
<ul>
Expand All @@ -3945,6 +4014,40 @@ <h5>Why SQL Joins?</h5>
</ul>
</section>

<section>
<h5>Bike Store Requirements</h5>
<p>The bike store needs a database to manage its inventory, sales, and customer interactions</p>
</section>

<section>
<h5>Inventory Management</h5>
<p>The store wants to keep track of all bikes and accessories, along with their suppliers</p>
<p>They need to see which products have suppliers and which do not</p>
</section>

<section>
<h5>Customer Orders</h5>
<p>Customers can place orders for bikes and accessories</p>
<p>The store wants a report showing all customers and their orders, but also customers who have never ordered
</p>
</section>

<section>
<h5>Sales Performance</h5>
<p>The store needs to generate reports comparing all products, including those that have never been sold</p>
</section>

<section>
<h5>Employee Management</h5>
<p>Employees handle sales and inventory updates</p>
<p>They need a way to see all employees and the sales they have made, while also seeing employees with no
recorded sales</p>
</section>

<section>
<h5>Which Join to Use?</h5>
</section>

<section data-background="white">
<img src="erd5.png" alt="Travel Relationship" style="height: 550px;">
</section>
Expand Down Expand Up @@ -4300,6 +4403,11 @@ <h5>Result of CROSS JOIN</h5>
Question?
</section>

<section data-background="white">
<img src="https://media.licdn.com/dms/image/v2/D5612AQGZjJpjEP1iEA/article-cover_image-shrink_720_1280/article-cover_image-shrink_720_1280/0/1686716645931?e=2147483647&v=beta&t=9aPA_mE1DU9WbuluLdKm400NcBewQGdmJw06n4vQ5hU" alt="Travel Relationship">
</section>


<section data-background="white">
<img src="https://miro.medium.com/v2/resize:fit:1400/0*nmiFlWSY8q6WZ-7e.png" alt="Travel Relationship"
style="height: 550px;">
Expand Down Expand Up @@ -4468,7 +4576,7 @@ <h5>SQL Query</h5>
</section>

<section>
<h5>Team Project Part 1</h5>
<h5>Team Project Part 1 - GitHub</h5>
</section>

<section>
Expand All @@ -4490,15 +4598,10 @@ <h5>Database</h5>
</section>

<section>
<h5>Homework 2, Lab 2</h5>
<h5>Today: Homework 2, Lab 2</h5>
</section>

<!-- Module 5 -->

<section id="module-5">
<h5>Module 5<br>Relational Database Advanced SQL</h5>
</section>

<section id="module-5">
<h5>Module 5<br>Relational Database Advanced SQL</h5>
</section>
Expand Down Expand Up @@ -4892,6 +4995,11 @@ <h5>Honor Code</h5>
<script src="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/4.3.1/plugin/zoom/zoom.min.js"></script>

<script>

function showAnswer(id) {
document.getElementById(id).style.display = "block";
}

// Initialize Reveal.js
Reveal.initialize({
controls: true,
Expand Down

0 comments on commit 74735dc

Please sign in to comment.