You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+21-20Lines changed: 21 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
5
5
### About
6
6
7
-
This three-week program aims to introduce the fundamental concepts of data entities and data storage.
7
+
This three-week program aims to introduce the fundamental concepts of databases using MySQL.
8
8
9
9
### Key Objectives
10
10
@@ -15,34 +15,35 @@ By the end of this module, students should have a familiarity with and basic und
15
15
- The Structured Query Language (SQL)
16
16
- The construction of a database system
17
17
- MySQL as an example of a relational database system
18
-
- Non-relational data and NoSQL
19
-
- MongoDB as an example of a NoSQL database
20
-
21
-
## The Practice Database
22
-
23
-
The login information for the student practice database will be provided during the first class. If you don't have them, send us a message - you will need the username, password, hostname, port, and database name.
24
18
25
19
## Lesson Plan
26
20
27
-
### Lesson 1: Retrieving Data
28
-
29
-
In this class, students will be introduced to retrieving data from a MySQL database using SELECT queries.
30
-
31
-
Objective: Students should be able to retrieve data from a database table using SELECT statements that include WHERE, GROUP BY, ORDER BY, LIMIT, and JOIN.
32
-
33
-
### Lesson 2: Practical Database Usage
21
+
### Lesson 1: MySQL and Node Setup! Create, Insert and Select !
34
22
35
-
In this class, students will learn how to use more complex SQL queries to retrieve information across tables, and interact with data including write operations.
23
+
Objective: This class aims to incorporate JavaScript code to operate the MySQL database.
24
+
MySQL client can be used to demonstrate SQL queries however, students should know how to
25
+
make a MySQL database connection from JavaScript, run queries from JavaScript and
26
+
capture results of queries in JavaScript.
36
27
37
-
Objective: Students should be able to build CRUD functionality using SQL statements, including INSERT INTO, UPDATE WHERE, etc. Students will also have a basic understanding of database usage in a web application, including parameter validation, escaping, and prepared statements.
28
+
# Lesson 2: Group by, Having and Joins. Promisification of JS client with prepared statements
38
29
39
-
### Lesson 3: Data Models, Relationships, and Schemas
30
+
Objective: This class introduces more clauses (group by, having) in the
31
+
select statement. MySQL joins (inner, self, left and right) should be explained
32
+
with demonstration (Employee table with **reportsTo** field and Department
33
+
table with its PK in Employee table is suitable for this demonstration).
34
+
Promise based JavaScript program with SQL prepared statements should be
35
+
understood by students. The program can be found in the Week2 folder (Credits:
36
+
@remarcmij)
40
37
41
-
In the final week, additional theory will be covered to discuss more complex relational data. Students will learn about entity relationship modelling and how to convert these models to a database schema using normalisation and foreign-key constraints. Non-relational data will also be considered, as well as the benefits and drawbacks of relational and non-relational models.
38
+
# Lesson 3: Database design, normal forms, SQL injection
42
39
43
-
Objective: Students should be able to create an entity relationship diagram based on a qualatative description of data requirements, and translate that into a MySQL database schema. Students should also be able to compare and contrast relational (like MySQL) and NoSQL databases (considering their benefits and drawbacks).
40
+
Objective: This class invites students to discuss Entity Relationship Diagram (ERD).
41
+
Students should be able to explain their choices of entities, relationships, attributes etc.
42
+
SQL injection should be explained with a demonstration (with a simple JS client).
43
+
Concepts of database transaction, ACID properties, normal forms should be introduced with
44
+
examples / live coding (creating a transaction, committing and rollback-ing).
44
45
45
46
## Handing in homework
46
47
Take a look at [this video](https://www.youtube.com/watch?v=-o0yomUVVpU&index=2&list=PLVYDhqbgYpYUGxRdtQdYVE5Q8h3bt6SIA) made by Daan, he explains how your homework needs to be handed in.
47
48
48
-
Also review the Git [workflow material](https://github.com/HackYourFuture/Git/blob/master/Lecture-3.md) from the JavaScript3 module, use this as a reference.
49
+
Also review the Git [workflow material](https://github.com/HackYourFuture/Git/blob/master/Lecture-3.md) from the JavaScript3 module, use this as a reference.
0 commit comments