From f8cbf2783b8a6c4dfd22dc425049d49be2c6961a Mon Sep 17 00:00:00 2001 From: Adam Mansur Date: Thu, 8 Aug 2024 12:39:23 -0400 Subject: [PATCH 1/6] Specifies preferred macOS install option (#375) --- learners/setup.md | 1 + 1 file changed, 1 insertion(+) diff --git a/learners/setup.md b/learners/setup.md index 0360e492..d9f231e6 100644 --- a/learners/setup.md +++ b/learners/setup.md @@ -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. From e51a9470b34601542621a45bedd0e981724f8f39 Mon Sep 17 00:00:00 2001 From: Adam Mansur Date: Thu, 8 Aug 2024 12:43:49 -0400 Subject: [PATCH 2/6] Fixed formatting in proposed design lesson (#374) --- learners/discuss.md | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/learners/discuss.md b/learners/discuss.md index 34a93744..6d6ac48e 100644 --- a/learners/discuss.md +++ b/learners/discuss.md @@ -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 @@ -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, 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 ### Other database management systems From dda9cfff8e348d378bcc34ba94704920ac140375 Mon Sep 17 00:00:00 2001 From: Adam Mansur Date: Thu, 8 Aug 2024 12:53:29 -0400 Subject: [PATCH 3/6] Clarified how calculations are returned by SELECT (#372) --- episodes/01-sql-basic-queries.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/episodes/01-sql-basic-queries.md b/episodes/01-sql-basic-queries.md index fa3f9c49..76b5a850 100644 --- a/episodes/01-sql-basic-queries.md +++ b/episodes/01-sql-basic-queries.md @@ -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) From d635e10fdaeace9c3af6bdcc559d4df7ffc304ab Mon Sep 17 00:00:00 2001 From: Adam Mansur Date: Thu, 8 Aug 2024 12:56:10 -0400 Subject: [PATCH 4/6] Clarified Open Database instruction (#370) --- episodes/00-sql-introduction.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/episodes/00-sql-introduction.md b/episodes/00-sql-introduction.md index b76c015a..d8092898 100644 --- a/episodes/00-sql-introduction.md +++ b/episodes/00-sql-introduction.md @@ -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 From bbd668899a0bdab61c77ef9bf5c3284c1623c2a2 Mon Sep 17 00:00:00 2001 From: James Foster <38274066+jd-foster@users.noreply.github.com> Date: Wed, 11 Sep 2024 17:00:55 +1000 Subject: [PATCH 5/6] Fix typo in learners/discuss.md --- learners/discuss.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/learners/discuss.md b/learners/discuss.md index 6d6ac48e..cdcf303e 100644 --- a/learners/discuss.md +++ b/learners/discuss.md @@ -29,7 +29,7 @@ title: Discussion - 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 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) From 7d15a835b946c878f94eeb01beb9fcc0742084f0 Mon Sep 17 00:00:00 2001 From: James Foster <38274066+jd-foster@users.noreply.github.com> Date: Wed, 11 Sep 2024 17:01:12 +1000 Subject: [PATCH 6/6] Fix formatting in learners/discuss.md --- learners/discuss.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/learners/discuss.md b/learners/discuss.md index cdcf303e..3ddc0dd0 100644 --- a/learners/discuss.md +++ b/learners/discuss.md @@ -34,7 +34,7 @@ title: Discussion - 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 + - Do *not* use quotes when naming a table or field ### Other database management systems