SCOTTISH COUNTRY DANCE DATABASE -- RAW DATA
===========================================

Version of this README: 1.0.3 (2011-05-27)

History and Legal
-----------------

These files contain information on Scottish country dances, music,
recordings and people (historical and contemporary) to do with
Scottish country dancing.

The data was originally compiled by Alan Paterson of Berne,
Switzerland (based on various earlier efforts by many people including
Keith Napier of Sydney, Australia, and Peter Hastings of Edinburgh,
Scotland), and is now maintained collaboratively by a group of
Scottish country dancers under the auspices of the SCDdata
project.

The data is made available to the public under the terms of the
»Creative Commons Attribution 3.0 Germany License«, which essentially
means that you get to use the data for any purpose (including
commercially) and to pass copies on to other people, as long as it is
attributed properly. See http://creativecommons.org/licenses/by/3.0/de/
for a more detailed statement, or contact <scddata@strathspey.org>
for more information.

Technical
---------

The raw data is provided in SQLite ».dump« format, including CREATE
TABLE and CREATE INDEX statements, on

  http://media.strathspey.org/scddata/

The data is regenerated daily, and for each date there are two files:

  scddata-YYYYMMDD.sql             uncompressed SQL code (UTF-8)
  scddata-YYYYMMDD.zip             compressed SQL and this README

The names scddata.sql and scddata.zip will always refer to the most
current dump. We will endeavour to keep older versions of the data
around but reserve the right to delete files, e.g., if space becomes
tight.

There is an extra table called »metadata«, defined using

  CREATE TABLE "metadata" (
    "id" integer NOT NULL PRIMARY KEY,
    "key" varchar(32) NOT NULL,
    "value" varchar(64) NOT NULL
  );

whose purpose is to describe the format and version of these database
dumps. The following values for »key« are documented so far:

  schema_major, schema_minor: currently "1" and "0"
  dump_version: the date the dump was created, in the format YYYYMMDD

The schema_major and schema_minor numbers will be incremented whenever
the schema governing the dump changes. The specific nature of the
increment (minor-number-only or major-number-with-minor-number-reset)
will be at the dump maintainer's discretion. Additional keys may be
added to the »metadata« table as required.

Documentation for various aspects of the data is available from
http://my.strathspey.org/anselm/stories/dd-tables.html .

There will also be a file

  scddata-txt-YYYYMMDD.zip	   compressed CSV and this README

containing dumps of the tables in CSV format, one file per table. The
file names correspond to the names of the tables in the database (with
a ».txt« suffix) and are not 100% identical to the file names used in
Alan Paterson's text dumps. Also, the columns and their order
correspond to the current database schema, as discussed in the
document mentioned above, and applications that rely on the presence
and order of columns in Alan Paterson's dumps will need to be
adapted. You have been warned.

Other formats can be made available by arrangement, subject to
demand.

Notable Changes
---------------

- From scddata-20090806.sql, the »tunesrecordingsmap« table contains
  an additional column, »alias_id«, which is a foreign key to the
  »tunealias« table. This covers the situation where a well-known tune
  is featured on a recording under a different name. For example, the
  tune for the dance »The White Heather Jig« is officially called the
  »Six Twenty Two-Step« (the BBC TV show, »The White Heather Club«,
  used to air at 6:20pm) but it is often mentioned on recordings as
  »The White Heather Jig«. This can now be handled by introducing a
  »tunealias« row for »The White Heather Jig« for »The Six Twenty
  Two-Step« and, in the »tunesrecordingsmap« row in question, having
  the »tune_id« foreign key refer to »The Six Twenty Two-Step« and the
  »alias_id« foreign key refer to »The White Heather Jig«. In the
  output, this could be visualised as

     1. The Six Twenty Two-Step (Jimmy Shand) as »The White Heather
        Jig«

  For tunes which are recorded under their canonical names, the
  »alias_id« is NULL. This also applies to most recordings in the
  database carried over from before the change.
