-- MySQL dump 9.10 -- -- Host: localhost Database: setdb_test -- ------------------------------------------------------ -- Server version 4.0.17-log -- -- Table structure for table `addr_type` -- DROP TABLE IF EXISTS addr_type; CREATE TABLE addr_type ( id int(11) NOT NULL auto_increment, name varchar(50) default NULL, PRIMARY KEY (id) ) TYPE=MyISAM; -- -- Dumping data for table `addr_type` -- INSERT INTO addr_type VALUES (1,'home'); INSERT INTO addr_type VALUES (2,'work'); -- -- Table structure for table `address` -- DROP TABLE IF EXISTS address; CREATE TABLE address ( id int(11) NOT NULL auto_increment, name varchar(50) default NULL, street varchar(100) default NULL, city varchar(50) default NULL, state varchar(20) default NULL, zip varchar(10) default NULL, PRIMARY KEY (id) ) TYPE=MyISAM; -- -- Dumping data for table `address` -- INSERT INTO address VALUES (1,'Home','211 S. Leroux #5','Flagstaff','AZ','86001'); INSERT INTO address VALUES (2,'Work','Northern Arizona University - IHD','Flagstaff','AZ','86001'); -- -- Table structure for table `author` -- DROP TABLE IF EXISTS author; CREATE TABLE author ( id int(11) NOT NULL auto_increment, person_id int(11) default NULL, book_id int(11) default NULL, PRIMARY KEY (id) ) TYPE=MyISAM; -- -- Dumping data for table `author` -- INSERT INTO author VALUES (1,1,1); -- -- Table structure for table `book` -- DROP TABLE IF EXISTS book; CREATE TABLE book ( id int(11) NOT NULL auto_increment, title varchar(100) default NULL, date_published date default NULL, PRIMARY KEY (id) ) TYPE=MyISAM; -- -- Dumping data for table `book` -- INSERT INTO book VALUES (1,'How to Take Over the World!','2001-02-20'); INSERT INTO book VALUES (2,'When I Went Shopping','2002-05-20'); INSERT INTO book VALUES (3,'How to build a turtle','2002-05-20'); INSERT INTO book VALUES (4,'Turtle Soup','2002-05-20'); -- -- Table structure for table `has_address` -- DROP TABLE IF EXISTS has_address; CREATE TABLE has_address ( id int(11) NOT NULL auto_increment, person_id int(11) default NULL, address_id int(11) default NULL, addr_type_id int(11) default NULL, PRIMARY KEY (id) ) TYPE=MyISAM; -- -- Dumping data for table `has_address` -- INSERT INTO has_address VALUES (1,1,1,1); -- -- Table structure for table `lives_at` -- DROP TABLE IF EXISTS lives_at; CREATE TABLE lives_at ( id int(11) NOT NULL auto_increment, person_id int(11) NOT NULL default '0', address_id int(11) NOT NULL default '0', PRIMARY KEY (id) ) TYPE=MyISAM; -- -- Dumping data for table `lives_at` -- INSERT INTO lives_at VALUES (1,1,0); INSERT INTO lives_at VALUES (2,2,2); -- -- Table structure for table `owns_book` -- DROP TABLE IF EXISTS owns_book; CREATE TABLE owns_book ( id int(11) NOT NULL auto_increment, person_id int(11) default NULL, book_id int(11) default NULL, PRIMARY KEY (id) ) TYPE=MyISAM; -- -- Dumping data for table `owns_book` -- INSERT INTO owns_book VALUES (1,1,1); INSERT INTO owns_book VALUES (2,1,2); INSERT INTO owns_book VALUES (3,3,1); INSERT INTO owns_book VALUES (4,3,3); INSERT INTO owns_book VALUES (5,3,4); -- -- Table structure for table `person` -- DROP TABLE IF EXISTS person; CREATE TABLE person ( id int(11) NOT NULL auto_increment, name varchar(50) default NULL, birthdate date default NULL, PRIMARY KEY (id) ) TYPE=MyISAM; -- -- Dumping data for table `person` -- INSERT INTO person VALUES (1,'Bob','1980-12-14'); INSERT INTO person VALUES (2,'Joe','1965-10-01'); INSERT INTO person VALUES (3,'Frank','1975-12-01');