Skip to content

Commit

Permalink
differences for PR #377
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Sep 11, 2024
1 parent 505ba62 commit dc18d62
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 22 deletions.
2 changes: 1 addition & 1 deletion 00-sql-introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ data retrieval from a relational database.

Let's look at a pre-existing database, the `portal_mammals.sqlite`
file from the Portal Project dataset that we downloaded during
[Setup](../learners/setup.md). Click on the "Open Database" button, select the portal\_mammals.sqlite file, and click "Open" to open the database.
[Setup](../learners/setup.md). In DB Browser for SQLite, click on the "Open Database" button, select the portal\_mammals.sqlite file, and click "Open" to open the database.

You can see the tables in the database by looking at the left hand side of the
screen under Database Structure tab. Here you will see a list under "Tables." Each item listed here corresponds to one of the `csv` files
Expand Down
14 changes: 8 additions & 6 deletions 01-sql-basic-queries.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,18 @@ For example, if we wanted to look at the mass of each individual
on different dates, but we needed it in kg instead of g we would use

```sql
SELECT year, month, day, weight/1000
SELECT year, month, day, weight / 1000
FROM surveys;
```

When we run the query, the expression `weight / 1000` is evaluated for each
row and appended to that row, in a new column. If we used the `INTEGER` data type
for the weight field then integer division would have been done, to obtain the
correct results in that case divide by `1000.0`. Expressions can use any fields,
any arithmetic operators (`+`, `-`, `*`, and `/`) and a variety of built-in
functions. For example, we could round the values to make them easier to read.
row and appended in a new column to the table returned by the query. Note that
the new column only exists in the query results—the surveys table itself is
not changed. If we used the `INTEGER` data type for the weight field then
integer division would have been done, to obtain the correct results in that
case divide by `1000.0`. Expressions can use any fields, any arithmetic
operators (`+`, `-`, `*`, and `/`) and a variety of built-in functions. For
example, we could round the values to make them easier to read.

```sql
SELECT plot_id, species_id, sex, weight, ROUND(weight / 1000, 2)
Expand Down
24 changes: 13 additions & 11 deletions discuss.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ title: Discussion

1. Order doesn't matter
2. Every row-column combination contains a single *atomic* value, i.e., not
containing parts we might want to work with separately.
containing parts we might want to work with separately.
3. One field per type of information
4. No redundant information
- Split into separate tables with one table per class of information
Expand All @@ -18,21 +18,23 @@ title: Discussion
### Naming

- Naming conventions are important because:
\* Names are used more than once
\* Names are not usually subject to change (for example, spelling errors)

- Names are used more than once
- Names are not usually subject to change (for example, spelling errors)

- Names should uniquely identify what the data is representing

- Names should be descriptive and familiar

- Names should adhere to certain standards: (General Tips)
\* Names should not contain spaces (for example, nameofdata)
\* Names should not start with numbers, rather add numbers at the end of the name (for example, name$
\* Names should be full words, not abbreviations (for example, doctor)
\* Underscores can separate words (for example, name\_of\_data)
\* Data types are not names (for example, integer\_data instead of integer)
\* Names are often in lowercase (for example, name)
\* DO NOT use quotes when naming a table or field
- Names should adhere to certain standards (general tips):

- Names should not contain spaces (for example, nameofdata)
- Names should not start with numbers, rather add numbers at the end of the name (for example, name5)
- Names should be full words, not abbreviations (for example, doctor)
- Underscores can separate words (for example, name\_of\_data)
- Data types are not names (for example, integer\_data instead of integer)
- Names are often in lowercase (for example, name)
- Do *not* use quotes when naming a table or field

### Other database management systems

Expand Down
8 changes: 4 additions & 4 deletions md5sum.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
"NEWS.md" "84aa522251c8b0043f12e83af45cc3d8" "site/built/NEWS.md" "2023-04-21"
"config.yaml" "0928fbefeca4f51e54ccc3687a9565e9" "site/built/config.yaml" "2023-04-21"
"index.md" "cfdee7444b27a96171c25e1d4915e1e9" "site/built/index.md" "2023-06-07"
"episodes/00-sql-introduction.md" "7d1b818440079d96e395c6777b18cf50" "site/built/00-sql-introduction.md" "2024-06-03"
"episodes/01-sql-basic-queries.md" "31fc6d3e21d679cab6a002bffe7c182d" "site/built/01-sql-basic-queries.md" "2023-04-21"
"episodes/00-sql-introduction.md" "e8ac248b290e74c264817c41dbbad159" "site/built/00-sql-introduction.md" "2024-09-11"
"episodes/01-sql-basic-queries.md" "256c3e6db6f844897ae9643129609c31" "site/built/01-sql-basic-queries.md" "2024-09-11"
"episodes/02-sql-aggregation.md" "07784e3014a42660059c18e6ba71f26d" "site/built/02-sql-aggregation.md" "2023-04-21"
"episodes/03-sql-joins.md" "7ce22e3c1e1719ad50edbcd72e333013" "site/built/03-sql-joins.md" "2024-06-03"
"instructors/instructor-notes.md" "105728ef72c768e968ca9d11c2a14109" "site/built/instructor-notes.md" "2023-04-21"
"learners/discuss.md" "c5994f9f17e9da0d08a530600084ba55" "site/built/discuss.md" "2023-04-21"
"learners/discuss.md" "0ff402a01b3496a37bf790b8eae69b76" "site/built/discuss.md" "2024-09-11"
"learners/reference.md" "83dc790413398fce3bb07518546928fa" "site/built/reference.md" "2023-10-19"
"learners/setup.md" "ba0ada65a673ca1d95ed722b0711fa87" "site/built/setup.md" "2023-06-30"
"learners/setup.md" "ee35c0e736db51a50f60d4c4d1fe44f6" "site/built/setup.md" "2024-09-11"
"learners/sql-cheat-sheet.md" "fe94973871efccd88f8bc193d359bdb1" "site/built/sql-cheat-sheet.md" "2023-10-19"
"profiles/learner-profiles.md" "60b93493cf1da06dfd63255d73854461" "site/built/learner-profiles.md" "2023-04-21"
1 change: 1 addition & 0 deletions setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ for SQLite**, so it does not have to be installed separately.

- There are a few options for Windows, but most modern computers can use the `Standard installer for 64-bit Windows` version
- The `.zip (no installer)` version can be run directly from the folder, after extracting the contents of the zip file. It will not show up in the `Start` menu.
- There are also two options for macOS. Most people should use the `DB Browser for SQLite (Universal)` installer.

Launch **DB Browser for SQLite** to confirm that the installation was successful.

Expand Down

0 comments on commit dc18d62

Please sign in to comment.