Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
f9cc78c
Added vimeo link
Manonbd Jun 2, 2020
c5ed60e
Added class
Manonbd Jun 2, 2020
5838f23
Fix title structure
sjimi Jun 2, 2020
8bed8e5
Add prep work week 2
sjimi Jun 5, 2020
16b6025
Update learning objectives
sjimi Jun 5, 2020
452130a
Fix typo
sjimi Jun 5, 2020
450fae2
Fix toggle lists
sjimi Jun 5, 2020
ae74d87
Update toggle list summaries
sjimi Jun 5, 2020
fab02b8
Set up scaffolding week 2 exercises
sjimi Jun 5, 2020
7f9bd7c
Merge pull request #16 from HackYourFutureBelgium/add-prep-work-week-2
colevandersWands Jun 5, 2020
31a720a
week-2 integrate
colevandersWands Jun 5, 2020
098af22
Merge branch 'master' of github.com:HackYourFutureBelgium/databases
colevandersWands Jun 5, 2020
1b881e0
week 2
colevandersWands Jun 6, 2020
1630859
week-2 integrate
colevandersWands Jun 5, 2020
3485a9b
week 2
colevandersWands Jun 6, 2020
20494fb
Add join exercises
sjimi Jun 6, 2020
7d6cfbb
Fix numbering
sjimi Jun 6, 2020
a1fb855
Add insert, update, delete exercises
sjimi Jun 6, 2020
81ef62a
Add numbering to exercises of week 1
sjimi Jun 6, 2020
95f1c4b
Update readme files
sjimi Jun 6, 2020
914ddd9
Merge branch 'master' into add-exercices-week-2
colevandersWands Jun 6, 2020
fd68116
Merge pull request #17 from HackYourFutureBelgium/add-exercices-week-2
colevandersWands Jun 6, 2020
37c996d
Add missing left statement
sjimi Jun 7, 2020
6dab10f
Update integrate to immediately start with the assignment project
sjimi Jun 7, 2020
22c7502
Add solution using NATURAL and USING statements
sjimi Jun 7, 2020
ff72d8a
Add CROSS JOIN exercise
sjimi Jun 7, 2020
97c92fa
Add note indicating which JOIN statements are supported in SQLite
sjimi Jun 7, 2020
9099821
Bump websocket-extensions from 0.1.3 to 0.1.4 in /reveal.js
dependabot[bot] Jun 8, 2020
80aec6f
update class recording
Manonbd Jun 8, 2020
fb06748
Merge pull request #18 from HackYourFutureBelgium/dependabot/npm_and_…
sjimi Jun 8, 2020
e63232f
Update exercises week 2
sjimi Jun 8, 2020
989c2c1
Fix title
sjimi Jun 8, 2020
b03ffce
9-10 refactor
colevandersWands Nov 10, 2020
4e67a77
code fence name
colevandersWands Nov 10, 2020
87ab0dd
post-call changes
colevandersWands Nov 12, 2020
d297a1e
pull and fix conflicts
colevandersWands Nov 16, 2020
5e13105
class 9-10 week 1
colevandersWands Nov 24, 2020
0026c0d
server crash
colevandersWands Nov 26, 2020
64513e7
teaching-guide
colevandersWands Jan 19, 2021
a76e9e3
teaching guide
colevandersWands Jan 19, 2021
569ce27
Update npm dependencies
sjimi Mar 19, 2021
1bb76a7
Update npm dependencies
sjimi Mar 19, 2021
203a21d
Add reveal.js
sjimi Mar 19, 2021
7e7badd
Add presentation
sjimi Mar 21, 2021
49fd21a
Move presentatation to week folder
sjimi Mar 21, 2021
f161d11
Add root index as entry for GitHub Pages
sjimi Mar 21, 2021
9154c04
Try disabling Jekyll for GitHub Pages to work
sjimi Mar 21, 2021
75d57fb
Update presentation
sjimi Mar 21, 2021
edba137
Add presentation stub for week 2
sjimi Mar 21, 2021
aea332a
Update presentation week 1
sjimi Mar 21, 2021
44e507e
Merge pull request #25 from HackYourFutureBelgium/add-reveal.js-prese…
colevandersWands Mar 22, 2021
d3b3cc9
week 1
colevandersWands Mar 24, 2021
eac6cd2
Remove lost bracket
sjimi Mar 28, 2021
ba1ff66
Merge pull request #26 from HackYourFutureBelgium/add-reveal.js-prese…
sjimi Mar 28, 2021
6e8fb21
Update branch reveal.js submodule
sjimi Mar 28, 2021
4063867
Merge pull request #27 from HackYourFutureBelgium/add-reveal.js-prese…
sjimi Mar 28, 2021
ee2f66d
Remove reveal.js submodule
sjimi Mar 28, 2021
9bf1c49
Add reveal.js submodule again
sjimi Mar 28, 2021
9025ef0
Add files via upload
sjimi Mar 28, 2021
1364103
uploaded class recordings 28-03
iLienstAr Mar 29, 2021
9cd804b
Add Slack clone starter database
sjimi Sep 19, 2021
a378937
Update presentation to match project work
sjimi Sep 19, 2021
a47dd8a
Update readme to match project work
sjimi Sep 19, 2021
348e7a4
Make presentation oblivious to presenters
sjimi Sep 20, 2021
77b12a4
Update project and mention links to Chinook database and schema
sjimi Sep 20, 2021
befbb3a
Merge pull request #28 from HackYourFutureBelgium/update-project
sjimi Sep 22, 2021
3b4e8b7
album title not name - would be more accurate
alinamarasca Sep 29, 2021
5e886fb
Merge pull request #29 from alinamarasca/patch-1
colevandersWands Sep 29, 2021
9d1823d
Fixed, broken link
seninet Nov 14, 2021
256cfbb
Fix typos
Nov 14, 2021
bfc05ee
Clarify that we are talking about the price in this exercise
Nov 14, 2021
f166f06
changed, absolute link to relative link
seninet Nov 14, 2021
4365cf5
changed, absolute link to relative link
seninet Nov 14, 2021
8d2f60e
Merge pull request #31 from dobbels/correct-some-typos
colevandersWands Nov 15, 2021
4971b0b
Update sql-exercises.md
seninet Nov 15, 2021
ab26666
Merge pull request #30 from Senait-coding/patch-1
colevandersWands Nov 15, 2021
046f6ac
Update LICENSE.md
jbelien Jul 17, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "reveal.js"]
path = reveal.js
url = https://github.com/hakimel/reveal.js.git
branch = master
428 changes: 426 additions & 2 deletions LICENSE.md

