Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions episodes/00-sql-introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ which is stored as one of its fields.
Records may also contain keys that refer to records in other tables,
which enables us to combine information from two or more sources.


::::::::::::::::::::::::::::::::::::::::::::::::::


## Databases

### Why use relational databases
Expand All @@ -125,8 +125,14 @@ Using a relational database serves several purposes.
- This means there's no risk of accidentally changing data when you analyze it.
- If we get new data we can rerun the query.
- It's fast, even for large amounts of data.
- It improves quality control of data entry (type constraints and use of forms in MS Access, Filemaker, Oracle Application Express etc.)
- The concepts of relational database querying are core to understanding how to do similar things using programming languages such as R or Python.
- It improves quality control of data entry.
- Restrictions on what is valid data within a table can be enforced in different ways, such as
the use of data types, cross-references and other relationships between tables.
- The concepts used in querying relational databases help us understanding how to do similar things in other programming languages such as R or Python.

In many small datasets we have only a few tables and we don't have to think about too many cross-references, or *keys*, between tables.
Shared keys between tables becomes increasingly important as the volume and complexity of data grows.
One motivation for using relational databases is being able to organize data using keys that must consistently refer to other tables.

### Database Management Systems

Expand Down Expand Up @@ -176,8 +182,8 @@ To summarize:
- One field per type of information
- No redundant information
- Split into separate tables with one table per class of information
- Needs an identifier in common between tables – shared column - to
reconnect (known as a *foreign key*).
- Needs an identifier in common between tables – a shared column - to
reconnect the information (known as a *foreign key* constraint).

### Import

Expand Down
Loading