-- MySQL dump 9.11
--
-- Host: localhost    Database: testcd
-- ------------------------------------------------------
-- Server version	4.0.20-standard-log

--
-- Table structure for table `cd`
--

CREATE TABLE cd (
  id int(11) NOT NULL auto_increment,
  title varchar(255) NOT NULL default 'Untitled',
  PRIMARY KEY  (id),
  UNIQUE KEY title (title)
) TYPE=InnoDB;

--
-- Dumping data for table `cd`
--

INSERT INTO cd VALUES (2,'Celtic Groove Brand');
INSERT INTO cd VALUES (1,'Waltzing at the Grange');

--
-- Table structure for table `song`
--

CREATE TABLE song (
  id int(11) NOT NULL auto_increment,
  name varchar(255) NOT NULL default 'blank',
  PRIMARY KEY  (id)
) TYPE=InnoDB;

--
-- Dumping data for table `song`
--

INSERT INTO song VALUES (1,'The Forlorn Queen');
INSERT INTO song VALUES (2,'A Random Waltz');
INSERT INTO song VALUES (3,'A Random Groove');

--
-- Table structure for table `track`
--

CREATE TABLE track (
  id int(11) NOT NULL auto_increment,
  seqnum int(11) NOT NULL default '-1',
  song int(11) NOT NULL default '0',
  cd int(11) NOT NULL default '0',
  PRIMARY KEY  (id),
  KEY song (song),
  KEY cd (cd),
  CONSTRAINT `track_ibfk_1` FOREIGN KEY (`song`) REFERENCES `song` (`id`) ON DELETE CASCADE,
  CONSTRAINT `track_ibfk_2` FOREIGN KEY (`cd`) REFERENCES `cd` (`id`) ON DELETE CASCADE
) TYPE=InnoDB;

--
-- Dumping data for table `track`
--

INSERT INTO track VALUES (1,10,1,1);
INSERT INTO track VALUES (2,20,1,2);
INSERT INTO track VALUES (3,30,2,1);
INSERT INTO track VALUES (4,30,3,2);

