SWC has a single, global glossary [1], not per-subject glossaries.
Because this per-subject branch no longer contains the global
glossary, we need to adjust the links to point at an external
glossary. Done automatically with:
$ sed -i 's|\.\./\.\./gloss.html|https://github.com/swcarpentry/bc/blob/master/gloss.md|g' *.ipynb
[1]: https://github.com/swcarpentry/bc/blob/master/gloss.md
"cell_type": "markdown",
"metadata": {},
"source": [
"cell_type": "markdown",
"metadata": {},
"source": [
- "A [relational database](../../gloss.html#relational-database)\n",
+ "A [relational database](https://github.com/swcarpentry/bc/blob/master/gloss.md#relational-database)\n",
"is a way to store and manipulate information\n",
"is a way to store and manipulate information\n",
- "that is arranged as [tables](../../gloss.html#table-database).\n",
- "Each table has columns (also known as [fields](../../gloss.html#field-database)) which describe the data,\n",
- "and rows (also known as [records](../../gloss.html#record-database)) which contain the data.\n",
+ "that is arranged as [tables](https://github.com/swcarpentry/bc/blob/master/gloss.md#table-database).\n",
+ "Each table has columns (also known as [fields](https://github.com/swcarpentry/bc/blob/master/gloss.md#field-database)) which describe the data,\n",
+ "and rows (also known as [records](https://github.com/swcarpentry/bc/blob/master/gloss.md#record-database)) which contain the data.\n",
" \n",
"When we are using a spreadsheet,\n",
"we put formulas into cells to calculate new values based on old ones.\n",
"When we are using a database,\n",
"we send commands\n",
" \n",
"When we are using a spreadsheet,\n",
"we put formulas into cells to calculate new values based on old ones.\n",
"When we are using a database,\n",
"we send commands\n",
- "(usually called [queries](../../gloss.html#query))\n",
- "to a [database manager](../../gloss.html#database-manager):\n",
+ "(usually called [queries](https://github.com/swcarpentry/bc/blob/master/gloss.md#query))\n",
+ "to a [database manager](https://github.com/swcarpentry/bc/blob/master/gloss.md#database-manager):\n",
"a program that manipulates the database for us.\n",
"The database manager does whatever lookups and calculations the query specifies,\n",
"returning the results in a tabular form\n",
"a program that manipulates the database for us.\n",
"The database manager does whatever lookups and calculations the query specifies,\n",
"returning the results in a tabular form\n",
"> every database manager can import and export data in a variety of formats,\n",
"> so it *is* possible to move information from one to another.\n",
"\n",
"> every database manager can import and export data in a variety of formats,\n",
"> so it *is* possible to move information from one to another.\n",
"\n",
- "Queries are written in a language called [SQL](../../gloss.html#sql),\n",
+ "Queries are written in a language called [SQL](https://github.com/swcarpentry/bc/blob/master/gloss.md#sql),\n",
"which stands for \"Structured Query Language\".\n",
"SQL provides hundreds of different ways to analyze and recombine data;\n",
"we will only look at a handful,\n",
"which stands for \"Structured Query Language\".\n",
"SQL provides hundreds of different ways to analyze and recombine data;\n",
"we will only look at a handful,\n",
"and the table name in Title Case,\n",
"but we don't have to:\n",
"as the example below shows,\n",
"and the table name in Title Case,\n",
"but we don't have to:\n",
"as the example below shows,\n",
- "SQL is [case insensitive](../../gloss.html#case-insensitive)."
+ "SQL is [case insensitive](https://github.com/swcarpentry/bc/blob/master/gloss.md#case-insensitive)."
"metadata": {},
"source": [
"One of the most powerful features of a database is\n",
"metadata": {},
"source": [
"One of the most powerful features of a database is\n",
- "the ability to [filter](../../gloss.html#filter) data,\n",
+ "the ability to [filter](https://github.com/swcarpentry/bc/blob/master/gloss.md#filter) data,\n",
"i.e.,\n",
"to select only those records that match certain criteria.\n",
"For example,\n",
"i.e.,\n",
"to select only those records that match certain criteria.\n",
"For example,\n",
" What does it actually produce?\n",
"\n",
"1. Some database designers prefer to use\n",
" What does it actually produce?\n",
"\n",
"1. Some database designers prefer to use\n",
- " a [sentinel value](../../gloss.html#sentinel-value)\n",
+ " a [sentinel value](https://github.com/swcarpentry/bc/blob/master/gloss.md#sentinel-value)\n",
" to mark missing data rather than `null`.\n",
" For example,\n",
" they will use the date \"0000-00-00\" to mark a missing date,\n",
" to mark missing data rather than `null`.\n",
" For example,\n",
" they will use the date \"0000-00-00\" to mark a missing date,\n",
"metadata": {},
"source": [
"but to combine them,\n",
"metadata": {},
"source": [
"but to combine them,\n",
- "wee must use an [aggregation function](../../gloss.html#aggregation-function)\n",
+ "wee must use an [aggregation function](https://github.com/swcarpentry/bc/blob/master/gloss.md#aggregation-function)\n",
"such as `min` or `max`.\n",
"Each of these functions takes a set of records as input,\n",
"and produces a single record as output:"
"such as `min` or `max`.\n",
"Each of these functions takes a set of records as input,\n",
"and produces a single record as output:"
"metadata": {},
"source": [
"`join` creates\n",
"metadata": {},
"source": [
"`join` creates\n",
- "the [cross product](../../gloss.html#cross-product)\n",
+ "the [cross product](https://github.com/swcarpentry/bc/blob/master/gloss.md#cross-product)\n",
"of two tables,\n",
"i.e.,\n",
"it joins each record of one with each record of the other\n",
"of two tables,\n",
"i.e.,\n",
"it joins each record of one with each record of the other\n",
"We can tell which records from `Site`, `Visited`, and `Survey`\n",
"correspond with each other\n",
"because those tables contain\n",
"We can tell which records from `Site`, `Visited`, and `Survey`\n",
"correspond with each other\n",
"because those tables contain\n",
- "[primary keys](../../gloss.html#primary-key)\n",
- "and [foreign keys](../../gloss.html#foreign-key).\n",
+ "[primary keys](https://github.com/swcarpentry/bc/blob/master/gloss.md#primary-key)\n",
+ "and [foreign keys](https://github.com/swcarpentry/bc/blob/master/gloss.md#foreign-key).\n",
"A primary key is a value,\n",
"or combination of values,\n",
"that uniquely identifies each record in a table.\n",
"A primary key is a value,\n",
"or combination of values,\n",
"that uniquely identifies each record in a table.\n",
"Now that we have seen how joins work,\n",
"we can see why the relational model is so useful\n",
"and how best to use it.\n",
"Now that we have seen how joins work,\n",
"we can see why the relational model is so useful\n",
"and how best to use it.\n",
- "The first rule is that every value should be [atomic](../../gloss.html#atomic-value),\n",
+ "The first rule is that every value should be [atomic](https://github.com/swcarpentry/bc/blob/master/gloss.md#atomic-value),\n",
"i.e.,\n",
"not contain parts that we might want to work with separately.\n",
"We store personal and family names in separate columns instead of putting the entire name in one column\n",
"i.e.,\n",
"not contain parts that we might want to work with separately.\n",
"We store personal and family names in separate columns instead of putting the entire name in one column\n",
"and all our queries assume there will be a row in the latter\n",
"matching every value in the former.\n",
" \n",
"and all our queries assume there will be a row in the latter\n",
"matching every value in the former.\n",
" \n",
- "This problem is called [referential integrity](../../gloss.html#referential-integrity):\n",
+ "This problem is called [referential integrity](https://github.com/swcarpentry/bc/blob/master/gloss.md#referential-integrity):\n",
"we need to ensure that all references between tables can always be resolved correctly.\n",
"One way to do this is to delete all the records\n",
"that use `'lake'` as a foreign key\n",
"before deleting the record that uses it as a primary key.\n",
"If our database manager supports it,\n",
"we can automate this\n",
"we need to ensure that all references between tables can always be resolved correctly.\n",
"One way to do this is to delete all the records\n",
"that use `'lake'` as a foreign key\n",
"before deleting the record that uses it as a primary key.\n",
"If our database manager supports it,\n",
"we can automate this\n",
- "using [cascading delete](../../gloss.html#cascading-delete).\n",
+ "using [cascading delete](https://github.com/swcarpentry/bc/blob/master/gloss.md#cascading-delete).\n",
"However,\n",
"this technique is outside the scope of this chapter.\n",
"\n",
"However,\n",
"this technique is outside the scope of this chapter.\n",
"\n",
" in `Survey.person`\n",
" with the string `'unknown'`.\n",
"\n",
" in `Survey.person`\n",
" with the string `'unknown'`.\n",
"\n",
- "2. One of our colleagues has sent us a [CSV](../../gloss.html#csv) file\n",
+ "2. One of our colleagues has sent us a [CSV](https://github.com/swcarpentry/bc/blob/master/gloss.md#csv) file\n",
" containing temperature readings by Robert Olmstead,\n",
" which is formatted like this:\n",
"\n",
" containing temperature readings by Robert Olmstead,\n",
" which is formatted like this:\n",
"\n",
"all we need to specify is the name of the database file.\n",
"Other systems may require us to provide a username and password as well.\n",
"Line 3 then uses this connection to create\n",
"all we need to specify is the name of the database file.\n",
"Other systems may require us to provide a username and password as well.\n",
"Line 3 then uses this connection to create\n",
- "a [cursor](../../gloss.html#cursor);\n",
+ "a [cursor](https://github.com/swcarpentry/bc/blob/master/gloss.md#cursor);\n",
"just like the cursor in an editor,\n",
"its role is to keep track of where we are in the database.\n",
"\n",
"just like the cursor in an editor,\n",
"its role is to keep track of where we are in the database.\n",
"\n",
"If we execute this,\n",
"it will erase one of the tables in our database.\n",
" \n",
"If we execute this,\n",
"it will erase one of the tables in our database.\n",
" \n",
- "This is called an [SQL injection attack](../../gloss.html#sql-injection-attack),\n",
+ "This is called an [SQL injection attack](https://github.com/swcarpentry/bc/blob/master/gloss.md#sql-injection-attack),\n",
"and it has been used to attack thousands of programs over the years.\n",
"In particular,\n",
"many web sites that take data from users insert values directly into queries\n",
"and it has been used to attack thousands of programs over the years.\n",
"In particular,\n",
"many web sites that take data from users insert values directly into queries\n",
"the safest way to deal with this threat is\n",
"to replace characters like quotes with their escaped equivalents,\n",
"so that we can safely put whatever the user gives us inside a string.\n",
"the safest way to deal with this threat is\n",
"to replace characters like quotes with their escaped equivalents,\n",
"so that we can safely put whatever the user gives us inside a string.\n",
- "We can do this by using a [prepared statement](../../gloss.html#prepared-statement)\n",
+ "We can do this by using a [prepared statement](https://github.com/swcarpentry/bc/blob/master/gloss.md#prepared-statement)\n",
"instead of formatting our statements as strings.\n",
"Here's what our example program looks like if we do this:"
]
"instead of formatting our statements as strings.\n",
"Here's what our example program looks like if we do this:"
]