Large diffs are not rendered by default.

213 changes: 190 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,216 @@
# Databases

> I literally have a massive database of cat sounds.
>
> - [El-P](https://www.imdb.com/name/nm1474803/)

## Contents

- [Module Summary](#module-summary)
- [Learning Objectives](#learning-objectives)
- [Module Projects](#module-projects)
- Weekly Details:
- Week 1: [assignments](./week-1/README.md), [lesson plan](https://hackyourfuture.be/databases/week-1)
- Week 2: [assignments](./week-2/README.md), [lesson plan](https://hackyourfuture.be/databases/week-2)
- Study Materials:
- [Isolate](./isolate/README.md) - examples and exercises
- [Integrate](./integrate/README.md) - projects to study
- [Class Recordings](./class-recordings.md)
- [Study Links](https://study.hackyourfuture.be) (external)
- [Curriculum](https://home.hackyourfuture.be/curriculum) (external)
- [HYF Home](https://home.hackyourfuture.be/) (external)

---

## Module Summary

[TOP](#contents)
- [Suggested Study](#suggested-study)
- Break-Down
- [Week 1](#week-1)
- [Week 2](#week-2)
- [Class Recordings](#class-recordings)
- [study.hackyourfuture.be](https://study.hackyourfuture.be)
- [home.hackyourfuture.be](https://home.hackyourfuture.be/)

---

## Learning Objectives

What can you expect to learn in this module?

### Programming Skills

- Learn what relational database management systems (RDBMS) are
- Learn about relational models, tables, relations, columns, rows and keys
- Learn about relational models, tables, columns, rows, primary keys, foreign keys and relationships
- Learn how to write structured query language (SQL)
- Familiarize some theoretical concepts: information systems, databases, RDMBs, relational models, tables, records, attributes, fields and keys
- Learn how to navigate a (SQLite) database
- Learn how to write basic SQL queries using following statements: `SELECT`, `ORDER BY`, `SELECT DISTINCT`, `WHERE`, `LIMIT`, `BETWEEN`, `LIKE`
- Learn how to write basic SQL queries to read data using following statements: `SELECT`, `ORDER BY`, `SELECT DISTINCT`, `WHERE`, `LIMIT`, `BETWEEN`, `LIKE`, `GROUP BY`, `JOIN`
- Learn how to write basic SQL queries to create, update and delete records and tables using the following statements: `INSERT`, `UPDATE`, `DELETE`, `CREATE TABLE`, `ALTER TABLE`, `DROP TABLE`
- Learn about SQL injection

### Tooling

- [SQLite](https://www.sqlite.org/index.html) - a SQL database engine

Using the Chinook database of which you can find the file [here (`chinook-database/chinook.sqlite`)](chinook-database/chinook.sqlite) and the ERD [here (`chinook-database/chinook-schema.png`)](chinook-database/chinook-schema.png).
- [node-sqlite3](https://github.com/mapbox/node-sqlite3)

[TOP](#contents)
### Module Projects

Projects will continue from the project of ([`hyf-backend-introduction`](https://github.com/hackyourfuturebelgium/web-apps)) of the previous module, but with an SQLite database instead of a .json file.

[TOP](#databases)

---

## Suggested Study

Helpful resources for this module

<details open>
<summary>expand/collapse</summary>
<br>

#### SQL

- [sqlteaching](https://www.sqlteaching.com/)
- [SQL Murder Mystery](https://mystery.knightlab.com/)

#### Tooling

- [TablePlus](https://tableplus.com/) is a modern, native, and friendly GUI tool for several relational databases: SQLite, MySQL, PostgreSQL & more.
- [DB Browser for SQLite](https://sqlitebrowser.org/) is a high quality, visual, open source tool to create, design, and edit database files compatible with SQLite.
- [SQLite Viewer](https://inloop.github.io/sqlite-viewer/) is an online SQLite editor.
- [SQLite Editor by SQLite Tutorial](https://www.sqlitetutorial.net/tryit/) is also an online SQLite editor, specifically for the Chinook sample database.
- [vscode-sqlite](https://marketplace.visualstudio.com/items?itemName=alexcvzz.vscode-sqlite) is a VSCode extension to explore and query SQLite databases.

#### SQLite & Node.js

- [./node-query-scripts](./node-query-scripts) - practice querying an SQLite database from Node.js
- References
- [SQLite Node.js Guide](https://www.sqlitetutorial.net/sqlite-nodejs/)
- [node-sqlite3 has good docs](https://github.com/mapbox/node-sqlite3/wiki/)
- [developerhowto tutorial article](https://developerhowto.com/2018/12/29/build-a-rest-api-with-node-js-and-express-js/)
- PetsApp: [video tutorial (SQLite starts at #7)](https://www.youtube.com/watch?v=2PCaD0Y4MP4&list=PLzV58Zm8FuBIWu1zvGRUfn0Xh6HXRg9cG&index=7), [starter code & finished to study](https://github.com/pgbovine/COGS121)

</details>
<br>

[TOP](#databases)

---

## Module Projects
## Week 1

- Familiarize some theoretical concepts: information systems, databases, RDMBs, relational models, tables, records, attributes, fields and keys
- Learn how to navigate a (SQLite) database
- Learn how to write basic SQL queries using the following statements: `SELECT`, `ORDER BY`, `SELECT DISTINCT`, `WHERE`, `LIMIT`, `BETWEEN`, `LIKE`, `GROUP BY`
- Learn how to communicate with SQLite databases in JavaScript
- Plan and scope projects around your data

<details open>
<summary>expand/collapse</summary>
<br>

### Before Class

[./week-1/prep-work.md](./week-1/prep-work.md)

### During Class

#### Before Break

[./week-1/sql-exercises.md](./week-1/sql-exercises.md)

#### After Break

Continue working on your project from the previous module ([`hyf-backend-introduction`](https://github.com/hackyourfuturebelgium/web-apps)). Instead of fetching data from JSON file a SQLite database can now be leveraged. Start from [the slack-clone.sqlite](slack-clone-database/slack-clone.sqlite) file. Focus on reading from the database.

### After Class

Continue working on your project.

### Impress Yourselves

Here's a [starter repository](https://github.com/HackYourFutureBelgium/restful-chinook) you can use, but you don't have to.

```markdown
- [ ] [repo](https://github.com/_/_) (with a complete README)
- Project Planning
- [ ] [Backlog](https://github.com/_/_/tree/master/project-planning/backlog.md)
- [ ] [Development Strategy](https://github.com/_/_/tree/master/project-planning/development-strategy.md)
- [ ] [Project board](https://github.com/_/_/projects/_)
- Implementation
- [ ] Deployed - [deployment link]()
- [ ] A working frontend in the `/client` directory
- [ ] Uses the SQLite Chinook database
- [ ] A working `/api` to access the the database
```

</details>
<br>

[TOP](#databases)

---

## Week 2

- Learn about primary keys, foreign keys, relationships and SQL injection
- Learn how to write SQL queries to read data using following statements: `JOIN`
- Learn how to write basic SQL queries to create, update and delete records and tables using the following statements: `INSERT`, `UPDATE`, `DELETE`, `CREATE TABLE`, `ALTER TABLE`, `DROP TABLE`

<details open>
<summary>expand/collapse</summary>
<br>

### Before Class

[./week-2/prep-work.md](./week-2/prep-work.md)

### During Class

#### Before Break

[./week-2/sql-exercises.md](./week-2/sql-exercises.md)

#### After Break

Continue working on your project from [the previous week](https://github.com/HackYourFutureBelgium/databases/blob/master/README.md#after-break). Focus on inserting, updating and deleting from the database.

### After Class

Finish working on your project.

</details>
<br>

[TOP](#databases)

---

## Class Recordings

- **Students**: Here you can find recordings of this module from past classes. Enjoy!
- **Coaches**: When sending your PR's with links please ...
- Indicate which class you were teaching
- Which week it was (if the module is more than 1 week)
- Give your name
- and a helpful description

## Class 7-8

> [Dimitri Roose](https://github.com/sjimi), [Stijn Wynants](https://stackoverflow.com/users/1499018/stijn-wynants)

1. [Week 1](https://vimeo.com/424516925)
2. Week 2:

- [Part 1](https://vimeo.com/426980670)
- [Part 2](https://vimeo.com/426995522)
- [Part 3](https://vimeo.com/427003854)
- [Part 4](https://vimeo.com/427039078)

## Class 9-10

> [Dimitri Roose](https://github.com/sjimi), [Stijn Wynants](https://stackoverflow.com/users/1499018/stijn-wynants)

1. [Week 1](https://meet.openknowledge.be/playback/presentation/2.0/playback.html?meetingId=05594ce10542676cd7f00b5d118cb2f367054196-1605436121197)
2. Week 2 - server crash :(

## Class 11-12

> [Dimitri Roose](https://github.com/sjimi), Randi

1. [Week 1](https://vimeo.com/528348149)
2. [Week 2](https://vimeo.com/530304854)

## Class 13-14

> [Dimitri Roose](https://github.com/sjimi), [Unmesh Joshi](https://github.com/unmeshvrije), [Yoshi Malaise](https://github.com/yoshimalaise)

Projects in this module will use the same folder structure & boilerplate code you learned in [the previous `web-apps` module](https://github.com/hackyourfuturebelgium/web-apps)
1. [Week 1](https://vimeo.com/528348149)
2. [Week 2](https://vimeo.com/530304854)
5 changes: 5 additions & 0 deletions chinook-database/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Chinook Database

A good database for [exploring SQL](https://medium.com/gitgirl/working-with-sqlite-sample-chinook-data-8c923cefbc16). You can also study it in [the SQLite tutorial](https://www.sqlitetutorial.net/sqlite-sample-database/).

`chinook-backup.sqlite` is just in case ;)
File renamed without changes.
File renamed without changes
File renamed without changes.
19 changes: 0 additions & 19 deletions class-recordings.md

This file was deleted.

59 changes: 59 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">

<title>Databases - Week 1</title>

<link rel="stylesheet" href="reveal.js/dist/reset.css">
<link rel="stylesheet" href="reveal.js/dist/reveal.css">
<link rel="stylesheet" href="reveal.js/dist/theme/white.css" id="theme">

<!-- Theme used for syntax highlighted code -->
<link rel="stylesheet" href="reveal.js/plugin/highlight/monokai.css" id="highlight-theme">

<style>
.reveal .footer {
position: absolute;
bottom: 2em;
left: 1.5em;
font-size: 0.5em;
}
</style>
</head>
<body>
<div class="reveal">
<div class="slides">
<section>
<h1>Databases</h1>
<br>
<ul>
<li><a href='week-1/presentation.html'>Week 1</a></li>
<li><a href='week-2/presentation.html'>Week 2</a></li>
</ul>
<p><a href="https://github.com/HackYourFutureBelgium/databases">HackYourFutureBelgium/databases</a></p>
</section>
</div>
<div class='footer'>
<div>Databases/div>
</div>
</div>

<script src="reveal.js/dist/reveal.js"></script>
<script src="reveal.js/plugin/notes/notes.js"></script>
<script src="reveal.js/plugin/markdown/markdown.js"></script>
<script src="reveal.js/plugin/highlight/highlight.js"></script>
<script>
// More info about initialization & config:
// - https://revealjs.com/initialization/
// - https://revealjs.com/config/
Reveal.initialize({
hash: true,

// Learn about plugins: https://revealjs.com/plugins/
plugins: [RevealMarkdown, RevealHighlight, RevealNotes]
});
</script>
</body>
</html>
1 change: 0 additions & 1 deletion integrate/README.md

This file was deleted.

Loading