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

--
-- Table structure for table `Course`
--

DROP TABLE IF EXISTS Course;
CREATE TABLE Course (
  id int(11) NOT NULL auto_increment,
  name varchar(255) default '',
  time varchar(255) default '',
  term varchar(255) default '',
  place varchar(255) default '',
  credits int(11) default '0',
  PRIMARY KEY  (id)
) TYPE=InnoDB;

--
-- Dumping data for table `Course`
--


/*!40000 ALTER TABLE Course DISABLE KEYS */;
LOCK TABLES Course WRITE;
INSERT INTO Course VALUES (1,'calculus','MWF 10:00am','Fall 2004','Sci217',3);
INSERT INTO Course VALUES (2,'physics','MWF 1:00pm','Fall 2004','Sci217',4);
INSERT INTO Course VALUES (3,'chemistry','MWF 8:30am','Fall 2004','chem lab',4);
INSERT INTO Course VALUES (4,'radio','Thus 10:00pm','Fall 2004','basement',1);
UNLOCK TABLES;
/*!40000 ALTER TABLE Course ENABLE KEYS */;

--
-- Table structure for table `Person`
--

DROP TABLE IF EXISTS Person;
CREATE TABLE Person (
  id int(11) NOT NULL auto_increment,
  name varchar(255) default '',
  phone varchar(255) default '',
  PRIMARY KEY  (id)
) TYPE=InnoDB;

--
-- Dumping data for table `Person`
--


/*!40000 ALTER TABLE Person DISABLE KEYS */;
LOCK TABLES Person WRITE;
INSERT INTO Person VALUES (1,'Joe Fish','111-2223');
INSERT INTO Person VALUES (2,'Mary Green','111-2345');
INSERT INTO Person VALUES (3,'Ellen White','111-2323');
INSERT INTO Person VALUES (4,'Francis Eld','111-7777');
INSERT INTO Person VALUES (5,'Frank Miklin','111-1234');
INSERT INTO Person VALUES (6,'Dr. Who','222-0000');
INSERT INTO Person VALUES (7,'A. Einstein','222-9999');
INSERT INTO Person VALUES (8,'A. Noble','222-1337');
UNLOCK TABLES;
/*!40000 ALTER TABLE Person ENABLE KEYS */;

--
-- Table structure for table `Registration`
--

DROP TABLE IF EXISTS Registration;
CREATE TABLE Registration (
  id int(11) NOT NULL auto_increment,
  status int(11) NOT NULL default '0',
  person int(11) NOT NULL default '0',
  course int(11) NOT NULL default '0',
  date date default NULL,
  PRIMARY KEY  (id),
  KEY status (status),
  KEY person (person),
  KEY course (course),
  CONSTRAINT `Registration_ibfk_1` FOREIGN KEY (`status`) REFERENCES `status` (`id`) ON DELETE CASCADE,
  CONSTRAINT `Registration_ibfk_2` FOREIGN KEY (`person`) REFERENCES `person` (`id`) ON DELETE CASCADE,
  CONSTRAINT `Registration_ibfk_3` FOREIGN KEY (`course`) REFERENCES `course` (`id`) ON DELETE CASCADE
) TYPE=InnoDB;

--
-- Dumping data for table `Registration`
--


/*!40000 ALTER TABLE Registration DISABLE KEYS */;
LOCK TABLES Registration WRITE;
INSERT INTO Registration VALUES (1,1,6,1,'2004-09-01');
INSERT INTO Registration VALUES (2,1,6,4,'2004-09-01');
INSERT INTO Registration VALUES (3,1,7,2,'2004-09-01');
INSERT INTO Registration VALUES (4,1,8,3,'2004-09-01');
INSERT INTO Registration VALUES (5,2,1,1,'2004-09-01');
INSERT INTO Registration VALUES (6,2,1,2,'2004-09-01');
INSERT INTO Registration VALUES (7,2,2,1,'2004-09-01');
INSERT INTO Registration VALUES (8,2,2,3,'2004-09-01');
INSERT INTO Registration VALUES (9,2,3,4,'2004-09-01');
INSERT INTO Registration VALUES (10,2,4,4,'2004-09-01');
INSERT INTO Registration VALUES (11,2,5,3,'2004-09-01');
UNLOCK TABLES;
/*!40000 ALTER TABLE Registration ENABLE KEYS */;

--
-- Table structure for table `Status`
--

DROP TABLE IF EXISTS Status;
CREATE TABLE Status (
  id int(11) NOT NULL auto_increment,
  name varchar(255) default '',
  PRIMARY KEY  (id)
) TYPE=InnoDB;

--
-- Dumping data for table `Status`
--


/*!40000 ALTER TABLE Status DISABLE KEYS */;
LOCK TABLES Status WRITE;
INSERT INTO Status VALUES (1,'faculty');
INSERT INTO Status VALUES (2,'student');
UNLOCK TABLES;
/*!40000 ALTER TABLE Status ENABLE KEYS */;

