From: Greg Wilson Date: Fri, 22 Nov 2013 15:09:43 +0000 (-0500) Subject: Modfiying links to glossary in notebook files X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a960c291ff236c5ed715bb9802f1454702cf707a;p=swc-boot-camp.git Modfiying links to glossary in notebook files W. Trevor King: I removed the python/ changes from the original bac4388 [1] as I try to isolate the SQL section. [1]: https://github.com/swcarpentry/bc/commit/bac43889abf296672bb1dc018bcd8b53eb18dc9f --- diff --git a/sql/novice/01-select.ipynb b/sql/novice/01-select.ipynb index 3de1227..384029c 100644 --- a/sql/novice/01-select.ipynb +++ b/sql/novice/01-select.ipynb @@ -57,18 +57,18 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "A [relational database](../gloss.html#relational-database)\n", + "A [relational database](../../gloss.html#relational-database)\n", "is a way to store and manipulate information\n", - "that is arranged as [tables](../gloss.html#table).\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](../../gloss.html#table).\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", " \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](../../gloss.html#query))\n", + "to a [database manager](../../gloss.html#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", @@ -82,7 +82,7 @@ "> 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](../../gloss.html#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", @@ -228,7 +228,7 @@ "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](../../gloss.html#case-insensitive)." ] }, { diff --git a/sql/novice/03-filter.ipynb b/sql/novice/03-filter.ipynb index c620cf3..536494f 100644 --- a/sql/novice/03-filter.ipynb +++ b/sql/novice/03-filter.ipynb @@ -20,7 +20,7 @@ "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](../../gloss.html#filter) data,\n", "i.e.,\n", "to select only those records that match certain criteria.\n", "For example,\n", diff --git a/sql/novice/05-null.ipynb b/sql/novice/05-null.ipynb index 331424b..8b02654 100644 --- a/sql/novice/05-null.ipynb +++ b/sql/novice/05-null.ipynb @@ -408,7 +408,7 @@ " 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](../../gloss.html#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", diff --git a/sql/novice/06-agg.ipynb b/sql/novice/06-agg.ipynb index 551f9f1..8c9ba69 100644 --- a/sql/novice/06-agg.ipynb +++ b/sql/novice/06-agg.ipynb @@ -71,7 +71,7 @@ "metadata": {}, "source": [ "but to combine them,\n", - "wee must use an [aggregation function](../gloss.html#aggregation-function)\n", + "wee must use an [aggregation function](../../gloss.html#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:" diff --git a/sql/novice/07-join.ipynb b/sql/novice/07-join.ipynb index 4c6cac4..2481db4 100644 --- a/sql/novice/07-join.ipynb +++ b/sql/novice/07-join.ipynb @@ -98,7 +98,7 @@ "metadata": {}, "source": [ "`join` creates\n", - "the [cross product](../gloss.html#cross-product)\n", + "the [cross product](../../gloss.html#cross-product)\n", "of two tables,\n", "i.e.,\n", "it joins each record of one with each record of the other\n", @@ -277,8 +277,8 @@ "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](../../gloss.html#primary-key)\n", + "and [foreign keys](../../gloss.html#foreign-key).\n", "A primary key is a value,\n", "or combination of values,\n", "that uniquely identifies each record in a table.\n", @@ -354,7 +354,7 @@ "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](../../gloss.html#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", diff --git a/sql/novice/08-create.ipynb b/sql/novice/08-create.ipynb index d463ae2..b3e9c3e 100644 --- a/sql/novice/08-create.ipynb +++ b/sql/novice/08-create.ipynb @@ -119,14 +119,14 @@ "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](../../gloss.html#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", - "using [cascading delete](../gloss.html#cascading-delete).\n", + "using [cascading delete](../../gloss.html#cascading-delete).\n", "However,\n", "this technique is outside the scope of this chapter.\n", "\n", @@ -153,7 +153,7 @@ " 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](../../gloss.html#csv) file\n", " containing temperature readings by Robert Olmstead,\n", " which is formatted like this:\n", "\n", diff --git a/sql/novice/09-prog.ipynb b/sql/novice/09-prog.ipynb index 9681a14..3ad32aa 100644 --- a/sql/novice/09-prog.ipynb +++ b/sql/novice/09-prog.ipynb @@ -76,7 +76,7 @@ "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](../../gloss.html#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", @@ -168,7 +168,7 @@ "If we execute this,\n", "it will erase one of the tables in our database.\n", " \n", - "This technique is called [SQL injection](../gloss.html#sql-injection),\n", + "This technique is called [SQL injection](../../gloss.html#sql-injection),\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", @@ -178,7 +178,7 @@ "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](../../gloss.html#prepared-statement)\n", "instead of formatting our statements as strings.\n", "Here's what our example program looks like if we do this:" ]