+--
+-- Table structure for table `social_data`
+--
+
+DROP TABLE IF EXISTS `social_data`;
+CREATE TABLE IF NOT EXISTS `social_data` (
+ `isbn` VARCHAR(30),
+ `num_critics` INT,
+ `num_critics_pro` INT,
+ `num_quotations` INT,
+ `num_videos` INT,
+ `score_avg` DECIMAL(5,2),
+ `num_scores` INT,
+ PRIMARY KEY (`isbn`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+--
+-- 'Ratings' table. This tracks the star ratings set by borrowers.
+--
+
+DROP TABLE IF EXISTS ratings;
+CREATE TABLE ratings (
+ borrowernumber int(11) NOT NULL, -- the borrower this rating is for
+ biblionumber int(11) NOT NULL, -- the biblio it's for
+ rating_value tinyint(1) NOT NULL, -- the rating, from 1-5
+ timestamp timestamp NOT NULL default CURRENT_TIMESTAMP,
+ PRIMARY KEY (borrowernumber,biblionumber),
+ CONSTRAINT ratings_ibfk_1 FOREIGN KEY (borrowernumber) REFERENCES borrowers (borrowernumber) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT ratings_ibfk_2 FOREIGN KEY (biblionumber) REFERENCES biblio (biblionumber) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+--
+-- Table structure for table `quotes`
+--
+
+DROP TABLE IF EXISTS quotes;
+CREATE TABLE `quotes` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `source` varchar(45) DEFAULT NULL,
+ `text` mediumtext NOT NULL,
+ `timestamp` datetime NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8
+