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: episodes/04-ordering-commenting.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,9 +72,11 @@ their effects as we went along. For complex queries, this is a good strategy, t
72
72
73
73
When the queries become more complex, it can be useful to add comments to express to yourself, or to others, what you are doing with your query. Comments help explain the logic of a section and provide context for anyone reading the query. It's essentially a way of making notes within your SQL. In SQL, comments begin using <codeclass="language-plaintext highlighter-rouge">\--</code> and end at the end of the line. To mark a whole paragraph as a comment, you can enclose it with the characters /\* and \*/. For example, a commented version of the above query can be written as:
74
74
75
-
```
76
-
/*In this section, even though JOINS (see link below this code block) are not introduced until Episode 6, we want to give an example how to
77
-
join multiple tables becasue they represent a good example of using comments in SQL to explain more complex queries.*/
75
+
```sql
76
+
/*In this section, even though JOINS (see link below this code block)
77
+
are not introduced until Episode 6, we want to give an example how to
78
+
join multiple tables because they represent a good example of using
79
+
comments in SQL to explain more complex queries.*/
78
80
79
81
-- First we mention all the fields we want to display
Copy file name to clipboardExpand all lines: episodes/08-database-design.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -76,7 +76,7 @@ Conceptually, we know that a journal has only one publisher but a publisher can
76
76
77
77
## More Terminology
78
78
79
-
The degree of relationship between entities is known as their 'cardinality'. Using the journals-publishers example, the 'publisheres' tble contains a primary key (PK) called 'id'. When the PK is used to create a connection between the original table and a different table, it is called a foreign key (FK) in the other table. To follow the example, we see a field in the 'journal' table called PublisherID that contains the values from the 'id' field in the 'publisher' table, connected the two tables.
79
+
The degree of relationship between entities is known as their 'cardinality'. Using the journals-publishers example, the 'publishers' table contains a primary key (PK) called 'id'. When the PK is used to create a connection between the original table and a different table, it is called a foreign key (FK) in the other table. To follow the example, we see a field in the 'journal' table called PublisherID that contains the values from the 'id' field in the 'publisher' table, connecting the two tables.
80
80
81
81
There are 4 main types of relationships between tables:
Copy file name to clipboardExpand all lines: index.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,4 +2,4 @@
2
2
site: sandpaper::sandpaper_site
3
3
---
4
4
5
-
This Library Carpentry lesson introduces librarians to relational database management system using SQLite. At the conclusion of the lesson you will: understand what SQLite does; use SQLite to summarise and link data.
5
+
This Library Carpentry lesson introduces librarians to relational database management system using SQLite. At the conclusion of the lesson you will: understand what SQLite does; use SQLite to summarise and link data.
- Join our [Slack organisation](https://swc-slack-invite.herokuapp.com/) and #libraries channel.
8
+
- Join our [Slack organisation](https://slack-invite.carpentries.org/) and #libraries channel.
9
9
- Stay in touch with our [Topicbox Group](https://carpentries.topicbox.com/groups/discuss-library-carpentry).
10
10
- Follow updates on [Twitter](https://twitter.com/LibCarpentry).
11
11
- Make a suggestion or correct an error by [raising an Issue](https://github.com/LibraryCarpentry/lc-sql/issues) or [submitting a pull request](https://github.com/LibraryCarpentry/lc-sql/pulls).
0 commit comments