-- ----------------------------------------------------------------
-- contacts.sql
--
-- This script is useful for chapters 2, 6 and 8 of Head First SQL.
--
-- For convenience, the table has been renamed to just 'contacts.'
--
-- mysql> source C:\Users\russ\dev\contacts.sql
-- ----------------------------------------------------------------
DROP TABLE contacts;
CREATE TABLE contacts
(
	last_name	VARCHAR(32),
	first_name	VARCHAR(32),
	email			VARCHAR(64),
	gender		CHAR(1),
	birthday		DATE,
	profession	VARCHAR(64),
	location		VARCHAR(64),
	status		VARCHAR(32),
	interests	VARCHAR(128),
	seeking		VARCHAR(64)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

INSERT INTO contacts ( last_name, first_name, email, gender, birthday, profession, location, status, interests, seeking )
	VALUES ('Anderson','Jillian','jill_anderson@breakneckpizza.com','F','1980-09-05','Technical Writer','Palo Alto, CA','single','kayaking, reptiles','relationship, friends');
INSERT INTO contacts ( last_name, first_name, email, gender, birthday, profession, location, status, interests, seeking )
	VALUES ('Kenton','Leo','lkenton@starbuzzcoffee.com','M','1974-01-10','Manager','San Francisco, CA','divorced','women','women to date');
INSERT INTO contacts ( last_name, first_name, email, gender, birthday, profession, location, status, interests, seeking )
	VALUES ('McGavin','Darrin', 'captainlove@headfirsttheater.com','M','1966-01-23','Cruise Ship Captain','San Diego, CA','single','sailing, fishing, yachting','women for casual relationships');
INSERT INTO contacts ( last_name, first_name, email, gender, birthday, profession, location, status, interests, seeking )
	VALUES ('Franklin','Joe','joe_franklin@leapinlimos.com','M','1977-04-28','Software Sales','Dallas, TX','married','fishing, drinking','new job');
INSERT INTO contacts ( last_name, first_name, email, gender, birthday, profession, location, status, interests, seeking )
	VALUES ('Hamilton','Jamie','dontbother@starbuzzcoffee.com','F','1964-09-10','System Administrator','Princeton, NJ','married','RPG','nothing');
INSERT INTO contacts ( last_name, first_name, email, gender, birthday, profession, location, status, interests, seeking )
	VALUES ('Chevrolet','Maurice','bookman4u@objectville.net','M','1962-07-01','Bookshop Owner','Mountain View, CA','married','collecting books, scuba diving','friends');
INSERT INTO contacts ( last_name, first_name, email, gender, birthday, profession, location, status, interests, seeking )
	VALUES ('Kroger','Renee','poorrenee@mightygumball.net','F','1976-12-03','Unemployed','San Francisco, CA','divorced','cooking','employment');
INSERT INTO contacts ( last_name, first_name, email, gender, birthday, profession, location, status, interests, seeking )
	VALUES ('Mendoza','Angelina','angelina@starbuzzcoffee.com','F','1979-08-19','UNIX Sysadmin','San Francisco, CA','married','acting, dancing','new job');
INSERT INTO contacts ( last_name, first_name, email, gender, birthday, profession, location, status, interests, seeking )
	VALUES ('Murphy','Donald','padraic@tikibeanlounge.com','M','1967-01-23','Computer Programmer','New York City, NY','committed relationship','RPG, anime','friends');
INSERT INTO contacts ( last_name, first_name, email, gender, birthday, profession, location, status, interests, seeking )
	VALUES ('Spatner','John','jpoet@objectville.net','M','1963-04-18','Salesman','Woodstock, NY','married','poetry, screenwriting','nothing');
INSERT INTO contacts ( last_name, first_name, email, gender, birthday, profession, location )
	VALUES ('Toth','Anne','Anne_Toth@leapinlimos.com','F','1969-11-18', 'Artist','San Francisco, CA');
INSERT INTO contacts ( last_name, first_name, email, gender, birthday, profession, location )
	VALUES ('Manson','Anne','am86@objectville.net','F','1977-08-09', 'Baker','Seattle, WA');
INSERT INTO contacts ( last_name, first_name, email, gender, birthday, profession, location )
	VALUES ('Hardy','Anne','anneh@b0tt0msup.com','F','1963-04-18', 'Teacher','San Francisco, CA');
INSERT INTO contacts ( last_name, first_name, email, gender, birthday, profession, location )
	VALUES ('Parker','Anne','annep@starbuzzcoffee.com','F','1983-01-10', 'Student','San Francisco, CA');
INSERT INTO contacts ( last_name, first_name, email, gender, birthday, profession, location )
	VALUES ('Blunt','Anne','anneblunt@breakneckpizza.com','F','1959-10-09', 'Web Designer','San Francisco, CA');
INSERT INTO contacts ( last_name, first_name, email, gender, birthday, profession, location )
	VALUES ('Jacobs','Anne','anne99@objectville.net','F','1968-02-05', 'Computer Programmer','San Jose, CA');

-- Russ added these from the book...
INSERT INTO contacts ( last_name, first_name, email, gender,  birthday, profession, location, status, interests, seeking )
	VALUES ( 'Everett', 'Joan', 'jeverett@mightygumball.net', 'F', '1978-04-03', 'Artist', 'Salt Lake City UT', 'single', 'sailing, hiking, cooking', 'single man' );
INSERT INTO contacts ( last_name, first_name, email, gender,  birthday, profession, location, status, interests, seeking )
	VALUES ( 'Singh', 'Paul', 'ps@tikibeanlounge.com', 'M', '1980-12-10', 'Professor', 'New York, NY', 'single', 'dogs, spelunking', 'single woman' );
INSERT INTO contacts ( last_name, first_name, email, gender,  birthday, profession, location, status, interests, seeking )
	VALUES ( 'Baldwin', 'Tara', 'tara@breakneckpizza.com', 'F', '1970-09-01', 'Chef', 'Boston, MA', 'single', 'movies, reading, cooking', 'single man' );

SELECT * FROM contacts;
