Skip to content

Commit b6d7a28

Browse files
authored
Update README.md
1 parent 8204445 commit b6d7a28

1 file changed

Lines changed: 34 additions & 2 deletions

File tree

README.md

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,28 @@ Working with SQL
1111

1212
# Instructions
1313

14-
Surf to [SQL Try Editor at W3Schools.com](https://www.w3schools.com/Sql/tryit.asp?filename=trysql_select_top)
14+
Import the W3School Tutorial database into PostgreSQL using pgAdmin
15+
16+
clone https://github.com/AndrejPHP/w3schools-database.git
17+
18+
## pgAdmin
19+
20+
* Right Click Databases
21+
* Create
22+
* type in w3school
23+
24+
* Tools -> Query Tool
25+
* Open file w3schools.sql (from cloned repo)
26+
* Execute
27+
28+
* Look under
29+
* w3schools -> Schemas -> public -> tables
30+
31+
* Clear query windows
32+
1533
Answer the following data queries. Keep track of the SQL you write by pasting it into this document under its appropriate header below. You will be submitting that through the regular fork, change, pull process.
1634

17-
### **Clicking the `Restore Database` button in the page will repopulate the database with the original data and discard all changes you have made**.
35+
1836

1937
### find all customers that live in London. Returns 6 records.
2038
> This can be done with SELECT and WHERE clauses
@@ -53,6 +71,20 @@ Answer the following data queries. Keep track of the SQL you write by pasting it
5371
### list orders grouped by customer's city showing number of orders per city. Returns 58 Records with _Aachen_ showing 2 orders and _Albuquerque_ showing 7 orders.
5472
> This is very similar to the previous two queries, however, it focuses on the City rather than the CustomerName
5573
74+
75+
## Data Normalization
76+
77+
Note: This step does not use PostgreSQL!
78+
79+
Take the following data and normalize it into a 3NF database.
80+
81+
| Person Name | Pet Name | Pet Type | Pet Name 2 | Pet Type 2 | Pet Name 3 | Pet Type 3 | Fenced Yard | City Dweller |
82+
|-------------|----------|----------|------------|------------|------------|------------|-------------|--------------|
83+
| Jane | Ellie | Dog | Tiger | Cat | Toby | Turtle | No | Yes |
84+
| Bob | Joe | Horse | | | | | No | No |
85+
| Sam | Ginger | Dog | Miss Kitty | Cat | Bubble | Fish | Yes | No |
86+
87+
---
5688
## Stretch Goals
5789

5890
### delete all customers that have no orders. Should delete 17 (or 18 if you haven't deleted the record added) records.

0 commit comments

Comments
 (0)