Completely Lost
Date: 10/24/06
(MySQL Communtiy) Keywords: mysql, database, sql
Hello. I am so glad I found this community. I am very new to MySQL & completely lost. I'm using it for a Database Fundamentals course that I'm taking. The instructor isn't teaching us the material...she's expecting us to learn from the textbooks. I'm finding this to be a subject that's hard to learn from books alone. An example of what I'm having a problem with:
DROP TABLE IF EXISTS `book`;
CREATE TABLE `book` (
`BOOK_CODE` char(4) NOT NULL default '',
`TITLE` char(40) default NULL,
`PUBLISHER_CODE` char(3) default NULL,
`TYPE` char(3) default NULL,
`PRICE` decimal(4,2) default NULL,
`PAPERBACK` char(1) default NULL,
PRIMARY KEY (`BOOK_CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `henry`.`book`
--
/*!40000 ALTER TABLE `book` DISABLE KEYS */;
INSERT INTO `book` (`BOOK_CODE`,`TITLE`,`PUBLISHER_CODE`,`TYPE`,`PRICE`,`PAPERBACK`) VALUES
('0180','A Deepness in the Sky','TB','SFI','7.19','Y'),
('0189','Magic Terror','FA','HOR','7.99','Y'),
('0200','The Stranger','VB','FIC','8.00','Y'),
('0280','Rumpole for the Defence','PE','MYS','7.19','Y'),
('0378','Venice','SS','ART','24.50','N'),
('0389','Concepts of Database Management','CT','CMP','43.99','Y'),
('079X','Second Wind','PU','MYS','24.95','N'),
('0808','The Edge','JP','MYS','6.99','Y'),
('1351','Dreamcatcher: A Novel','SC','HOR','19.60','N'),
('1382','Treasure Chests','TA','ART','24.46','N'),
('138X','Beloved','PL','FIC','12.95','Y'),
('1456','Truman','SS','HIS','29.90','Y'),
('2226','Harry Potter and the Prisoner of Azkaban','ST','SFI','13.96','N'),
('2281','Van Gogh and Gauguin','WP','ART','21.00','N'),
('2766','Of Mice and Men','PE','FIC','6.95','Y'),
('2908','Electric Light','FS','POE','14.00','N'),
('3350','Group: Six People in Search of a Life','BP','PSY','10.40','Y'),
('3743','Nine Stories','LB','FIC','5.99','Y');
INSERT INTO `book` (`BOOK_CODE`,`TITLE`,`PUBLISHER_CODE`,`TYPE`,`PRICE`,`PAPERBACK`) VALUES
('3906','The Soul of a New Machine','BY','SCI','11.16','Y'),
('5163','Travels with Charley','PE','TRA','7.95','Y'),
('5790','Catch-22','SC','FIC','12.00','Y'),
('6128','Jazz','PL','FIC','12.95','Y'),
('6328','Band of Brothers','TO','HIS','9.60','Y'),
('669X','A Guide to SQL','CT','CMP','37.95','Y'),
('6908','Franny and Zooey','LB','FIC','5.99','Y'),
('7405','East of Eden','PE','FIC','12.95','Y'),
('7443','Harry Potter and the Goblet of Fire','ST','SFI','18.16','N'),
('7559','The Fall','VB','FIC','8.00','Y'),
('8092','Godel, Escher, Bach','BA','PHI','14.00','Y'),
('8720','When Rabbit Howls','JP','PSY','6.29','Y'),
('9611','Black House','RH','HOR','18.81','N'),
('9627','Song of Solomon','PL','FIC','14.00','Y'),
('9701','The Grapes of Wrath','PE','FIC','13.00','Y'),
('9882','Slay Ride','JP','MYS','6.99','Y'),
('9883','The Catcher in the Rye','LB','FIC','5.99','Y'),
('9931','To Kill a Mockingbird','HC','FIC','18.00','N');
/*!40000 ALTER TABLE `book` ENABLE KEYS */;
How do I put that in proper format in a database, so I can run & install it in a MySQL database? Or can I run it as is?
Or are there any really simple resources that you could suggest, that might also offer some assistance?
Thank you so much for the help!
Source: http://community.livejournal.com/mysql/105012.html