--
-- Host: localhost    Database: bitspy_ebooktrade
-- ------------------------------------------------------


--
-- Current Database: `bitspy_ebooktrade`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `bitspy_ebooktrade` /*!40100 DEFAULT CHARACTER SET latin1 */;

USE `bitspy_ebooktrade`;

--
-- Table structure for table `bid`
--

CREATE TABLE `bid` (
  `bidID` int(11) NOT NULL AUTO_INCREMENT,
  `bookID` int(11) NOT NULL DEFAULT '0',
  `bidderID` varchar(50) NOT NULL DEFAULT '0',
  `bid_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `bid_amount` float NOT NULL DEFAULT '0',
  PRIMARY KEY (`bidID`)
) ENGINE=MyISAM AUTO_INCREMENT=15 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `bid`
--

INSERT INTO `bid` VALUES (1,1,'ravi@bitspy.com','2003-05-16 17:47:45',25),(9,4,'ravi@bitspy.com','2003-05-16 18:24:38',123),(8,3,'cs160@sjsu.edu','2003-05-16 18:09:06',123),(7,2,'cs160@sjsu.edu','2003-05-16 18:05:53',11),(10,3,'ravi@bitspy.com','2003-05-16 18:25:33',123.5),(11,5,'ravi@bitspy.com','2003-05-22 02:57:34',30),(13,7,'ravi@bitspy.com','2003-08-17 02:41:10',123),(14,8,'agfitting@hotmail.com','2003-08-25 12:24:51',75);

--
-- Table structure for table `book_category`
--

CREATE TABLE `book_category` (
  `bookID` int(11) NOT NULL DEFAULT '0',
  `categoryID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`bookID`,`categoryID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `book_category`
--

INSERT INTO `book_category` VALUES (1,10),(1,12),(2,4),(3,12),(4,9),(5,3),(6,11),(7,3),(7,4),(7,6),(7,7),(7,8),(7,9),(7,10),(7,11),(7,12),(8,8);

--
-- Table structure for table `book_for_sale`
--

CREATE TABLE `book_for_sale` (
  `bookID` int(11) NOT NULL AUTO_INCREMENT,
  `ISBN` varchar(30) NOT NULL DEFAULT '',
  `title` varchar(50) NOT NULL DEFAULT '',
  `author` varchar(50) NOT NULL DEFAULT '',
  `edition` tinyint(4) NOT NULL DEFAULT '0',
  `description` varchar(255) NOT NULL DEFAULT '',
  `sellerID` varchar(50) NOT NULL DEFAULT '',
  `base_price` int(11) NOT NULL DEFAULT '0',
  `start_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `end_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `image` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`bookID`),
  KEY `ISBN` (`ISBN`)
) ENGINE=MyISAM AUTO_INCREMENT=9 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `book_for_sale`
--

INSERT INTO `book_for_sale` VALUES (1,'123232323232','JDBC For Dummies','Homer Simpson',1,'crazy','ravi@bitspy.com',25,'2003-05-16 17:47:45','2003-05-30 17:47:45',NULL),(2,'1234','How to find Waldo','Beer Drinker',1,'asdfasdf','cs160@bitspy.com',11,'2003-05-16 18:05:53','2003-05-17 18:05:53',NULL),(3,'1234','Yahoo for Hippies','asdf',1,'123123','homer400@yahoo.com',123,'2003-05-16 18:09:06','2003-05-17 18:09:06',NULL),(4,'asdf','asdf','1234',1,'123','ravi@bitspy.com',123,'2003-05-16 18:24:38','2003-05-17 18:24:38',NULL),(5,'12312312313','Tai-Chi Biology','Jet Li',1,'cool book','ravi@bitspy.com',30,'2003-05-22 02:57:34','2003-06-05 02:57:34',NULL),(6,'111111','test','test',1,'','test@sjsu.edu',11,'2003-05-24 00:05:02','2003-05-25 00:05:02',NULL),(7,'Tai','Hi','Bi',1,'adfasdfsdf','ravi@bitspy.com',123,'2003-08-17 02:41:10','2003-08-20 02:41:10',NULL),(8,'0138147574','Signals and Systems','Alan V. Oppenheim',1,'EE210 book very good condition','agfitting@hotmail.com',75,'2003-08-25 12:24:51','2003-08-26 12:24:51',NULL);

--
-- Table structure for table `book_wanted`
--

CREATE TABLE `book_wanted` (
  `ISBN` varchar(15) NOT NULL DEFAULT '0',
  `userID` varchar(50) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ISBN`,`userID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `book_wanted`
--

INSERT INTO `book_wanted` VALUES ('','dixon@sd-6.com'),('0471321680','agfitting@hotmail.com'),('123333333333333','dixon@sd-6.com'),('1234','cs160@sjsu.edu'),('1234','homer400@yahoo.com'),('2222','test@sjsu.edu'),('324444444444444','dixon@sd-6.com'),('342','dixon@sd-6.com'),('342222222222222','dixon@sd-6.com'),('432','dixon@sd-6.com'),('432423432343242','dixon@sd-6.com'),('sdfafads','dixon@sd-6.com');

--
-- Table structure for table `category`
--

CREATE TABLE `category` (
  `categoryID` int(11) NOT NULL AUTO_INCREMENT,
  `parentID` int(11) NOT NULL DEFAULT '0',
  `category_name` varchar(30) NOT NULL DEFAULT '',
  `category_desc` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`categoryID`)
) ENGINE=MyISAM AUTO_INCREMENT=13 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `category`
--

INSERT INTO `category` VALUES (1,0,'Computer Science',''),(2,0,'Math',''),(3,0,'Biology',''),(4,1,'C++',''),(5,1,'Java','Horstmann\'s books'),(6,1,'functional programming','i hate cs152'),(7,2,'statistics','numerical analysis'),(8,2,'calculus','I, II, III'),(9,1,'C#','new lang'),(10,1,'database','mySQL'),(11,5,'OO Programming','design pattern'),(12,5,'JDBC','client DB design');


