-- Table structure for table `rating_option_vote_aggregated`
--

CREATE TABLE `rating_option_vote_aggregated` (
  `primary_id` int(11) NOT NULL auto_increment,
  `rating_id` smallint(6) unsigned NOT NULL default '0',
  `entity_pk_value` bigint(20) unsigned NOT NULL default '0',
  `vote_count` int(10) unsigned NOT NULL default '0',
  `vote_value_sum` int(10) unsigned NOT NULL default '0',
  `percent` tinyint(3) NOT NULL default '0',
  `store_id` smallint(5) unsigned NOT NULL default '0',
  PRIMARY KEY  (`primary_id`),
  KEY `FK_RATING_OPTION_VALUE_AGGREGATE` (`rating_id`),
  KEY `FK_RATING_OPTION_VOTE_AGGREGATED_STORE` (`store_id`),
  CONSTRAINT `FK_RATING_OPTION_VALUE_AGGREGATE` FOREIGN KEY (`rating_id`) REFERENCES `rating` (`rating_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_RATING_OPTION_VOTE_AGGREGATED_STORE` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=199 DEFAULT CHARSET=utf8;

--
-- Dumping data for table `rating_option_vote_aggregated`
--

INSERT INTO `rating_option_vote_aggregated` VALUES (1,1,51,2,4,40,0),(2,1,51,5,4,16,1),(3,1,16,2,4,40,0),(4,1,16,3,4,27,1),(5,1,17,1,0,0,1),(6,1,18,1,2,40,0),(7,1,18,3,0,0,1),(8,1,18,1,2,40,2),(9,1,19,1,5,100,0),(10,1,19,3,5,33,1),(11,1,20,1,5,100,0),(12,1,20,5,5,20,1),(13,1,25,1,5,100,0),(14,1,25,3,5,33,1),(15,1,26,3,9,60,0),(16,1,26,6,9,30,1),(17,1,27,6,26,87,0),(18,1,27,10,16,32,1),(19,1,27,1,5,100,2),(20,1,27,1,5,100,3),(21,1,28,1,2,40,0),(22,1,28,2,2,20,1),(23,1,29,2,0,0,1),(24,1,30,1,0,0,1),(25,1,31,2,0,0,1),(26,1,32,1,5,100,0),(27,1,32,4,5,25,1),(28,1,33,3,0,0,1),(29,1,34,2,0,0,1),(30,1,35,1,5,100,0),(31,1,35,5,5,20,1),(32,1,36,2,0,0,1),(33,1,37,3,0,0,1),(34,1,38,1,0,0,1),(35,1,39,2,0,0,1),(36,1,41,3,0,0,1),(37,1,42,2,0,0,1),(38,1,44,2,9,90,0),(39,1,44,4,9,45,1),(40,1,49,2,0,0,1),(41,2,16,2,4,40,0),(42,2,16,3,4,27,1),(43,2,17,1,0,0,1),(44,2,18,1,3,60,0),(45,2,18,3,0,0,1),(46,2,18,1,3,60,2),(47,2,19,1,4,80,0),(48,2,19,3,4,27,1),(49,2,20,1,4,80,0),(50,2,20,5,4,16,1),(51,2,25,1,4,80,0),(52,2,25,3,4,27,1),(53,2,26,3,9,60,0),(54,2,26,6,9,30,1),(55,2,27,6,26,87,0),(56,2,27,10,17,34,1),(57,2,27,1,5,100,2),(58,2,27,1,4,80,3),(59,2,28,1,4,80,0),(60,2,28,2,4,40,1),(61,2,29,2,0,0,1),(62,2,30,1,0,0,1),(63,2,31,2,0,0,1),(64,2,32,1,5,100,0),(65,2,32,4,5,25,1),(66,2,33,3,0,0,1),(67,2,34,2,0,0,1),(68,2,35,1,5,100,0),(69,2,35,5,5,20,1),(70,2,36,2,0,0,1),(71,2,37,3,0,0,1),(72,2,38,1,0,0,1),(73,2,39,2,0,0,1),(74,2,41,3,0,0,1),(75,2,42,2,0,0,1),(76,2,44,2,6,60,0),(77,2,44,4,6,30,1),(78,2,49,2,0,0,1),(79,2,51,2,5,50,0),(80,2,51,4,5,25,1),(81,3,16,2,4,40,0),(82,3,16,3,4,27,1),(83,3,17,1,0,0,1),(84,3,18,1,3,60,0),(85,3,18,3,0,0,1),(86,3,18,1,3,60,2),(87,3,19,1,4,80,0),(88,3,19,3,4,27,1),(89,3,20,1,4,80,0),(90,3,20,5,4,16,1),(91,3,25,1,3,60,0),(92,3,25,3,3,20,1),(93,3,26,3,7,47,0),(94,3,26,6,7,23,1),(95,3,27,6,24,80,0),(96,3,27,10,15,30,1),(97,3,27,1,5,100,2),(98,3,27,1,4,80,3),(99,3,28,1,3,60,0),(100,3,28,2,3,30,1),(101,3,29,2,0,0,1),(102,3,30,1,0,0,1),(103,3,31,2,0,0,1),(104,3,32,1,5,100,0),(105,3,32,4,5,25,1),(106,3,33,3,0,0,1),(107,3,34,2,0,0,1),(108,3,35,1,3,60,0),(109,3,35,5,3,12,1),(110,3,36,2,0,0,1),(111,3,37,3,0,0,1),(112,3,38,1,0,0,1),(113,3,39,2,0,0,1),(114,3,41,3,0,0,1),(115,3,42,2,0,0,1),(116,3,44,2,6,60,0),(117,3,44,4,6,30,1),(118,3,49,2,0,0,1),(119,3,51,2,5,50,0),(120,3,51,4,5,25,1),(121,1,48,1,0,0,1),(122,2,48,1,0,0,1),(123,3,48,1,0,0,1),(124,1,47,1,0,0,1),(125,2,47,1,0,0,1),(126,3,47,1,0,0,1),(127,1,46,1,0,0,1),(128,2,46,1,0,0,1),(129,3,46,1,0,0,1),(130,1,53,1,0,0,1),(131,2,53,1,0,0,1),(132,3,53,1,0,0,1),(133,1,119,2,0,0,1),(134,2,119,2,0,0,1),(135,3,119,2,0,0,1),(136,1,120,1,0,0,1),(137,2,120,1,0,0,1),(138,3,120,1,0,0,1),(139,1,126,1,2,40,0),(140,1,126,2,2,20,1),(141,2,126,1,3,60,0),(142,2,126,2,3,30,1),(143,3,126,1,1,20,0),(144,3,126,2,1,10,1),(145,1,83,2,5,50,0),(146,1,83,3,5,33,1),(147,2,83,2,5,50,0),(148,2,83,3,5,33,1),(149,3,83,2,6,60,0),(150,3,83,3,6,40,1),(151,1,112,1,4,80,0),(152,1,112,2,4,40,1),(153,2,112,1,5,100,0),(154,2,112,2,5,50,1),(155,3,112,1,3,60,0),(156,3,112,2,3,30,1),(157,1,98,2,0,0,1),(158,2,98,2,0,0,1),(159,3,98,2,0,0,1),(160,1,103,2,5,50,0),(161,1,103,3,5,33,1),(162,2,103,2,5,50,0),(163,2,103,3,5,33,1),(164,3,103,2,6,60,0),(165,3,103,3,6,40,1),(166,1,111,1,0,0,1),(167,2,111,1,0,0,1),(168,3,111,1,0,0,1),(169,1,54,1,0,0,1),(170,2,54,1,0,0,1),(171,3,54,1,0,0,1),(172,1,135,2,8,80,0),(173,1,135,4,8,40,1),(174,2,135,2,6,60,0),(175,2,135,4,6,30,1),(176,3,135,2,6,60,0),(177,3,135,4,6,30,1),(178,1,52,1,5,100,0),(179,1,52,1,5,100,1),(180,3,52,1,5,100,0),(181,3,52,1,5,100,1),(182,2,52,1,5,100,0),(183,2,52,1,5,100,1),(184,1,132,2,9,90,0),(185,1,132,1,4,80,1),(186,1,132,1,5,100,2),(187,3,132,2,6,60,0),(188,3,132,1,3,60,1),(189,3,132,1,3,60,2),(190,2,132,2,8,80,0),(191,2,132,1,4,80,1),(192,2,132,1,4,80,2),(193,1,45,1,3,60,0),(194,1,45,1,3,60,1),(195,3,45,1,4,80,0),(196,3,45,1,4,80,1),(197,2,45,1,3,60,0),(198,2,45,1,3,60,1);

--
-- Table structure for table `rating_store`
--

CREATE TABLE `rating_store` (
  `rating_id` smallint(6) unsigned NOT NULL default '0',
  `store_id` smallint(5) unsigned NOT NULL default '0',
  PRIMARY KEY  (`rating_id`,`store_id`),
  KEY `FK_RATING_STORE_STORE` (`store_id`),
  CONSTRAINT `FK_RATING_STORE_RATING` FOREIGN KEY (`rating_id`) REFERENCES `rating` (`rating_id`) ON DELETE CASCADE,
  CONSTRAINT `FK_RATING_STORE_STORE` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `rating_store`
--

INSERT INTO `rating_store` VALUES (1,0),(2,0),(3,0),(1,1),(2,1),(3,1),(1,2),(2,2),(3,2),(1,3),(2,3),(3,3);

--
-- Table structure for table `rating_title`
--

CREATE TABLE `rating_title` (
  `rating_id` smallint(6) unsigned NOT NULL default '0',
  `store_id` smallint(5) unsigned NOT NULL default '0',
  `value` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`rating_id`,`store_id`),
  KEY `FK_RATING_TITLE_STORE` (`store_id`),
  CONSTRAINT `FK_RATING_TITLE` FOREIGN KEY (`rating_id`) REFERENCES `rating` (`rating_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_RATING_TITLE_STORE` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `report_event`
--

CREATE TABLE `report_event` (
  `event_id` bigint(20) unsigned NOT NULL auto_increment,
  `logged_at` datetime NOT NULL default '0000-00-00 00:00:00',
  `event_type_id` smallint(6) unsigned NOT NULL default '0',
  `object_id` int(10) unsigned NOT NULL default '0',
  `subject_id` int(10) unsigned NOT NULL default '0',
  `subtype` tinyint(3) unsigned NOT NULL default '0',
  `store_id` smallint(5) unsigned NOT NULL,
  PRIMARY KEY  (`event_id`),
  KEY `IDX_EVENT_TYPE` (`event_type_id`),
  KEY `IDX_SUBJECT` (`subject_id`),
  KEY `IDX_OBJECT` (`object_id`),
  KEY `IDX_SUBTYPE` (`subtype`),
  KEY `FK_REPORT_EVENT_STORE` (`store_id`),
  CONSTRAINT `FK_REPORT_EVENT_STORE` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_REPORT_EVENT_TYPE` FOREIGN KEY (`event_type_id`) REFERENCES `report_event_types` (`event_type_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `report_event_types`
--

CREATE TABLE `report_event_types` (
  `event_type_id` smallint(6) unsigned NOT NULL auto_increment,
  `event_name` varchar(64) NOT NULL,
  `customer_login` tinyint(3) unsigned NOT NULL default '0',
  PRIMARY KEY  (`event_type_id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;

--
-- Dumping data for table `report_event_types`
--

INSERT INTO `report_event_types` VALUES (1,'catalog_product_view',1),(2,'sendfriend_product',1),(3,'catalog_product_compare_add_product',1),(4,'checkout_cart_add_product',1),(5,'wishlist_add_product',1),(6,'wishlist_share',1);

--
-- Table structure for table `review`
--

CREATE TABLE `review` (
  `review_id` bigint(20) unsigned NOT NULL auto_increment,
  `created_at` datetime NOT NULL default '0000-00-00 00:00:00',
  `entity_id` smallint(5) unsigned NOT NULL default '0',
  `entity_pk_value` int(10) unsigned NOT NULL default '0',
  `status_id` tinyint(3) unsigned NOT NULL default '0',
  PRIMARY KEY  (`review_id`),
  KEY `FK_REVIEW_ENTITY` (`entity_id`),
  KEY `FK_REVIEW_STATUS` (`status_id`),
  KEY `FK_REVIEW_PARENT_PRODUCT` (`entity_pk_value`),
  CONSTRAINT `FK_REVIEW_ENTITY` FOREIGN KEY (`entity_id`) REFERENCES `review_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_REVIEW_PARENT_PRODUCT` FOREIGN KEY (`entity_pk_value`) REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_REVIEW_STATUS` FOREIGN KEY (`status_id`) REFERENCES `review_status` (`status_id`)
) ENGINE=InnoDB AUTO_INCREMENT=798 DEFAULT CHARSET=utf8 COMMENT='Review base information';

--
-- Dumping data for table `review`
--

INSERT INTO `review` VALUES (8,'2007-08-25 11:39:12',1,35,1),(10,'2007-08-25 13:23:30',1,19,1),(13,'2007-08-25 15:33:22',1,36,1),(14,'2007-08-25 15:37:26',1,35,1),(15,'2007-08-25 15:43:42',1,20,1),(17,'2007-08-25 16:03:12',1,30,1),(21,'2007-08-26 15:29:23',1,18,1),(22,'2007-08-26 15:30:08',1,18,1),(23,'2007-08-26 15:30:33',1,18,1),(24,'2007-08-26 15:36:40',1,19,1),(25,'2007-08-26 15:49:19',1,17,1),(26,'2007-08-26 15:58:11',1,20,1),(27,'2007-08-26 15:58:40',1,20,1),(28,'2007-08-26 15:59:16',1,20,1),(29,'2007-08-26 16:02:56',1,16,1),(41,'2007-08-26 16:27:30',1,25,1),(43,'2007-08-26 16:37:51',1,26,1),(44,'2007-08-26 16:38:25',1,26,1),(45,'2007-08-26 16:41:21',1,27,1),(46,'2007-08-26 16:41:48',1,27,1),(47,'2007-08-26 16:44:43',1,28,1),(48,'2007-08-26 18:28:49',1,35,1),(49,'2007-08-27 16:50:11',1,36,1),(50,'2007-08-27 16:52:24',1,37,1),(51,'2007-08-27 16:55:51',1,37,1),(52,'2007-08-27 16:56:54',1,37,1),(53,'2007-08-27 17:00:12',1,38,1),(54,'2007-08-27 17:03:59',1,29,1),(55,'2007-08-27 17:05:03',1,29,1),(56,'2007-08-27 17:07:39',1,31,1),(57,'2007-08-27 17:08:21',1,31,1),(59,'2007-08-27 17:10:56',1,32,1),(60,'2007-08-27 17:12:27',1,33,1),(61,'2007-08-27 17:12:47',1,33,1),(62,'2007-08-27 17:13:22',1,33,1),(63,'2007-08-27 17:15:54',1,34,1),(64,'2007-08-27 17:16:21',1,34,1),(65,'2007-08-27 17:17:44',1,39,1),(70,'2007-08-27 17:31:53',1,41,1),(71,'2007-08-27 17:32:45',1,41,1),(74,'2007-08-27 17:35:48',1,42,1),(75,'2007-08-27 17:37:02',1,42,1),(76,'2007-08-28 13:09:40',1,44,1),(77,'2007-08-28 13:10:25',1,44,1),(78,'2007-08-28 15:15:01',1,49,1),(79,'2007-08-28 18:08:11',1,49,1),(80,'2007-08-28 18:37:23',1,51,1),(81,'2007-08-28 19:36:56',1,25,1),(82,'2007-08-28 19:58:35',1,48,1),(83,'2007-08-28 19:59:57',1,47,1),(84,'2007-08-28 20:01:42',1,46,1),(85,'2007-08-28 20:04:06',1,53,1),(86,'2007-08-29 16:07:46',1,119,1),(87,'2007-08-29 16:10:20',1,120,1),(88,'2007-08-29 16:14:17',1,126,1),(89,'2007-08-29 16:17:33',1,83,1),(91,'2007-08-29 16:22:24',1,112,1),(92,'2007-08-29 16:24:28',1,98,1),(93,'2007-08-29 16:27:44',1,103,1),(94,'2007-08-29 16:32:17',1,111,1),(95,'2007-08-31 06:09:21',1,27,1),(96,'2007-08-31 08:40:10',1,26,1),(97,'2007-08-31 08:59:09',1,32,1),(98,'2007-08-31 09:14:35',1,98,1),(99,'2007-08-31 09:36:10',1,27,1),(100,'2007-08-31 09:57:17',1,27,1),(101,'2007-08-31 09:58:56',1,32,1),(102,'2007-08-31 10:11:07',1,41,1),(103,'2007-08-31 10:37:13',1,39,1),(104,'2007-08-31 10:38:15',1,54,1),(105,'2007-08-31 10:41:44',1,51,1),(107,'2007-08-31 13:41:41',1,35,1),(113,'2007-08-31 22:26:36',1,135,1),(116,'2007-09-01 02:01:23',1,119,1),(118,'2007-09-01 09:24:58',1,135,1),(121,'2007-09-01 12:22:54',1,27,1),(671,'2008-03-18 20:10:18',1,27,1),(675,'2008-03-19 17:57:53',1,135,1),(679,'2008-03-21 14:03:56',1,32,1),(681,'2008-03-22 17:50:12',1,112,1),(684,'2008-03-23 12:01:37',1,103,1),(690,'2008-03-26 09:02:31',1,35,1),(692,'2008-03-27 14:35:22',1,135,1),(693,'2008-03-27 20:19:45',1,27,1),(695,'2008-03-28 00:03:06',1,135,1),(700,'2008-03-30 03:28:03',1,27,1),(703,'2008-03-30 15:44:06',1,27,1),(708,'2008-03-31 10:53:41',1,44,1),(710,'2008-03-31 13:14:39',1,28,1),(718,'2008-04-01 17:25:22',1,16,1),(720,'2008-04-02 05:48:33',1,20,1),(724,'2008-04-03 03:17:13',1,126,1),(728,'2008-04-03 20:19:19',1,103,1),(732,'2008-04-04 03:58:14',1,19,1),(736,'2008-04-04 17:20:44',1,27,1),(750,'2008-04-07 20:41:16',1,52,1),(762,'2008-04-10 20:44:14',1,32,1),(765,'2008-04-12 00:00:29',1,83,1),(768,'2008-04-13 11:07:39',1,25,1),(771,'2008-04-14 13:31:49',1,51,1),(774,'2008-04-14 17:20:43',1,44,1),(775,'2008-04-14 22:19:03',1,132,1),(776,'2008-04-14 23:35:03',1,16,1),(777,'2008-04-15 10:12:40',1,18,1),(779,'2008-04-15 20:42:49',1,51,1),(783,'2008-04-17 02:24:45',1,27,1),(786,'2008-04-17 12:56:09',1,132,1),(788,'2008-04-17 17:14:48',1,26,1),(789,'2008-04-17 17:27:16',1,18,1),(790,'2008-04-17 18:56:01',1,26,1),(792,'2008-04-18 00:40:58',1,45,1),(795,'2008-04-18 11:12:13',1,83,1),(797,'2008-04-18 17:26:56',1,26,1);

--
-- Table structure for table `review_detail`
--

CREATE TABLE `review_detail` (
  `detail_id` bigint(20) unsigned NOT NULL auto_increment,
  `review_id` bigint(20) unsigned NOT NULL default '0',
  `store_id` smallint(5) unsigned default '0',
  `title` varchar(255) NOT NULL default '',
  `detail` text NOT NULL,
  `nickname` varchar(128) NOT NULL default '',
  `customer_id` int(10) unsigned default NULL,
  PRIMARY KEY  (`detail_id`),
  KEY `FK_REVIEW_DETAIL_REVIEW` (`review_id`),
  KEY `FK_REVIEW_DETAIL_STORE` (`store_id`),
  CONSTRAINT `FK_REVIEW_DETAIL_REVIEW` FOREIGN KEY (`review_id`) REFERENCES `review` (`review_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_REVIEW_DETAIL_STORE` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=897 DEFAULT CHARSET=utf8 COMMENT='Review detail information';

--
-- Dumping data for table `review_detail`
--

INSERT INTO `review_detail` VALUES (107,8,1,'I love this shirt!','This shirts if really great. Especially with the spinal diagram, finally I can see myself for who I really am! ','Sandra Doe',1),(109,10,1,'I feel strange holding a television to my head','I feel strange holding a television to my head.  This product should come with free suspenders','Starbuck',1),(112,13,1,'Cute, but see through','Cute design, but material is too thin.','Natashenka',1),(113,14,1,'chics dig ribs','Ever since buying this shirt chics cant take their hands off me. I don\'t know what it is it must be sprayed with axe - the seductive body spray for men. I\'m the last one to believe commercials but I tell you you won\'t regret buying this shirt. I ordered it n every color.','udini',1),(114,15,1,'Not an i-phone','cest ci nest pas une i-phone.','Udini',1),(116,17,1,'It\'s a pitty they don\'t have large sizes','You wont believe it, my show size is 13 so it\'s impossible for me to get a new pa','Seba\'s',1),(120,21,1,'Great all around phone','Hello all. Just received my phone a few days ago, was super fast shipping using the 2 day shipping option (which by the way is free!! So make sure you select that, as the discount is only shown when you are about to place the final purchase). Luckily I ordered my phone right before the phone was about in low stock.\r\nPHONE: So can\'t really complain about much of anything. Phone has really intuitive interface, very easy to navigate as the arrow keys all function as shortcuts (to calls, file folders, aim, etc..). The walkman button is very convenient as it leads right to the music player. ','John Johnson',1),(121,22,1,'Awesome Phone','The phone is awesome. Fully Loaded & sounds really great, camera is also good.2MP.\r\nExcellent!!! ','Panda',1),(122,23,1,' Ultimate Cell Phone','Wow....What a great cell phone. I really like.....no no.....LOVE this Phone. The Functions and usability of this one are too cool. The MP3 Player palys nice with good user interface. The 2.0 MP Camera is very good, I have stopped taking my Digi Cam to my trips. I never have anytype of problem during the phone call. So considering the +ve points, I truly recommend it to any one.','Ananda',1),(123,24,1,'Worth the upgrade!!!','I\'ve had this phone now for 2 weeks and it has met all of my expectations and exceeded them even. I upgraded from the 8125 and just about everything is a huge improvement!\r\nThe 3G(UMTS) is very impressive with it\'s speed. I even use this phone as a modem on my home pc and it\'s nearly identical in speed as DSL when surfing the net or downloading file/music etc.\r\nCamera is very impressive with clear resolutions for a camera phone with the 2MP.\r\nI also use a bluetooth headset 2.0 with this and mine works wonderfully with sony erriccson; it\'s quite intuitive and picks up the signal instantly. The \'blackberry\' scroll wheel is a huge plus on this phone and I find myself using this feature more than any other buttons. ','Armstrong',1),(124,25,1,'Sweet!','What I love:\r\n============\r\n- Form factor: It is beautiful, it is cute and catchy! It turns heads. Enough said.\r\n- Size: Size is one of the strongest points considering all it does. It neatly slips into a shirt pocket or sits well on the belt.\r\n- Keys: Could be a bit small but I could use it pretty easily though my fingers are bordering on \'butterfingers\'.\r\n- Trackball: Awesome! Just don\'t press it too hard while using it. Just \'roll-it\'!. It is great while you have to move around the screen from control to control\r\n- Voice-dialing: Has worked for me very well the 10 or so times I have tried in my van on the road and off. You have to first choose the voice dialing option from the list of icons on the main menu. I read you can ','Ashwini',1),(125,26,1,'Fouch','I wouldn\'t normally write a review, but everyone is giving this phone a bad rap.. I think people that buy into those reviews are getting cheated out of an excellent phone. I\'ve know several people with Razors that ALL like this much much better. The battery life is absolutely fine, and my phone is on vibrate all day. Maybe other reviewers are on the phone constantly on full blast playing mp3s and shooting video.. I don\'t get it. I\'ve had this phone the better part of a year and never ran out of charge during the day. I plug it in at night. I work as an architect and am on the phone all day long and beat the living hell out of it.. which is another huge plus about this phone. It has a *sturdy* metal housing.. not thin toy crap a la razors or plastic like most phones. I don\'t do a lot of bluetooth, computer syncing, etc, just use the phone in a fairly conventional way, with regular camera use, and for that it is *easily* far and away the best phone I\'ve ever owned.','solid phone',1),(126,27,1,' A crippled cell phone','1, you can not synchronize the phonebook with your PC in a convenient way. I had to code a program to generate single vcard files and send them over bluetooth ONE BY ONE. There seems to be no way to do it without bluetooth.\r\n\r\n2, you can not apply mp3 files as ringtones. However you can download mp3/aac ringtones from sprint (for a fee). Oh the original ringtones that came with the phone? They are just awful.\r\n\r\n','bessel',1),(127,28,1,'MJS','Yeah it looks cool, but it\'s got terrible sound quality, even with an ear-piece. Additionally, they\'ve crammed a lot of stuff into the menus that would probably be desirable to some people, but if you don\'t want it, it\'s just more junk to have to navigate through.','Looks can be deceiving',1),(128,29,1,'Great phone - unless you are outside or in the car','I only needed a basic phone - no MP3, camera, or FM radio. This phone delivered with great reception, good sound quality, great battery life, and a very small size. Inside a building it works great. Why the low score? The tinted plastic over the display makes it impossible to see the display outdoors and in the car. If the sun is out, forget it! I even managed to figure out how to remove all of the wallpaper backgrounds and to maximize the contrast. Still, don\'t plan to use this outdoors. Nokia should recall this product to replace the tinted cover. Update: Yesterday this phone took was accidently dropped onto a very hard ceramic tile floor and it still works perfectly! A similar drop ended the life of my digital camera a few months ago. So, if I were to rate this cell phone now I would give it 3 stars, maybe even 4 stars. I like reliable, sturdy stuff and this cell seems to be unusually well made.','Sheridan',1),(140,41,1,' The Fastest Mac Notebook Ever','It\'s the most stunning idea, isn\'t it? This top of the line MacBook Pro is the fastest Mac Notebook ever, and probably one of the fastest Macs period.\r\n\r\nWhen Steve Jobs announced the new Macs, with Intel Core Duo processors I was almost certain I wanted to buy one. Why? Macs are well known for ease of use and capabilities, but they have managed all that for years, with processors that are not always top-notch. That all changed in January 2006.\r\n\r\n','Stephen',1),(142,43,1,'It\'s worked phenominally for me so far...','Fortunately, the computer worked and worked well from the start for me. The performance is phenomenal, the craftsmanship and style are only slightly short of amazing. (sturdy and stylish, but heavy and heats up quickly.) I hope I never have to deal with customer service but the product performs. The worse thing is that if you have it set to use full power all of the time you get maybe an hour and a half of battery time. Still like my PowerBook better though.','Next',1),(143,44,1,' Not happy at all','I purchased the Red Ferrari Laptop and had nothing but problems form the start. I was supposed to get a free matching mouse, when I received the mouse it looked two years old. When I got laptop working the wrist rest pad right next to the mouse pad was heating up to an uncomfortable level. When I notified PCmode, the supplier of the laptop, they agreed to replace it with another laptop. When I asked if it had the same problems, they told me it headed up as all laptops heat up. The agreed to replace the laptop with another laptop but with a 50% lesser value than the one I purchased.\r\n\r\nI will never buy from these people again... ','Cappello',1),(144,45,1,'Vision of Vaio...','If you\'re buying this laptop, it\'s undoubtedly partially for the design, style and lightweight features of the TX series. You can get cheaper, better performing options at about the same weight, but it won\'t have the \"wow\" factor of this TXN27N. That being said let\'s get right into the pros and cons.\r\n\r\nAs a side note, if you\'re wondering about differences between the 25,27, 29 TX models, it\'s pretty straightforward. The 25 has 1GB RAM and 80GB hard drive, the 27 has 2GB RAM, 100 GB hard drive, the 29 is the same as the 27 except it comes with a carrying case and the exterior has a sleek special shiny coating. IMO, the 27N is the best value among the 3 when you look at the price points.\r\n\r\n','Chen',1),(145,46,1,'Sleek compact design for business travelers on the go.','I waited to get this notebook loaded with Vista. I have mixed feelings. The notebook hardware design is quite sleek and handsome. I am not so impressed with Vista running on this machine though. It just feels that Vista is a resource hog and is constantly running the CPU at 100% which causes the fan to run endlessly. I think the issue is that Sony used the same hardware specs as the previous TX series just to get a Vista version out quickly, but it really is not equipped to handle the new Vista OS as well. So I was disappointed when I upgraded to this notebook thinking that it would run faster, but actually it runs slower than my previous Vaio running Win XP. Though there are some improvements with Vista over XP, Vista probably runs better on a Duo Intel chipset than the Solo that is used in this notebook. The poor notebook is contantly working overtime just to do very simple normal every day applications and it takes forever to start up or reboot. If you just base it on looks alone, then it gets a 4 start rating.','Steven',1),(146,47,1,'Solid and reliable','At first, I wasn\'t terribly impressed. I had been accustomed to working\r\nwith a Toshiba Protege M405 at home and when I purchased the Gateway for\r\nexclusive use at the office, my initial impression of the machine when\r\nI put it into action was noticeably lacking in enthusiasm or excitement.\r\n\r\nI\'ve since come to appreciate this notebook for something much more\r\nimpressive that I couldn\'t gauge out of the box, and that was its\r\namazing reliability and performance over time.\r\n\r\nThis machine is solid. It does not crash.\r\n\r\n','Mendez',1),(147,48,1,'Love it!!! get it!!!','You got to have one of these they come in green','yochan',1),(148,49,1,'Extremely Comfortable!!!','i love this T-shirt\r\nthe quality is nice\r\nand it\'s very soft without tag\r\n\r\ni bought the white one\r\nit can be see through just like other custom\'s review.\r\n\r\nalso i think their size small is a little bigger than other brand\r\nbut it\'s not a big deal though! ','Robin',1),(149,50,1,'excellent','The T-shirt is a very good one. its comfortable and easy to wash, doesn\'t even soften the cloth when washed daily. i love it and good stuff','A Review',1),(150,51,1,'Perfect Cotton Feel','My friend really liked the Tee shirt.he did\'nt think that I would be able to get it in his size but I was able to.I really made my friends day when I told him that I was able to find the tee shirt in the size he wanted.','Adam',1),(151,52,1,'Great, affordable product','These tee shirts are generously cut, hold their color, stand up to repeated washings and are very comfortable. In addition, they are comfortable, extremely affordable and maintain their shape. I highly recommend them.','Patrick',1),(152,53,1,' Well made, affordable. . .you can\'t go wrong!','I am very hard on my t-shirts, and therefore, I need the best quality t-shirt on the market. I\'ve tried them all (except Hanes).  Durable, strong, and surprisingly flattering to those of us lugging around a spare tire, if you get my drift.','Mike',1),(153,54,1,'Inexpensive and very light weight clog','This clog was inexpensive compared to crocs, but I found it did not fit my foot very well. It is, however, very light weight and would otherwise be comfortable. It is also not very attractive. I would not wear this one anywhere but my own yard for gardening, etc.','Loren',1),(154,55,1,' Beach Clogs,','I received these today in the mail and am pleased with the way these feel on my feet,they are so comfortable and so easy to slide on.','Laurie',1),(155,56,1,'Love the look and was comfy for heels!','Would give them 5 stars if not for the toe cleavage issue. Loved them enough to keep them though. Very cute!','Shoe Lover',1),(156,57,1,'Good, Sexy Shoe','These shoes are beautiful, the bright ruby red color complimented by outfit nicely. It did take some breaking in but after which they were as comfortable as pumps can get.','Shoes!!!',1),(158,59,1,'Classic and Cute','This shoe is comfortable and the way the front of the shoe is cut makes it a little more interesting.....','Vanessa',1),(159,60,1,' lite golf shoe','nice shoe. A little tight in the width','Tippy',1),(160,61,1,'Comfortable, good-looking','This is a sharp-looking shoe that is very comfortable for walking and provides a good alternative to the traditional, boring \"golf shoe.\"\r\n','Kathryn',1),(161,62,1,'womens golf shoes','These shoes are my first pair of golf shoes.I have bad feet and wear orthotics so I really wanted a pair of shoes that would feel great on my feet. These are really nice and are a great price for this brand.','Moqilka',1),(162,63,1,' Great Purchase. Best value and very comfortable,','I purchased a pair and have been using it everyday from the past six months. The shoes are very comfortable and look very professional. Love them.','Arun',1),(163,64,1,'Top leather scuffed on first wear','The shoes look and wear great. However, the leather is pretty weak. I think I must have kicked a table leg or something on my frist outing in them. Now the tip of my left shoe has a quarter-size scuff on it. I will have to try to cover it up by oiling it. Obviously I don\'t think this pair will last long at all.','Lian',1),(164,65,1,' !!!!!!','this is exactly what i wanted from a sweatshirt.\r\n\r\nit has a tight figure with a full sized hood\r\nand its really warm and comfortable. ','Sanchez',1),(169,70,1,'Pretty Nice','This is great looking and functional dresser.  I love it.','matt',1),(170,71,1,'Buy this now!!!','This is a beautiful dresser with a rustic feel','Juan',1),(173,74,1,' its a modern bed!','actually my bf and i we were looking for a king size bed..when i saw this bed it was beautiful and thats the color i like and also its a modern style....\r\n','Gertrude',1),(174,75,1,' Excellent!',' Excellent wood bed and drawer set.  Excellent value, fast shipping and a quality product. Awesome! ','David',1),(175,76,1,' Another stunning winner from the bright minds at Canon','I spent three hours yesterday playing with the brand-new Canon Digital Rebel XT digital SLR camera, and man, was I impressed.\r\n\r\nI hadn\'t been too impressed with the original Digital Rebel, except for its revolutionarily low price (for a d-SLR), because it was slow and felt slimsy. The new DR XT is quite different. Even though it\'s 3 ounces lighter than the original DR -- mostly due to the use of a smaller battery; see below -- its smaller form factor actually makes it feel more solid and \"real\". In other word, unlike the original DR, this one feels professional, not toy-like at all.\r\n\r\n\r\n','Mira',1),(176,77,1,' The best thing I\'ve ever bought','The XT is amazing. The battery comes partly charged so you can immedietly start using the camera (thank you Canon!) I\'ve already shot about 200 pictures with it and the battery hasn\'t died yet.\r\n\r\n\r\n\r\n\r\n','Al',1),(177,78,1,'great, comfy flip flops!','Very comfortable flip flops! I wear a size 10-11 and the \"extra-large\" was too small. Most stores don\'t carry the 10 or 11 (beyond extra-large) but I was able to find them on Amazon. Don\'t give up if you need a bigger size than the extra-large!','Erika',1),(178,79,1,'These are the best sandals!','They were delivered really quickly and are just what I was expecting. The are great quality and so comfortable!','Jenna',1),(179,80,1,'I love this Ottoman','Best Ottoman ever!!!!','Terry Ferguson',1),(180,81,1,'I can\'t believe they still make PC\'s....','These Mac\'s are so much better than PC\'s it\'s unbelievable!!!   Obviously designed for the user...  less clicks to get to everything.  amazing!!!','Terry Ferguson',1),(181,82,1,'great for everyday use','I purchased this camera a few months ago because I like to have a camera on hand always. My DSLR and 35 mm SLR cameras are too bulky for everyday. The price and MPs were right, as well as the small size which fits into the clean pockets of any of my purses- no need to worry about lens scratch. For those who don\'t carry a purse and are concerned about the lens, a very small case will do the trick. The images are clean although I\'ve only printed up to 8.5 X 11 so far.','Stull',1),(182,83,1,'Amazing camera value!','This is one of those nice cameras that\'s so well done, it\'s easier to talk about what the camera ISN\'T, rather than what it IS! This camera is not a small, shirt pocket camera, and might be a bit bigger than a woman would wish to carry in a purse. It\'s not a super-tele camera, but it does have a respectable, bit longer than average 4x optical zoom. ','Juan',1),(183,84,1,'Good Camera','    	\r\n77 of 82 people found the following review helpful:\r\nGood Camera, October 11, 2006\r\nBy 	Steve (FL) - See all my reviews\r\nGot it yesterday. In green. Actually it\'s a shiney yellowish-green. Nice feel. Fits well in shirt pocket. Very light; particullarly compared to my Pentax Optio 550. Good, nice size LCD. Easy to use yet with nice availability of choices for customization. Well written manual (you can find online thru google) and onboard help menu. Photos come out fairly nice. Tried indoors in low light with several scene settings, outdoors, macro, and supermacro. Colors look true, fairly sharp without noticable artifact. Used in South Florida morning daylight outside without any trouble with LCD viewing (camera has no classic viewfinder). Have read reviews of washout in bright sun: have not tried that yet. Overall, I\'m happy with the camera thus far. ','Jenella',1),(184,85,1,'Great inexpensive Couch','I love this couch...  extremely comfortable and easy to clean\r\n','Toish',1),(185,86,1,'Comfortable!!!','This is the most comfortable shirt I own...  I will buy many of these shirts','Essentl',1),(186,87,1,'A little see thru','The shirt is a little transparent but is extremely comfortable.\r\nOne of my favorite shirts!','Linda',1),(187,88,1,'Makes me relive my rocker days!!!','The cat kind of looks like me...  Great quality shirt at a good price...','Tetris',1),(188,89,1,'My Party Shoes','So comfortable i were them when I go out.  Whether your dancing or working in the garden, these are the perfect shoe!','J Mo',1),(190,91,1,'Great shoes, but a little expensive!','These are great...  very comfortable.  But a little expensive','Best Golfer Ever',1),(191,92,1,'All around comfort','these are great - whether in the office or a stroll to the store...  wear these everywhere','Bret',1),(192,93,1,'Sexy affordable shoes!','These a very sexy comfortable shoes...  buy them and go out dancing!','Lady Jazz',1),(193,94,0,'I wear these as I walk down the Boardwalk','Sexy shoes that always draw attention to my legs...  ','Fransisco',1),(194,95,1,'Light-weight small laptop','Sony VAIO TX serie is amazing light-weight laptop that I\'ve ever seen it. But TZ is lastest and lighter than TX series.','Tarzan',1),(195,96,1,'sounds great','what a great laptop!','Joe',1),(196,97,1,'These look great','I was the hottest drag model at the show','Johnny',NULL),(197,98,1,'Kenneth Cole Slip Ons are a good choice for Work','I dont like them personally\r\n','Zapateria',NULL),(198,99,2,'Solid Laptop','Expensive but solidly built laptop','Tommy',1),(199,100,1,'not bad','yeah it\'s alright I suppose','ryhrhrh',NULL),(200,101,1,'Top of the top','I\'ve been wearing these shoes since 1912 and believe me, they\'re hot !','Didier',NULL),(201,102,2,'nice deal','made my living room looks great again','lopsta.com',NULL),(202,103,1,'Nice','very coll design','dimsal',NULL),(203,104,1,'This ist great - Love the style','I`ve been looking for such a couch for months now I\'ve found it!','JBrunner',1),(204,105,1,'Looks Good','Looks good and nice. Highly recommended ;)','devx',NULL),(206,107,1,'Greattt','Very good product !','Moimeme',NULL),(212,113,1,'Good shoes','great look, solid design','Terry',NULL),(215,116,1,'Amazing','What a cool shirt, i wear it everyday','Me',NULL),(217,118,1,'very cool','I love these','ilja',NULL),(220,121,1,'Excellent quality','The Sony producs have alway had an excellent quality and value.','Dr. Gish',NULL),(770,671,1,'This notebook is great','This very high quality notebook great for office and business applications. ','tane',NULL),(774,675,1,'Mega shoes','I like it ...','Tester',1),(778,679,1,'Increased my profit margins by 15%','These shoes are great....I was in so much demand with my usal tricks...I could put my prices up by 15%... These shoes will definitely work wonders on your  Supply and Demand curve on your local turf :)','Lady of the night',NULL),(780,681,1,'These shoes rock','I was walking down the street one day, and I looked down at these shoes and thought, \"these are so great.\"','Joe',NULL),(783,684,1,'Nice','I particulary liked the stylish color/design implementation of these Pumps.\r\n\r\nI look forward to use them on the next Weekend Party!','Diane',NULL),(789,690,1,'Love the shirt and print - but a bit too pricey','I\'m a heavy spender of t-shirts and love the quality and prints offered, but the combinded price handling, shipping and item price is very high compared to desigener t-shirts','Dynamo',NULL),(791,692,NULL,'The best!','Wow!  Amazing shoes if I ever saw ones:  great for those cold, dreary winter months, keep your feet warm and dry!','Jane Austin',NULL),(792,693,1,'Cool application','This looks very nice I\'ll have to check out the back end','Nick',NULL),(794,695,1,'Look good but wow are they expensive for what they are!','These sandalls look good, very photogenenic, but would anybody seriously pay this price for them?','Pete',NULL),(799,700,1,'A typical Sony product','Review goes here...','chucker',1),(802,703,2,'i love this product','i love this product','german',NULL),(807,708,1,'A little expensive for what you get','To be honest, the quality of the pictures it takes is excellent. But there are other cameras out there that do just a good a job for $100 less.','JohnnyBoy',NULL),(809,710,1,'Not Bad','perhaps i should have bought six instead of sixty six','Burt',NULL),(817,718,1,'Sucks ','Sucks','Sucks',NULL),(819,720,1,'great','great phone\r\nwith rich features','ashwani',1),(823,724,1,'It sucks','Its too small.','Dramatic Goefer',NULL),(827,728,1,'They match my poodle\'s collar!','Now Sweetums and I are a perfect match!','Toodles',NULL),(831,732,1,'I got \'em','I got suspenders with mine','Mr Green Jeans',NULL),(835,736,3,'test','that\'s a very good product','swisswine',NULL),(849,750,1,'Amazing','Holy-Moly.','Crazy Pants',NULL),(861,762,NULL,'her the summary','that\'s my best review ;-)','lagad',1),(864,765,1,'nice','this is nice','mikey',NULL),(867,768,1,'Apple has done it again!','The MacBook Pro is Apple\'s latest notebook and their first with Intel\'s new attempt at notebook dominance, the Core Duo.  It represents the near peak of current notebook technology in terms of power, making only a few compromises for the sake of a slim profile and a better battery life.  I am a college student who has been lusting over notebooks for the past two years, but with so many choices and every promising notebook seemingly always lacking in an essential area I was paralyzed by indecision (and a lack of funds).  I will be attending Law School next fall and the time has finally come when owning a notebook is no longer an option. Luckily, notebook technology is better than ever, and I finally had some notebooks to choose from that represent nearly everything I have wanted since I first got the idea in my head that I needed one. I have simple needs: gaming capable graphics card, near desktop power, low weight, bright screen, decent battery life, and sweet looks (you know, the basics).\r\n\r\nOnce I saw the Core Duo I knew the day had arrived and that any laptop I bought was going to have it.  I have to have a laptop before August so that took out waiting for the 64bit Core Duo sequel that is coming out sometime later this year or early next year (Merom).\r\n\r\nThe notebooks I considered getting were the W3J, the Acer 8204, and the new MacBook Pro from Apple, all top of the line machines which had the Radeon X1600 and the new Core Duo.  The Apple wasn\'t really an option because the Law School I am attending requires a Windows machine.  The Acer just had too many complaints of a poor screen and other problems, although I know people who are enjoying the machine just fine.  I actually ordered the W3J last week but was dismayed to discover that my preorder wasn\'t made quite soon enough and I was going to have to wait even longer if I wanted that option.  My preorder was cancelled about 4 days after the announcement of Boot Camp, which was not just a hack, but the promise of an (in the future) officially supported dual boot program.  I\'m no fool, and I wasn\'t going to spit the notebook gods in the face.  I had been given a sign, and 24 hours later I picked up my (educationally discounted at $2,299) brand new MacBook Pro.  This is my first Apple ever, but with the safety net of Boot Camp, I figured the time to dive in was now.','Stephen Lee',NULL),(870,771,1,'Word ottoman ever','I know because I am king of the Ottoman Empire','Xerses',1),(873,774,1,'This is a great camera','This camera rocks,  Solid. beautiful pictures ','bob',NULL),(874,775,1,'can\'t do without','i can\'t take photos without this tripod now that i have one. great product!! ','gibbo',NULL),(875,776,1,'Meh','Not great, not awful.','Nick Name',NULL),(876,777,2,'Ist in Ordnung','ganz nette Funktionen','Müller',NULL),(878,779,1,'great website','great website','smerphy',1),(882,783,1,'Good choice','I think this is the best laptop i\'ve ever tried','Ata',NULL),(885,786,2,'Pretty darn good','this is an amazing product with great features and superbly priced - i like it a lot!!','Danners',NULL),(887,788,1,'Fantasticly Expensive','Great product, bit rip off','Joe Gimp',NULL),(888,789,NULL,'Loved It','Awesome Phone!','Phonelover',1),(889,790,1,'Awful Product','I have had nothing but problems with this product. When I received the computer the box was broken. I didn\'t think anything of it but when powered on the computer had a loud whirling sound. A few hours later it refused to turn on. It appears the cheap internal fan broke. I got a new one 2 weeks later. This time the optical drive broke 3 weeks later. I was beginning to become frustrated. After calling customer service they refused to give me a full refund because it had been over 60 days since I first bought it. I hesitantly accepted a third replacement. This one works but the shift button broke already and power cord no longer fits into the computer snugly. I ended up selling it to my cousin and buying a Mac.','SupaStar',NULL),(891,792,1,'good','oh yeah, so so cheesy','gib',NULL),(894,795,1,'perfect and cool','nice shoes, i recommend to y\'all.\r\n\r\n','turgen',NULL),(896,797,1,'el mejor prodducto por el mejor precio','el mejor prodducto por el mejor precio','will',NULL);

--
-- Table structure for table `review_entity`
--

CREATE TABLE `review_entity` (
  `entity_id` smallint(5) unsigned NOT NULL auto_increment,
  `entity_code` varchar(32) NOT NULL default '',
  PRIMARY KEY  (`entity_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='Review entities';

--
-- Dumping data for table `review_entity`
--

INSERT INTO `review_entity` VALUES (1,'product'),(2,'customer'),(3,'category');

--
-- Table structure for table `review_entity_summary`
--

CREATE TABLE `review_entity_summary` (
  `primary_id` bigint(20) NOT NULL auto_increment,
  `entity_pk_value` bigint(20) NOT NULL default '0',
  `entity_type` tinyint(4) NOT NULL default '0',
  `reviews_count` smallint(6) NOT NULL default '0',
  `rating_summary` tinyint(4) NOT NULL default '0',
  `store_id` smallint(5) unsigned NOT NULL default '0',
  PRIMARY KEY  (`primary_id`),
  KEY `FK_REVIEW_ENTITY_SUMMARY_STORE` (`store_id`),
  CONSTRAINT `FK_REVIEW_ENTITY_SUMMARY_STORE` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=147 DEFAULT CHARSET=utf8;

--
-- Dumping data for table `review_entity_summary`
--

INSERT INTO `review_entity_summary` VALUES (1,35,1,5,87,0),(2,35,1,5,75,1),(3,35,1,0,0,2),(4,35,1,0,0,3),(5,19,1,3,87,0),(6,19,1,3,71,1),(7,19,1,0,0,2),(8,19,1,0,0,3),(9,36,1,2,67,1),(10,36,1,0,0,2),(11,36,1,0,0,3),(12,20,1,5,87,0),(13,20,1,5,71,1),(14,20,1,0,0,2),(15,20,1,0,0,3),(16,30,1,1,60,1),(17,30,1,0,0,2),(18,30,1,0,0,3),(19,18,1,5,53,0),(20,18,1,3,62,1),(21,18,1,1,53,2),(22,18,1,0,0,3),(23,17,1,1,73,1),(24,17,1,0,0,2),(25,17,1,0,0,3),(26,16,1,3,40,0),(27,16,1,3,51,1),(28,16,1,0,0,2),(29,16,1,0,0,3),(30,25,1,3,80,0),(31,25,1,3,87,1),(32,25,1,0,0,2),(33,25,1,0,0,3),(34,26,1,6,56,0),(35,26,1,6,64,1),(36,26,1,0,0,2),(37,26,1,0,0,3),(38,27,1,12,84,0),(39,27,1,10,73,1),(40,27,1,1,100,2),(41,27,1,1,87,3),(42,28,1,2,60,0),(43,28,1,2,70,1),(44,28,1,0,0,2),(45,28,1,0,0,3),(46,37,1,3,60,1),(47,37,1,0,0,2),(48,37,1,0,0,3),(49,38,1,1,67,1),(50,38,1,0,0,2),(51,38,1,0,0,3),(52,29,1,2,60,1),(53,29,1,0,0,2),(54,29,1,0,0,3),(55,31,1,2,67,1),(56,31,1,0,0,2),(57,31,1,0,0,3),(58,32,1,5,100,0),(59,32,1,4,85,1),(60,32,1,0,0,2),(61,32,1,0,0,3),(62,33,1,3,62,1),(63,33,1,0,0,2),(64,33,1,0,0,3),(65,34,1,2,63,1),(66,34,1,0,0,2),(67,34,1,0,0,3),(68,39,1,2,73,1),(69,39,1,0,0,2),(70,39,1,0,0,3),(71,41,1,3,64,1),(72,41,1,0,0,2),(73,41,1,0,0,3),(74,42,1,2,80,1),(75,42,1,0,0,2),(76,42,1,0,0,3),(77,44,1,4,70,0),(78,44,1,4,77,1),(79,44,1,0,0,2),(80,44,1,0,0,3),(81,49,1,2,80,1),(82,49,1,0,0,2),(83,49,1,0,0,3),(84,51,1,4,47,0),(85,51,1,4,69,1),(86,51,1,0,0,2),(87,51,1,0,0,3),(88,48,1,1,60,1),(89,48,1,0,0,2),(90,48,1,0,0,3),(91,47,1,1,93,1),(92,47,1,0,0,2),(93,47,1,0,0,3),(94,46,1,1,80,1),(95,46,1,0,0,2),(96,46,1,0,0,3),(97,53,1,1,73,1),(98,53,1,0,0,2),(99,53,1,0,0,3),(100,119,1,2,80,1),(101,119,1,0,0,2),(102,119,1,0,0,3),(103,120,1,1,80,1),(104,120,1,0,0,2),(105,120,1,0,0,3),(106,126,1,2,40,0),(107,126,1,2,70,1),(108,126,1,0,0,2),(109,126,1,0,0,3),(110,83,1,3,53,0),(111,83,1,3,62,1),(112,83,1,0,0,2),(113,83,1,0,0,3),(114,112,1,2,80,0),(115,112,1,2,73,1),(116,112,1,0,0,2),(117,112,1,0,0,3),(118,98,1,2,67,1),(119,98,1,0,0,2),(120,98,1,0,0,3),(121,103,1,3,53,0),(122,103,1,3,62,1),(123,103,1,0,0,2),(124,103,1,0,0,3),(125,111,1,1,80,1),(126,111,1,0,0,2),(127,111,1,0,0,3),(128,54,1,1,87,1),(129,54,1,0,0,2),(130,54,1,0,0,3),(131,135,1,5,67,0),(132,135,1,4,63,1),(133,135,1,0,0,2),(134,135,1,0,0,3),(135,52,1,1,100,0),(136,52,1,1,100,1),(137,52,1,0,0,2),(138,52,1,0,0,3),(139,132,1,2,77,0),(140,132,1,1,73,1),(141,132,1,1,80,2),(142,132,1,0,0,3),(143,45,1,1,67,0),(144,45,1,1,67,1),(145,45,1,0,0,2),(146,45,1,0,0,3);

--
-- Table structure for table `review_status`
--

CREATE TABLE `review_status` (
  `status_id` tinyint(3) unsigned NOT NULL auto_increment,
  `status_code` varchar(32) NOT NULL default '',
  PRIMARY KEY  (`status_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='Review statuses';

--
-- Dumping data for table `review_status`
--

INSERT INTO `review_status` VALUES (1,'Approved'),(2,'Pending'),(3,'Not Approved');

--
-- Table structure for table `review_store`
--

CREATE TABLE `review_store` (
  `review_id` bigint(20) unsigned NOT NULL default '0',
  `store_id` smallint(5) unsigned NOT NULL default '0',
  PRIMARY KEY  (`review_id`,`store_id`),
  KEY `FK_REVIEW_STORE_STORE` (`store_id`),
  CONSTRAINT `FK_REVIEW_STORE_REVIEW` FOREIGN KEY (`review_id`) REFERENCES `review` (`review_id`) ON DELETE CASCADE,
  CONSTRAINT `FK_REVIEW_STORE_STORE` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `review_store`
--

INSERT INTO `review_store` VALUES (671,0),(675,0),(679,0),(681,0),(684,0),(690,0),(692,0),(693,0),(695,0),(700,0),(703,0),(708,0),(710,0),(718,0),(720,0),(724,0),(728,0),(732,0),(736,0),(750,0),(762,0),(765,0),(768,0),(771,0),(774,0),(775,0),(776,0),(777,0),(779,0),(783,0),(786,0),(788,0),(789,0),(790,0),(792,0),(795,0),(797,0),(8,1),(10,1),(13,1),(14,1),(15,1),(17,1),(21,1),(22,1),(23,1),(24,1),(25,1),(26,1),(27,1),(28,1),(29,1),(41,1),(43,1),(44,1),(45,1),(46,1),(47,1),(48,1),(49,1),(50,1),(51,1),(52,1),(53,1),(54,1),(55,1),(56,1),(57,1),(59,1),(60,1),(61,1),(62,1),(63,1),(64,1),(65,1),(70,1),(71,1),(74,1),(75,1),(76,1),(77,1),(78,1),(79,1),(80,1),(81,1),(82,1),(83,1),(84,1),(85,1),(86,1),(87,1),(88,1),(89,1),(91,1),(92,1),(93,1),(94,1),(95,1),(96,1),(97,1),(98,1),(99,1),(100,1),(101,1),(102,1),(103,1),(104,1),(105,1),(107,1),(113,1),(116,1),(118,1),(121,1),(671,1),(675,1),(679,1),(681,1),(684,1),(690,1),(693,1),(695,1),(700,1),(708,1),(710,1),(718,1),(720,1),(724,1),(728,1),(732,1),(750,1),(765,1),(768,1),(771,1),(774,1),(775,1),(776,1),(779,1),(783,1),(788,1),(790,1),(792,1),(795,1),(797,1),(703,2),(777,2),(786,2),(736,3);

--
-- Table structure for table `sales_flat_order_item`
--

CREATE TABLE `sales_flat_order_item` (
  `item_id` int(10) unsigned NOT NULL auto_increment,
  `order_id` int(10) unsigned NOT NULL default '0',
  `parent_item_id` int(10) unsigned default NULL,
  `quote_item_id` int(10) unsigned default NULL,
  `created_at` datetime NOT NULL default '0000-00-00 00:00:00',
  `updated_at` datetime NOT NULL default '0000-00-00 00:00:00',
  `product_id` int(10) unsigned default NULL,
  `product_type` varchar(255) default NULL,
  `product_options` text,
  `weight` decimal(12,4) default '0.0000',
  `is_virtual` tinyint(1) unsigned default NULL,
  `sku` varchar(255) NOT NULL default '',
  `name` varchar(255) default NULL,
  `description` text,
  `applied_rule_ids` text,
  `additional_data` text,
  `free_shipping` tinyint(1) unsigned NOT NULL default '0',
  `is_qty_decimal` tinyint(1) unsigned default NULL,
  `no_discount` tinyint(1) unsigned default '0',
  `qty_backordered` decimal(12,4) default '0.0000',
  `qty_canceled` decimal(12,4) default '0.0000',
  `qty_invoiced` decimal(12,4) default '0.0000',
  `qty_ordered` decimal(12,4) default '0.0000',
  `qty_refunded` decimal(12,4) default '0.0000',
  `qty_shipped` decimal(12,4) default '0.0000',
  `cost` decimal(12,4) default '0.0000',
  `price` decimal(12,4) NOT NULL default '0.0000',
  `base_price` decimal(12,4) NOT NULL default '0.0000',
  `original_price` decimal(12,4) default NULL,
  `base_original_price` decimal(12,4) default NULL,
  `tax_percent` decimal(12,4) default '0.0000',
  `tax_amount` decimal(12,4) default '0.0000',
  `base_tax_amount` decimal(12,4) default '0.0000',
  `tax_invoiced` decimal(12,4) default '0.0000',
  `base_tax_invoiced` decimal(12,4) default '0.0000',
  `discount_percent` decimal(12,4) default '0.0000',
  `discount_amount` decimal(12,4) default '0.0000',
  `base_discount_amount` decimal(12,4) default '0.0000',
  `discount_invoiced` decimal(12,4) default '0.0000',
  `base_discount_invoiced` decimal(12,4) default '0.0000',
  `amount_refunded` decimal(12,4) default '0.0000',
  `base_amount_refunded` decimal(12,4) default '0.0000',
  `row_total` decimal(12,4) NOT NULL default '0.0000',
  `base_row_total` decimal(12,4) NOT NULL default '0.0000',
  `row_invoiced` decimal(12,4) NOT NULL default '0.0000',
  `base_row_invoiced` decimal(12,4) NOT NULL default '0.0000',
  `row_weight` decimal(12,4) default '0.0000',
  `gift_message_id` int(10) default NULL,
  `gift_message_available` int(10) default NULL,
  `base_tax_before_discount` varchar(255) default NULL,
  `tax_before_discount` varchar(255) default NULL,
  PRIMARY KEY  (`item_id`),
  KEY `IDX_ORDER` (`order_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `sales_flat_quote`
--

CREATE TABLE `sales_flat_quote` (
  `entity_id` int(10) unsigned NOT NULL auto_increment,
  `store_id` smallint(5) unsigned NOT NULL default '0',
  `created_at` datetime NOT NULL default '0000-00-00 00:00:00',
  `updated_at` datetime NOT NULL default '0000-00-00 00:00:00',
  `converted_at` datetime NOT NULL default '0000-00-00 00:00:00',
  `is_active` tinyint(1) unsigned default '1',
  `is_virtual` tinyint(1) unsigned default '0',
  `is_multi_shipping` tinyint(1) unsigned default '0',
  `items_count` int(10) unsigned default '0',
  `items_qty` decimal(12,4) default '0.0000',
  `orig_order_id` int(10) unsigned default '0',
  `store_to_base_rate` decimal(12,4) default '0.0000',
  `store_to_quote_rate` decimal(12,4) default '0.0000',
  `base_currency_code` varchar(255) default NULL,
  `store_currency_code` varchar(255) default NULL,
  `quote_currency_code` varchar(255) default NULL,
  `grand_total` decimal(12,4) default '0.0000',
  `base_grand_total` decimal(12,4) default '0.0000',
  `checkout_method` varchar(255) default NULL,
  `customer_id` int(10) unsigned default '0',
  `customer_tax_class_id` int(10) unsigned default '0',
  `customer_group_id` int(10) unsigned default '0',
  `customer_email` varchar(255) default NULL,
  `customer_prefix` varchar(40) default NULL,
  `customer_firstname` varchar(255) default NULL,
  `customer_middlename` varchar(40) default NULL,
  `customer_lastname` varchar(255) default NULL,
  `customer_suffix` varchar(40) default NULL,
  `customer_dob` datetime default NULL,
  `customer_note` varchar(255) default NULL,
  `customer_note_notify` tinyint(1) unsigned default '1',
  `customer_is_guest` tinyint(1) unsigned default '0',
  `customer_taxvat` varchar(255) default NULL,
  `remote_ip` varchar(32) default NULL,
  `applied_rule_ids` varchar(255) default NULL,
  `reserved_order_id` varchar(64) default '',
  `password_hash` varchar(255) default NULL,
  `coupon_code` varchar(255) default NULL,
  `subtotal` varchar(255) default NULL,
  `base_subtotal` varchar(255) default NULL,
  `subtotal_with_discount` varchar(255) default NULL,
  `base_subtotal_with_discount` varchar(255) default NULL,
  `gift_message_id` varchar(255) default NULL,
  PRIMARY KEY  (`entity_id`),
  KEY `FK_SALES_QUOTE_STORE` (`store_id`),
  KEY `IDX_CUSTOMER` (`customer_id`,`store_id`,`is_active`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `sales_flat_quote_address`
--

CREATE TABLE `sales_flat_quote_address` (
  `address_id` int(10) unsigned NOT NULL auto_increment,
  `quote_id` int(10) unsigned NOT NULL default '0',
  `created_at` datetime NOT NULL default '0000-00-00 00:00:00',
  `updated_at` datetime NOT NULL default '0000-00-00 00:00:00',
  `customer_id` int(10) unsigned default NULL,
  `save_in_address_book` tinyint(1) default '0',
  `customer_address_id` int(10) unsigned default NULL,
  `address_type` varchar(255) default NULL,
  `email` varchar(255) default NULL,
  `prefix` varchar(40) default NULL,
  `firstname` varchar(255) default NULL,
  `middlename` varchar(40) default NULL,
  `lastname` varchar(255) default NULL,
  `suffix` varchar(40) default NULL,
  `company` varchar(255) default NULL,
  `street` varchar(255) default NULL,
  `city` varchar(255) default NULL,
  `region` varchar(255) default NULL,
  `region_id` int(10) unsigned default NULL,
  `postcode` varchar(255) default NULL,
  `country_id` varchar(255) default NULL,
  `telephone` varchar(255) default NULL,
  `fax` varchar(255) default NULL,
  `same_as_billing` tinyint(1) unsigned NOT NULL default '0',
  `free_shipping` tinyint(1) unsigned NOT NULL default '0',
  `collect_shipping_rates` tinyint(1) unsigned NOT NULL default '0',
  `shipping_method` varchar(255) NOT NULL default '',
  `shipping_description` varchar(255) NOT NULL default '',
  `weight` decimal(12,4) NOT NULL default '0.0000',
  `subtotal` decimal(12,4) NOT NULL default '0.0000',
  `base_subtotal` decimal(12,4) NOT NULL default '0.0000',
  `subtotal_with_discount` decimal(12,4) NOT NULL default '0.0000',
  `base_subtotal_with_discount` decimal(12,4) NOT NULL default '0.0000',
  `tax_amount` decimal(12,4) NOT NULL default '0.0000',
  `base_tax_amount` decimal(12,4) NOT NULL default '0.0000',
  `shipping_amount` decimal(12,4) NOT NULL default '0.0000',
  `base_shipping_amount` decimal(12,4) NOT NULL default '0.0000',
  `shipping_tax_amount` decimal(12,4) default NULL,
  `base_shipping_tax_amount` decimal(12,4) default NULL,
  `discount_amount` decimal(12,4) NOT NULL default '0.0000',
  `base_discount_amount` decimal(12,4) NOT NULL default '0.0000',
  `grand_total` decimal(12,4) NOT NULL default '0.0000',
  `base_grand_total` decimal(12,4) NOT NULL default '0.0000',
  `customer_notes` text,
  `applied_taxes` text,
  `gift_message_id` varchar(255) default NULL,
  PRIMARY KEY  (`address_id`),
  KEY `FK_SALES_QUOTE_ADDRESS_SALES_QUOTE` (`quote_id`),
  CONSTRAINT `FK_SALES_QUOTE_ADDRESS_SALES_QUOTE` FOREIGN KEY (`quote_id`) REFERENCES `sales_flat_quote` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `sales_flat_quote_address_item`
--

CREATE TABLE `sales_flat_quote_address_item` (
  `address_item_id` int(10) unsigned NOT NULL auto_increment,
  `parent_item_id` int(10) unsigned default NULL,
  `quote_address_id` int(10) unsigned NOT NULL default '0',
  `quote_item_id` int(10) unsigned NOT NULL default '0',
  `created_at` datetime NOT NULL default '0000-00-00 00:00:00',
  `updated_at` datetime NOT NULL default '0000-00-00 00:00:00',
  `applied_rule_ids` text,
  `additional_data` text,
  `weight` decimal(12,4) default '0.0000',
  `qty` decimal(12,4) NOT NULL default '0.0000',
  `discount_amount` decimal(12,4) default '0.0000',
  `tax_amount` decimal(12,4) default '0.0000',
  `row_total` decimal(12,4) NOT NULL default '0.0000',
  `base_row_total` decimal(12,4) NOT NULL default '0.0000',
  `row_total_with_discount` decimal(12,4) default '0.0000',
  `base_discount_amount` decimal(12,4) default '0.0000',
  `base_tax_amount` decimal(12,4) default '0.0000',
  `row_weight` decimal(12,4) default '0.0000',
  `gift_message_id` varchar(255) default NULL,
  PRIMARY KEY  (`address_item_id`),
  KEY `FK_QUOTE_ADDRESS_ITEM_QUOTE_ADDRESS` (`quote_address_id`),
  KEY `FK_SALES_QUOTE_ADDRESS_ITEM_QUOTE_ITEM` (`quote_item_id`),
  KEY `FK_SALES_FLAT_QUOTE_ADDRESS_ITEM_PARENT` (`parent_item_id`),
  CONSTRAINT `FK_QUOTE_ADDRESS_ITEM_QUOTE_ADDRESS` FOREIGN KEY (`quote_address_id`) REFERENCES `sales_flat_quote_address` (`address_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_SALES_FLAT_QUOTE_ADDRESS_ITEM_PARENT` FOREIGN KEY (`parent_item_id`) REFERENCES `sales_flat_quote_address_item` (`address_item_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_SALES_QUOTE_ADDRESS_ITEM_QUOTE_ITEM` FOREIGN KEY (`quote_item_id`) REFERENCES `sales_flat_quote_item` (`item_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `sales_flat_quote_item`
--

CREATE TABLE `sales_flat_quote_item` (
  `item_id` int(10) unsigned NOT NULL auto_increment,
  `quote_id` int(10) unsigned NOT NULL default '0',
  `created_at` datetime NOT NULL default '0000-00-00 00:00:00',
  `updated_at` datetime NOT NULL default '0000-00-00 00:00:00',
  `product_id` int(10) unsigned default NULL,
  `parent_item_id` int(10) unsigned default NULL,
  `is_virtual` tinyint(1) unsigned default NULL,
  `sku` varchar(255) NOT NULL default '',
  `name` varchar(255) default NULL,
  `description` text,
  `applied_rule_ids` text,
  `additional_data` text,
  `free_shipping` tinyint(1) unsigned NOT NULL default '0',
  `is_qty_decimal` tinyint(1) unsigned default NULL,
  `no_discount` tinyint(1) unsigned default '0',
  `weight` decimal(12,4) default '0.0000',
  `qty` decimal(12,4) NOT NULL default '0.0000',
  `price` decimal(12,4) NOT NULL default '0.0000',
  `base_price` decimal(12,4) NOT NULL default '0.0000',
  `custom_price` decimal(12,4) default NULL,
  `discount_percent` decimal(12,4) default '0.0000',
  `discount_amount` decimal(12,4) default '0.0000',
  `base_discount_amount` decimal(12,4) default '0.0000',
  `tax_percent` decimal(12,4) default '0.0000',
  `tax_amount` decimal(12,4) default '0.0000',
  `base_tax_amount` decimal(12,4) default '0.0000',
  `row_total` decimal(12,4) NOT NULL default '0.0000',
  `base_row_total` decimal(12,4) NOT NULL default '0.0000',
  `row_total_with_discount` decimal(12,4) default '0.0000',
  `row_weight` decimal(12,4) default '0.0000',
  `product_type` varchar(255) default NULL,
  `base_tax_before_discount` varchar(255) default NULL,
  `tax_before_discount` varchar(255) default NULL,
  `original_custom_price` varchar(255) default NULL,
  `gift_message_id` varchar(255) default NULL,
  PRIMARY KEY  (`item_id`),
  KEY `FK_SALES_QUOTE_ITEM_SALES_QUOTE` (`quote_id`),
  KEY `FK_SALES_FLAT_QUOTE_ITEM_PARENT_ITEM` (`parent_item_id`),
  KEY `FK_SALES_QUOTE_ITEM_CATALOG_PRODUCT_ENTITY` (`product_id`),
  CONSTRAINT `FK_SALES_FLAT_QUOTE_ITEM_PARENT_ITEM` FOREIGN KEY (`parent_item_id`) REFERENCES `sales_flat_quote_item` (`item_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_SALES_QUOTE_ITEM_CATALOG_PRODUCT_ENTITY` FOREIGN KEY (`product_id`) REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_SALES_QUOTE_ITEM_SALES_QUOTE` FOREIGN KEY (`quote_id`) REFERENCES `sales_flat_quote` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `sales_flat_quote_item_option`
--

CREATE TABLE `sales_flat_quote_item_option` (
  `option_id` int(10) unsigned NOT NULL auto_increment,
  `item_id` int(10) unsigned NOT NULL,
  `product_id` int(10) unsigned NOT NULL,
  `code` varchar(255) NOT NULL,
  `value` text NOT NULL,
  PRIMARY KEY  (`option_id`),
  KEY `FK_SALES_QUOTE_ITEM_OPTION_ITEM_ID` (`item_id`),
  CONSTRAINT `FK_SALES_QUOTE_ITEM_OPTION_ITEM_ID` FOREIGN KEY (`item_id`) REFERENCES `sales_flat_quote_item` (`item_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Additional options for quote item';

--
-- Table structure for table `sales_flat_quote_payment`
--

CREATE TABLE `sales_flat_quote_payment` (
  `payment_id` int(10) unsigned NOT NULL auto_increment,
  `quote_id` int(10) unsigned NOT NULL default '0',
  `created_at` datetime NOT NULL default '0000-00-00 00:00:00',
  `updated_at` datetime NOT NULL default '0000-00-00 00:00:00',
  `method` varchar(255) default '',
  `cc_type` varchar(255) default '',
  `cc_number_enc` varchar(255) default '',
  `cc_last4` varchar(255) default '',
  `cc_cid_enc` varchar(255) default '',
  `cc_owner` varchar(255) default '',
  `cc_exp_month` tinyint(2) unsigned default '0',
  `cc_exp_year` smallint(4) unsigned default '0',
  `cc_ss_owner` varchar(255) default '',
  `cc_ss_start_month` tinyint(2) unsigned default '0',
  `cc_ss_start_year` smallint(4) unsigned default '0',
  `cybersource_token` varchar(255) default '',
  `paypal_correlation_id` varchar(255) default '',
  `paypal_payer_id` varchar(255) default '',
  `paypal_payer_status` varchar(255) default '',
  `po_number` varchar(255) default '',
  `ideal_issuer_id` varchar(255) default NULL,
  `ideal_issuer_list` varchar(255) default NULL,
  PRIMARY KEY  (`payment_id`),
  KEY `FK_SALES_QUOTE_PAYMENT_SALES_QUOTE` (`quote_id`),
  CONSTRAINT `FK_SALES_QUOTE_PAYMENT_SALES_QUOTE` FOREIGN KEY (`quote_id`) REFERENCES `sales_flat_quote` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `sales_flat_quote_shipping_rate`
--

CREATE TABLE `sales_flat_quote_shipping_rate` (
  `rate_id` int(10) unsigned NOT NULL auto_increment,
  `address_id` int(10) unsigned NOT NULL default '0',
  `created_at` datetime NOT NULL default '0000-00-00 00:00:00',
  `updated_at` datetime NOT NULL default '0000-00-00 00:00:00',
  `carrier` varchar(255) default NULL,
  `carrier_title` varchar(255) default NULL,
  `code` varchar(255) default NULL,
  `method` varchar(255) default NULL,
  `method_description` text,
  `price` decimal(12,4) NOT NULL default '0.0000',
  PRIMARY KEY  (`rate_id`),
  KEY `FK_SALES_QUOTE_SHIPPING_RATE_ADDRESS` (`address_id`),
  CONSTRAINT `FK_SALES_QUOTE_SHIPPING_RATE_ADDRESS` FOREIGN KEY (`address_id`) REFERENCES `sales_flat_quote_address` (`address_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `sales_order`
--

CREATE TABLE `sales_order` (
  `entity_id` int(10) unsigned NOT NULL auto_increment,
  `entity_type_id` smallint(5) unsigned NOT NULL default '0',
  `attribute_set_id` smallint(5) unsigned NOT NULL default '0',
  `increment_id` varchar(50) NOT NULL default '',
  `parent_id` int(10) unsigned NOT NULL default '0',
  `store_id` smallint(5) unsigned default NULL,
  `created_at` datetime NOT NULL default '0000-00-00 00:00:00',
  `updated_at` datetime NOT NULL default '0000-00-00 00:00:00',
  `is_active` tinyint(1) unsigned NOT NULL default '1',
  `customer_id` int(11) default NULL,
  `tax_amount` decimal(12,4) NOT NULL default '0.0000',
  `shipping_amount` decimal(12,4) NOT NULL default '0.0000',
  `discount_amount` decimal(12,4) NOT NULL default '0.0000',
  `subtotal` decimal(12,4) NOT NULL default '0.0000',
  `grand_total` decimal(12,4) NOT NULL default '0.0000',
  `total_paid` decimal(12,4) NOT NULL default '0.0000',
  `total_refunded` decimal(12,4) NOT NULL default '0.0000',
  `total_qty_ordered` decimal(12,4) NOT NULL default '0.0000',
  `total_canceled` decimal(12,4) NOT NULL default '0.0000',
  `total_invoiced` decimal(12,4) NOT NULL default '0.0000',
  `total_online_refunded` decimal(12,4) NOT NULL default '0.0000',
  `total_offline_refunded` decimal(12,4) NOT NULL default '0.0000',
  `base_tax_amount` decimal(12,4) NOT NULL default '0.0000',
  `base_shipping_amount` decimal(12,4) NOT NULL default '0.0000',
  `base_discount_amount` decimal(12,4) NOT NULL default '0.0000',
  `base_subtotal` decimal(12,4) NOT NULL default '0.0000',
  `base_grand_total` decimal(12,4) NOT NULL default '0.0000',
  `base_total_paid` decimal(12,4) NOT NULL default '0.0000',
  `base_total_refunded` decimal(12,4) NOT NULL default '0.0000',
  `base_total_qty_ordered` decimal(12,4) NOT NULL default '0.0000',
  `base_total_canceled` decimal(12,4) NOT NULL default '0.0000',
  `base_total_invoiced` decimal(12,4) NOT NULL default '0.0000',
  `base_total_online_refunded` decimal(12,4) NOT NULL default '0.0000',
  `base_total_offline_refunded` decimal(12,4) NOT NULL default '0.0000',
  `subtotal_refunded` decimal(12,4) default NULL,
  `subtotal_canceled` decimal(12,4) default NULL,
  `tax_refunded` decimal(12,4) default NULL,
  `tax_canceled` decimal(12,4) default NULL,
  `shipping_refunded` decimal(12,4) default NULL,
  `shipping_canceled` decimal(12,4) default NULL,
  `base_subtotal_refunded` decimal(12,4) default NULL,
  `base_subtotal_canceled` decimal(12,4) default NULL,
  `base_tax_refunded` decimal(12,4) default NULL,
  `base_tax_canceled` decimal(12,4) default NULL,
  `base_shipping_refunded` decimal(12,4) default NULL,
  `base_shipping_canceled` decimal(12,4) default NULL,
  `subtotal_invoiced` decimal(12,4) default NULL,
  `tax_invoiced` decimal(12,4) default NULL,
  `shipping_invoiced` decimal(12,4) default NULL,
  `base_subtotal_invoiced` decimal(12,4) default NULL,
  `base_tax_invoiced` decimal(12,4) default NULL,
  `base_shipping_invoiced` decimal(12,4) default NULL,
  `shipping_tax_amount` decimal(12,4) default NULL,
  `base_shipping_tax_amount` decimal(12,4) default NULL,
  PRIMARY KEY  (`entity_id`),
  KEY `FK_sales_order_type` (`entity_type_id`),
  KEY `FK_sales_order_store` (`store_id`),
  KEY `IDX_CUSTOMER` (`customer_id`),
  CONSTRAINT `FK_SALE_ORDER_STORE` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `FK_SALE_ORDER_TYPE` FOREIGN KEY (`entity_type_id`) REFERENCES `eav_entity_type` (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

--
-- Table structure for table `sales_order_datetime`
--

CREATE TABLE `sales_order_datetime` (
  `value_id` int(11) NOT NULL auto_increment,
  `entity_type_id` smallint(5) unsigned NOT NULL default '0',
  `attribute_id` smallint(5) unsigned NOT NULL default '0',
  `entity_id` int(10) unsigned NOT NULL default '0',
  `value` datetime NOT NULL default '0000-00-00 00:00:00',
  PRIMARY KEY  (`value_id`),
  KEY `FK_sales_order_datetime_entity_type` (`entity_type_id`),
  KEY `FK_sales_order_datetime_attribute` (`attribute_id`),
  KEY `FK_sales_order_datetime` (`entity_id`),
  CONSTRAINT `FK_sales_order_datetime` FOREIGN KEY (`entity_id`) REFERENCES `sales_order` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_sales_order_datetime_attribute` FOREIGN KEY (`attribute_id`) REFERENCES `eav_attribute` (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_sales_order_datetime_entity_type` FOREIGN KEY (`entity_type_id`) REFERENCES `eav_entity_type` (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `sales_order_decimal`
--

CREATE TABLE `sales_order_decimal` (
  `value_id` int(11) NOT NULL auto_increment,
  `entity_type_id` smallint(5) unsigned NOT NULL default '0',
  `attribute_id` smallint(5) unsigned NOT NULL default '0',
  `entity_id` int(10) unsigned NOT NULL default '0',
  `value` decimal(12,4) NOT NULL default '0.0000',
  PRIMARY KEY  (`value_id`),
  KEY `FK_sales_order_decimal_entity_type` (`entity_type_id`),
  KEY `FK_sales_order_decimal_attribute` (`attribute_id`),
  KEY `FK_sales_order_decimal` (`entity_id`),
  CONSTRAINT `FK_sales_order_decimal` FOREIGN KEY (`entity_id`) REFERENCES `sales_order` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_sales_order_decimal_attribute` FOREIGN KEY (`attribute_id`) REFERENCES `eav_attribute` (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_sales_order_decimal_entity_type` FOREIGN KEY (`entity_type_id`) REFERENCES `eav_entity_type` (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `sales_order_entity`
--

CREATE TABLE `sales_order_entity` (
  `entity_id` int(10) unsigned NOT NULL auto_increment,
  `entity_type_id` smallint(8) unsigned NOT NULL default '0',
  `attribute_set_id` smallint(5) unsigned NOT NULL default '0',
  `increment_id` varchar(50) NOT NULL default '',
  `parent_id` int(10) unsigned NOT NULL default '0',
  `store_id` smallint(5) unsigned default NULL,
  `created_at` datetime NOT NULL default '0000-00-00 00:00:00',
  `updated_at` datetime NOT NULL default '0000-00-00 00:00:00',
  `is_active` tinyint(1) unsigned NOT NULL default '1',
  PRIMARY KEY  (`entity_id`),
  KEY `FK_sales_order_entity_type` (`entity_type_id`),
  KEY `FK_sales_order_entity_store` (`store_id`),
  CONSTRAINT `FK_sales_order_entity_type` FOREIGN KEY (`entity_type_id`) REFERENCES `eav_entity_type` (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_SALE_ORDER_ENTITY_STORE` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

--
-- Table structure for table `sales_order_entity_datetime`
--

CREATE TABLE `sales_order_entity_datetime` (
  `value_id` int(11) NOT NULL auto_increment,
  `entity_type_id` smallint(8) unsigned NOT NULL default '0',
  `attribute_id` smallint(5) unsigned NOT NULL default '0',
  `entity_id` int(10) unsigned NOT NULL default '0',
  `value` datetime NOT NULL default '0000-00-00 00:00:00',
  PRIMARY KEY  (`value_id`),
  KEY `FK_sales_order_entity_datetime_entity_type` (`entity_type_id`),
  KEY `FK_sales_order_entity_datetime_attribute` (`attribute_id`),
  KEY `FK_sales_order_entity_datetime` (`entity_id`),
  CONSTRAINT `FK_sales_order_entity_datetime` FOREIGN KEY (`entity_id`) REFERENCES `sales_order_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_sales_order_entity_datetime_attribute` FOREIGN KEY (`attribute_id`) REFERENCES `eav_attribute` (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_sales_order_entity_datetime_entity_type` FOREIGN KEY (`entity_type_id`) REFERENCES `eav_entity_type` (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `sales_order_entity_decimal`
--

CREATE TABLE `sales_order_entity_decimal` (
  `value_id` int(11) NOT NULL auto_increment,
  `entity_type_id` smallint(8) unsigned NOT NULL default '0',
  `attribute_id` smallint(5) unsigned NOT NULL default '0',
  `entity_id` int(10) unsigned NOT NULL default '0',
  `value` decimal(12,4) NOT NULL default '0.0000',
  PRIMARY KEY  (`value_id`),
  KEY `FK_sales_order_entity_decimal_entity_type` (`entity_type_id`),
  KEY `FK_sales_order_entity_decimal_attribute` (`attribute_id`),
  KEY `FK_sales_order_entity_decimal` (`entity_id`),
  CONSTRAINT `FK_sales_order_entity_decimal` FOREIGN KEY (`entity_id`) REFERENCES `sales_order_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_sales_order_entity_decimal_attribute` FOREIGN KEY (`attribute_id`) REFERENCES `eav_attribute` (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_sales_order_entity_decimal_entity_type` FOREIGN KEY (`entity_type_id`) REFERENCES `eav_entity_type` (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `sales_order_entity_int`
--

CREATE TABLE `sales_order_entity_int` (
  `value_id` int(11) NOT NULL auto_increment,
  `entity_type_id` smallint(8) unsigned NOT NULL default '0',
  `attribute_id` smallint(5) unsigned NOT NULL default '0',
  `entity_id` int(10) unsigned NOT NULL default '0',
  `value` int(11) NOT NULL default '0',
  PRIMARY KEY  (`value_id`),
  KEY `FK_sales_order_entity_int_entity_type` (`entity_type_id`),
  KEY `FK_sales_order_entity_int_attribute` (`attribute_id`),
  KEY `FK_sales_order_entity_int` (`entity_id`),
  CONSTRAINT `FK_sales_order_entity_int` FOREIGN KEY (`entity_id`) REFERENCES `sales_order_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_sales_order_entity_int_attribute` FOREIGN KEY (`attribute_id`) REFERENCES `eav_attribute` (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_sales_order_entity_int_entity_type` FOREIGN KEY (`entity_type_id`) REFERENCES `eav_entity_type` (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `sales_order_entity_text`
--

CREATE TABLE `sales_order_entity_text` (
  `value_id` int(11) NOT NULL auto_increment,
  `entity_type_id` smallint(8) unsigned NOT NULL default '0',
  `attribute_id` smallint(5) unsigned NOT NULL default '0',
  `entity_id` int(10) unsigned NOT NULL default '0',
  `value` text NOT NULL,
  PRIMARY KEY  (`value_id`),
  KEY `FK_sales_order_entity_text_entity_type` (`entity_type_id`),
  KEY `FK_sales_order_entity_text_attribute` (`attribute_id`),
  KEY `FK_sales_order_entity_text` (`entity_id`),
  CONSTRAINT `FK_sales_order_entity_text` FOREIGN KEY (`entity_id`) REFERENCES `sales_order_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_sales_order_entity_text_attribute` FOREIGN KEY (`attribute_id`) REFERENCES `eav_attribute` (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_sales_order_entity_text_entity_type` FOREIGN KEY (`entity_type_id`) REFERENCES `eav_entity_type` (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `sales_order_entity_varchar`
--

CREATE TABLE `sales_order_entity_varchar` (
  `value_id` int(11) NOT NULL auto_increment,
  `entity_type_id` smallint(8) unsigned NOT NULL default '0',
  `attribute_id` smallint(5) unsigned NOT NULL default '0',
  `entity_id` int(10) unsigned NOT NULL default '0',
  `value` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`value_id`),
  KEY `FK_sales_order_entity_varchar_entity_type` (`entity_type_id`),
  KEY `FK_sales_order_entity_varchar_attribute` (`attribute_id`),
  KEY `FK_sales_order_entity_varchar` (`entity_id`),
  CONSTRAINT `FK_sales_order_entity_varchar` FOREIGN KEY (`entity_id`) REFERENCES `sales_order_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_sales_order_entity_varchar_attribute` FOREIGN KEY (`attribute_id`) REFERENCES `eav_attribute` (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_sales_order_entity_varchar_entity_type` FOREIGN KEY (`entity_type_id`) REFERENCES `eav_entity_type` (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `sales_order_int`
--

CREATE TABLE `sales_order_int` (
  `value_id` int(11) NOT NULL auto_increment,
  `entity_type_id` smallint(5) unsigned NOT NULL default '0',
  `attribute_id` smallint(5) unsigned NOT NULL default '0',
  `entity_id` int(10) unsigned NOT NULL default '0',
  `value` int(11) NOT NULL default '0',
  PRIMARY KEY  (`value_id`),
  KEY `FK_sales_order_int_entity_type` (`entity_type_id`),
  KEY `FK_sales_order_int_attribute` (`attribute_id`),
  KEY `FK_sales_order_int` (`entity_id`),
  CONSTRAINT `FK_sales_order_int` FOREIGN KEY (`entity_id`) REFERENCES `sales_order` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_sales_order_int_attribute` FOREIGN KEY (`attribute_id`) REFERENCES `eav_attribute` (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_sales_order_int_entity_type` FOREIGN KEY (`entity_type_id`) REFERENCES `eav_entity_type` (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `sales_order_tax`
--

CREATE TABLE `sales_order_tax` (
  `tax_id` int(10) unsigned NOT NULL auto_increment,
  `order_id` int(10) unsigned NOT NULL,
  `code` varchar(255) NOT NULL,
  `title` varchar(255) NOT NULL,
  `percent` decimal(12,4) NOT NULL,
  `amount` decimal(12,4) NOT NULL,
  `priority` int(11) NOT NULL,
  `position` int(11) NOT NULL,
  `base_amount` decimal(12,4) NOT NULL,
  `process` smallint(6) NOT NULL,
  `base_real_amount` decimal(12,4) NOT NULL,
  PRIMARY KEY  (`tax_id`),
  KEY `IDX_ORDER_TAX` (`order_id`,`priority`,`position`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `sales_order_text`
--

CREATE TABLE `sales_order_text` (
  `value_id` int(11) NOT NULL auto_increment,
  `entity_type_id` smallint(5) unsigned NOT NULL default '0',
  `attribute_id` smallint(5) unsigned NOT NULL default '0',
  `entity_id` int(10) unsigned NOT NULL default '0',
  `value` text NOT NULL,
  PRIMARY KEY  (`value_id`),
  KEY `FK_sales_order_text_entity_type` (`entity_type_id`),
  KEY `FK_sales_order_text_attribute` (`attribute_id`),
  KEY `FK_sales_order_text` (`entity_id`),
  CONSTRAINT `FK_sales_order_text` FOREIGN KEY (`entity_id`) REFERENCES `sales_order` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_sales_order_text_attribute` FOREIGN KEY (`attribute_id`) REFERENCES `eav_attribute` (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_sales_order_text_entity_type` FOREIGN KEY (`entity_type_id`) REFERENCES `eav_entity_type` (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `sales_order_varchar`
--

CREATE TABLE `sales_order_varchar` (
  `value_id` int(11) NOT NULL auto_increment,
  `entity_type_id` smallint(5) unsigned NOT NULL default '0',
  `attribute_id` smallint(5) unsigned NOT NULL default '0',
  `entity_id` int(10) unsigned NOT NULL default '0',
  `value` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`value_id`),
  KEY `FK_sales_order_varchar_entity_type` (`entity_type_id`),
  KEY `FK_sales_order_varchar_attribute` (`attribute_id`),
  KEY `FK_sales_order_varchar` (`entity_id`),
  CONSTRAINT `FK_sales_order_varchar` FOREIGN KEY (`entity_id`) REFERENCES `sales_order` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_sales_order_varchar_attribute` FOREIGN KEY (`attribute_id`) REFERENCES `eav_attribute` (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_sales_order_varchar_entity_type` FOREIGN KEY (`entity_type_id`) REFERENCES `eav_entity_type` (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `salesrule`
--

CREATE TABLE `salesrule` (
  `rule_id` int(10) unsigned NOT NULL auto_increment,
  `name` varchar(255) NOT NULL default '',
  `description` text NOT NULL,
  `from_date` date default '0000-00-00',
  `to_date` date default '0000-00-00',
  `coupon_code` varchar(255) default NULL,
  `uses_per_coupon` int(11) NOT NULL default '0',
  `uses_per_customer` int(11) NOT NULL default '0',
  `customer_group_ids` varchar(255) NOT NULL default '',
  `is_active` tinyint(1) NOT NULL default '0',
  `conditions_serialized` text NOT NULL,
  `actions_serialized` text NOT NULL,
  `stop_rules_processing` tinyint(1) NOT NULL default '1',
  `is_advanced` tinyint(3) unsigned NOT NULL default '1',
  `product_ids` text,
  `sort_order` int(10) unsigned NOT NULL default '0',
  `simple_action` varchar(32) NOT NULL default '',
  `discount_amount` decimal(12,4) NOT NULL default '0.0000',
  `discount_qty` decimal(12,4) unsigned default NULL,
  `discount_step` int(10) unsigned NOT NULL,
  `simple_free_shipping` tinyint(1) unsigned NOT NULL default '0',
  `times_used` int(11) unsigned NOT NULL default '0',
  `is_rss` tinyint(4) NOT NULL default '0',
  `website_ids` text,
  PRIMARY KEY  (`rule_id`),
  KEY `sort_order` (`is_active`,`sort_order`,`to_date`,`from_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `salesrule_customer`
--

CREATE TABLE `salesrule_customer` (
  `rule_customer_id` int(10) unsigned NOT NULL auto_increment,
  `rule_id` int(10) unsigned NOT NULL default '0',
  `customer_id` int(10) unsigned NOT NULL default '0',
  `times_used` smallint(11) unsigned NOT NULL default '0',
  PRIMARY KEY  (`rule_customer_id`),
  KEY `rule_id` (`rule_id`,`customer_id`),
  KEY `customer_id` (`customer_id`,`rule_id`),
  CONSTRAINT `FK_salesrule_customer_id` FOREIGN KEY (`customer_id`) REFERENCES `customer_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_salesrule_customer_rule` FOREIGN KEY (`rule_id`) REFERENCES `salesrule` (`rule_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `sendfriend_log`
--

CREATE TABLE `sendfriend_log` (
  `log_id` int(11) NOT NULL auto_increment,
  `ip` int(11) NOT NULL default '0',
  `time` int(11) NOT NULL default '0',
  PRIMARY KEY  (`log_id`),
  KEY `ip` (`ip`),
  KEY `time` (`time`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Send to friend function log storage table';

--
-- Table structure for table `shipping_tablerate`
--

CREATE TABLE `shipping_tablerate` (
  `pk` int(10) unsigned NOT NULL auto_increment,
  `website_id` int(11) NOT NULL default '0',
  `dest_country_id` varchar(4) NOT NULL default '0',
  `dest_region_id` int(10) NOT NULL default '0',
  `dest_zip` varchar(10) NOT NULL default '',
  `condition_name` varchar(20) NOT NULL default '',
  `condition_value` decimal(12,4) NOT NULL default '0.0000',
  `price` decimal(12,4) NOT NULL default '0.0000',
  `cost` decimal(12,4) NOT NULL default '0.0000',
  PRIMARY KEY  (`pk`),
  UNIQUE KEY `dest_country` (`website_id`,`dest_country_id`,`dest_region_id`,`dest_zip`,`condition_name`,`condition_value`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `sitemap`
--

CREATE TABLE `sitemap` (
  `sitemap_id` int(11) NOT NULL auto_increment,
  `sitemap_type` varchar(32) default NULL,
  `sitemap_filename` varchar(32) default NULL,
  `sitemap_path` tinytext,
  `sitemap_time` timestamp NULL default NULL,
  `store_id` smallint(5) unsigned NOT NULL,
  PRIMARY KEY  (`sitemap_id`),
  KEY `FK_SITEMAP_STORE` (`store_id`),
  CONSTRAINT `FK_SITEMAP_STORE` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `tag`
--

CREATE TABLE `tag` (
  `tag_id` int(11) unsigned NOT NULL auto_increment,
  `name` varchar(255) NOT NULL default '',
  `status` smallint(6) NOT NULL default '0',
  PRIMARY KEY  USING BTREE (`tag_id`)
) ENGINE=InnoDB AUTO_INCREMENT=348 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

--
-- Dumping data for table `tag`
--

INSERT INTO `tag` VALUES (1,'bed',1),(2,'trendy',1),(3,'wood',1),(4,'young',1),(5,'hip',1),(6,'Excellent',1),(7,'Furniture',1),(8,'modern',1),(9,'pocket',1),(10,'clean',1),(11,'apple',1),(12,'cool',1),(13,'universal',1),(14,'clogs',1),(15,'outdoor',1),(16,'green',1),(17,'bones',1),(18,'pda',1),(19,'slider',1),(20,'mobile',1),(22,'joe',1),(23,'laces',1),(24,'Camera',1),(25,'charger',1),(26,'Geil',1),(27,'crackberry',1),(28,'SEXY',1),(29,'tight',1),(30,'Test',1),(31,'red',1),(32,'sandals',1),(33,'design',1),(34,'ugly',1),(35,'rubber',1),(36,'light',1),(37,'monikas',1),(39,'t-shirt',1),(40,'test,',1),(44,'Sportsshoes',1),(45,'very',1),(46,'good',1),(47,'phone',1),(48,'favorite',1),(49,'shoe',1),(51,'shirt',1),(52,'monkeybutt',1),(53,'pizzamonkey',1),(57,'silver',1),(58,'black',1),(59,'sony',1),(60,'laptop',1),(61,'compact',1),(62,'small screen',1),(67,'tee-shirt',1),(71,'computer',1),(72,'shoes',1),(73,'sandale',1),(75,'tina',1),(76,'brown',1),(78,'lova',1),(79,'Tag',1),(81,'toes',-1),(82,'mniam',1),(84,'couch',1),(85,'chair',1),(87,'sandals,',1),(88,'blue,',1),(89,'shoes,',1),(90,'small',1),(91,'nice',1),(92,'badassness',1),(93,'cellotastic',1),(95,'macbook',1),(96,'mac',1),(97,'thongs',1),(98,'bla',1),(100,'notebook',1),(101,'phonex',1),(102,'süper',1),(103,'testing',1),(105,'awesome',1),(106,'holeys',1),(108,'Innovate',1),(109,'buenisimo',1),(110,'laptopik',1),(113,'rouge',1),(114,'modern,',1),(115,'moderne',1),(117,'blue',1),(120,'sandally',1),(122,'zoom',1),(123,'amazing',1),(125,'acer',1),(126,'portable',1),(127,'nippley',1),(128,'headless',1),(129,'prettyboy',1),(130,'grey',1),(131,'pouffe',1),(132,'teste',1),(133,'photography',1),(134,'handy',1),(135,'strange',1),(136,'skeleton',1),(137,'terry\'s',1),(138,'green,',1),(139,'sexy,',1),(142,'hi',1),(143,'Hohoho',1),(144,'Image',1),(145,'canape',1),(146,'chic',1),(147,'dresser',1),(148,'lens',1),(149,'schoen',1),(150,'golf',1),(151,'philip',1),(152,'coconut',1),(153,'mytag',1),(155,'mesas',1),(156,'hideous',1),(157,'mystuff',1),(160,'user',1),(161,'shittt',1),(162,'sex',1),(163,'sucks',1),(165,'whynot',1),(166,'camera-photo',1),(167,'wow',1),(168,'kzyhu',1),(170,'badminded',1),(172,'noerd',1),(173,'square',1),(175,'beach',1),(176,'Core Duo',1),(178,'spray',1),(179,'paint',1),(180,'tempos',1),(181,'teacher',1),(182,'ATT',1),(183,'BlackBerry',1),(186,'gadget',1),(187,'pas',1),(188,'mal',1),(191,'SMUKKE',1),(193,'kurti',1),(194,'larum',1),(195,'try',1),(198,'WAAAAAOOO',1),(200,'portatil',1),(201,'CRAPOTO',1),(202,'Kamera,',1),(203,'Camera,',1),(204,'Olympus',1),(205,'Nine',1),(206,'West',1),(207,'Women\'s',1),(208,'Lucero',1),(209,'Pump',1),(210,'Web',1),(211,'browser',1),(212,'content,',1),(213,'messaging',1),(214,'sessions,',1),(215,'and',-1),(216,'attachments.',1),(217,'Anashria',1),(218,'Womens',1),(219,'Premier',1),(220,'Leather',1),(221,'Sandal',1),(222,'arbeit',-1),(223,'crap',1),(224,'Walkman',1),(225,'gift',1),(226,'for',-1),(227,'her',1),(228,'Hupe',1),(230,'sleek',-1),(231,'samsung',1),(232,'footrest',1),(233,'shit',1),(234,'jogging',1),(235,'cool t-shirt',1),(237,'must get',1),(238,'bright',1),(240,'cellphone',1),(241,'comfort',1),(243,'ferrari',1),(251,'shiny',1),(253,'toll',1),(254,'warm',1),(256,'SOFA',1),(257,'fast',1),(258,'emo',1),(262,'smart',1),(319,'Canon',1),(347,'appletoys',1);

--
-- Table structure for table `tag_relation`
--

CREATE TABLE `tag_relation` (
  `tag_relation_id` int(11) unsigned NOT NULL auto_increment,
  `tag_id` int(11) unsigned NOT NULL default '0',
  `customer_id` int(10) unsigned NOT NULL default '0',
  `product_id` int(11) unsigned NOT NULL default '0',
  `store_id` smallint(6) unsigned NOT NULL default '1',
  `active` tinyint(1) unsigned NOT NULL default '1',
  `created_at` datetime default NULL,
  PRIMARY KEY  USING BTREE (`tag_relation_id`),
  KEY `FK_TAG_RELATION_TAG` (`tag_id`),
  KEY `FK_TAG_RELATION_CUSTOMER` (`customer_id`),
  KEY `FK_TAG_RELATION_PRODUCT` (`product_id`),
  KEY `FK_TAG_RELATION_STORE` (`store_id`),
  CONSTRAINT `tag_relation_ibfk_4` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_TAG_RELATION_PRODUCT` FOREIGN KEY (`product_id`) REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `tag_relation_ibfk_1` FOREIGN KEY (`tag_id`) REFERENCES `tag` (`tag_id`) ON DELETE CASCADE,
  CONSTRAINT `tag_relation_ibfk_2` FOREIGN KEY (`customer_id`) REFERENCES `customer_entity` (`entity_id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=617 DEFAULT CHARSET=utf8;

--
-- Dumping data for table `tag_relation`
--

INSERT INTO `tag_relation` VALUES (1,1,1,42,1,1,'2007-08-31 05:29:32'),(2,2,1,42,1,1,'2007-08-31 05:29:32'),(3,3,1,42,1,1,'2007-08-31 05:29:32'),(4,4,1,120,1,1,'2007-08-31 05:29:48'),(5,5,1,120,1,1,'2007-08-31 05:29:48'),(6,4,1,119,1,1,'2007-08-31 05:29:59'),(7,5,1,119,1,1,'2007-08-31 05:29:59'),(8,6,1,30,1,1,'2007-08-31 05:30:14'),(9,7,1,51,1,1,'2007-08-31 05:30:30'),(10,8,1,51,1,1,'2007-08-31 05:30:30'),(11,9,1,46,1,1,'2007-08-31 05:30:50'),(12,10,1,46,1,1,'2007-08-31 05:30:50'),(13,2,1,46,1,1,'2007-08-31 05:30:50'),(14,11,1,25,1,1,'2007-08-31 05:31:29'),(15,12,1,25,1,1,'2007-08-31 05:31:29'),(16,13,1,134,1,1,'2007-08-31 05:31:56'),(17,14,1,83,1,1,'2007-08-31 05:32:51'),(18,15,1,132,1,1,'2007-08-31 05:33:41'),(19,16,1,119,1,1,'2007-08-31 05:41:08'),(20,17,1,119,1,1,'2007-08-31 05:41:21'),(21,18,1,19,1,1,'2007-08-31 05:52:35'),(22,19,1,20,1,1,'2007-08-31 05:53:49'),(23,12,1,20,1,1,'2007-08-31 05:53:49'),(24,20,1,26,1,1,'2007-08-31 05:55:32'),(26,20,1,18,1,1,'2007-08-31 05:56:51'),(27,20,1,17,1,1,'2007-08-31 05:57:03'),(28,12,1,17,1,1,'2007-08-31 05:57:13'),(29,11,1,25,1,1,'2007-08-31 06:36:37'),(30,22,1,53,1,1,'2007-08-31 08:35:38'),(31,23,1,93,1,1,'2007-08-31 08:49:08'),(32,13,1,134,2,1,'2007-08-31 09:34:10'),(33,24,1,134,2,1,'2007-08-31 09:34:10'),(34,25,1,134,2,1,'2007-08-31 09:34:10'),(35,26,1,119,2,1,'2007-08-31 09:42:57'),(36,27,1,17,1,1,'2007-08-31 10:31:44'),(37,28,1,119,1,1,'2007-08-31 11:38:34'),(38,29,1,119,1,1,'2007-08-31 12:49:37'),(39,30,1,27,1,1,'2007-08-31 14:45:29'),(40,31,1,52,1,1,'2007-08-31 16:10:03'),(41,31,1,53,1,1,'2007-08-31 18:20:17'),(42,32,1,135,1,1,'2007-08-31 23:12:13'),(43,33,1,18,1,1,'2007-09-01 00:32:23'),(44,34,1,135,1,1,'2007-09-01 03:51:29'),(45,35,1,135,1,1,'2007-09-01 03:51:29'),(46,14,1,135,1,1,'2007-09-01 03:51:29'),(47,36,1,135,1,1,'2007-09-01 05:32:10'),(48,37,1,27,1,1,'2007-09-01 12:50:14'),(50,30,1,134,1,1,'2007-09-03 02:06:31'),(51,39,1,119,1,1,'2007-09-03 04:28:30'),(52,40,1,98,1,1,'2007-09-03 04:31:18'),(56,44,1,93,1,1,'2007-09-04 07:19:57'),(57,45,1,45,1,1,'2007-09-04 08:28:36'),(58,46,1,45,1,1,'2007-09-04 08:28:36'),(59,47,1,18,1,1,'2007-09-04 11:05:12'),(60,48,1,45,1,1,'2007-09-04 13:49:19'),(61,11,1,25,1,1,'2007-09-04 16:06:17'),(62,49,1,32,1,1,'2007-09-04 23:12:57'),(64,2,1,25,1,1,'2007-09-05 11:01:30'),(65,51,1,35,1,1,'2007-09-05 13:21:44'),(66,52,1,42,1,1,'2007-09-05 16:24:59'),(67,53,1,42,1,1,'2007-09-05 16:25:14'),(71,11,1,27,1,1,'2007-09-09 03:25:18'),(72,57,1,27,1,1,'2007-09-10 00:23:01'),(73,58,1,27,1,1,'2007-09-10 00:23:01'),(74,59,1,27,1,1,'2007-09-10 00:23:01'),(75,60,1,27,1,1,'2007-09-10 00:23:01'),(76,61,1,27,1,1,'2007-09-10 00:23:01'),(77,36,1,27,1,1,'2007-09-10 00:23:01'),(78,62,1,27,1,1,'2007-09-10 00:23:01'),(83,67,1,35,1,1,'2007-09-27 09:59:54'),(84,30,1,20,1,1,'2007-09-27 14:57:37'),(88,12,1,120,1,1,'2007-10-02 10:55:26'),(89,71,1,25,1,1,'2007-10-10 12:34:43'),(90,31,1,32,1,1,'2007-10-11 14:08:30'),(91,72,1,32,1,1,'2007-10-11 14:08:30'),(92,73,1,135,1,1,'2007-10-12 03:06:35'),(94,75,1,126,1,1,'2007-10-19 01:45:12'),(95,30,1,27,2,1,'2007-10-21 12:35:17'),(96,76,1,135,1,1,'2007-10-21 18:45:13'),(98,78,1,52,1,1,'2007-10-23 19:59:37'),(99,46,1,120,1,1,'2007-10-25 10:54:34'),(100,79,1,26,1,1,'2007-10-27 01:15:06'),(102,81,1,135,1,1,'2007-10-31 06:41:34'),(103,82,1,32,1,1,'2007-11-03 08:21:10'),(105,84,1,51,1,1,'2007-11-11 17:32:19'),(106,7,1,51,1,1,'2007-11-11 17:32:19'),(107,8,1,51,1,1,'2007-11-11 17:32:19'),(108,85,1,52,1,1,'2007-11-11 17:33:21'),(109,7,1,52,1,1,'2007-11-11 17:33:21'),(110,8,1,52,1,1,'2007-11-11 17:33:21'),(112,30,1,27,1,1,'2007-11-14 23:10:01'),(113,87,1,83,1,1,'2007-11-15 21:08:47'),(114,88,1,83,1,1,'2007-11-15 21:08:47'),(115,89,1,83,1,1,'2007-11-15 21:08:47'),(116,90,1,83,1,1,'2007-11-15 21:08:47'),(117,91,1,44,1,1,'2007-11-16 04:23:18'),(118,12,1,126,1,1,'2007-11-18 18:57:35'),(119,16,1,126,2,1,'2007-11-19 22:10:44'),(120,92,1,83,1,1,'2007-11-20 02:06:27'),(121,91,1,119,1,1,'2007-11-22 13:40:17'),(122,30,1,27,1,1,'2007-11-22 13:40:25'),(123,28,1,17,1,1,'2007-11-23 01:18:36'),(124,93,1,54,1,1,'2007-11-23 01:19:35'),(126,17,1,119,1,1,'2007-11-23 05:04:04'),(127,12,1,25,1,1,'2007-11-23 08:28:32'),(128,11,1,25,1,1,'2007-11-23 08:28:33'),(129,60,1,25,1,1,'2007-11-23 08:28:33'),(130,95,1,25,1,1,'2007-11-23 08:28:33'),(131,96,1,25,1,1,'2007-11-23 08:28:33'),(132,57,1,25,1,1,'2007-11-23 08:28:33'),(133,97,1,135,1,1,'2007-11-24 11:13:39'),(134,98,1,20,3,1,'2007-11-26 15:33:10'),(136,100,1,27,2,1,'2007-11-30 22:36:43'),(137,47,1,19,1,1,'2007-12-01 01:51:25'),(138,101,1,19,1,1,'2007-12-01 01:51:41'),(139,102,1,32,1,1,'2007-12-02 00:01:50'),(140,103,1,19,1,1,'2007-12-03 01:06:47'),(142,105,1,44,1,1,'2007-12-04 09:11:43'),(143,106,1,83,1,1,'2007-12-06 02:09:24'),(144,28,1,32,1,1,'2007-12-06 13:32:55'),(145,30,1,27,1,1,'2007-12-08 17:21:40'),(147,11,1,27,2,1,'2007-12-11 15:07:55'),(148,12,1,27,2,1,'2007-12-11 15:07:55'),(149,85,1,52,1,1,'2007-12-13 09:04:44'),(150,108,1,20,1,1,'2007-12-16 22:32:32'),(151,109,1,45,1,1,'2007-12-19 07:51:26'),(152,110,1,27,1,1,'2007-12-21 12:21:34'),(155,113,1,52,1,1,'2007-12-26 19:36:22'),(156,31,1,52,1,1,'2007-12-26 19:36:37'),(157,8,1,52,1,1,'2007-12-26 19:36:52'),(158,114,1,52,1,1,'2007-12-26 19:37:07'),(159,115,1,52,1,1,'2007-12-26 19:37:20'),(161,117,1,119,1,1,'2007-12-28 08:06:23'),(162,60,1,26,1,1,'2007-12-28 19:17:07'),(165,120,1,135,1,1,'2008-01-03 21:55:11'),(167,100,1,26,1,1,'2008-01-05 08:03:06'),(168,122,1,46,1,1,'2008-01-05 09:12:43'),(169,36,1,30,1,1,'2008-01-05 10:45:10'),(170,123,1,26,1,1,'2008-01-05 11:23:44'),(171,60,1,26,1,1,'2008-01-06 08:19:12'),(173,125,1,26,1,1,'2008-01-06 08:37:36'),(174,126,1,27,1,1,'2008-01-06 16:53:18'),(175,127,1,35,1,1,'2008-01-07 05:45:10'),(176,128,1,35,1,1,'2008-01-07 06:09:52'),(177,129,1,35,1,1,'2008-01-07 06:10:12'),(178,51,1,35,1,1,'2008-01-07 06:10:54'),(179,47,1,17,1,1,'2008-01-07 10:01:54'),(180,90,1,48,1,1,'2008-01-08 01:41:47'),(181,130,1,46,1,1,'2008-01-08 09:13:14'),(182,24,1,32,1,1,'2008-01-09 12:17:18'),(183,103,1,27,1,1,'2008-01-09 13:35:20'),(184,30,1,134,1,1,'2008-01-09 13:36:03'),(185,131,1,51,1,1,'2008-01-10 10:26:30'),(186,30,1,27,1,1,'2008-01-11 00:02:51'),(187,132,1,135,1,1,'2008-01-11 12:52:20'),(188,133,1,132,1,1,'2008-01-13 14:15:05'),(189,71,1,28,2,1,'2008-01-14 17:48:12'),(190,134,1,18,2,1,'2008-01-14 19:09:54'),(191,135,1,35,2,1,'2008-01-16 06:40:21'),(192,136,1,35,2,1,'2008-01-16 06:41:39'),(193,17,1,35,1,1,'2008-01-17 11:44:08'),(194,137,1,135,1,1,'2008-01-18 21:48:37'),(195,48,1,135,1,1,'2008-01-18 21:48:37'),(196,138,1,39,1,1,'2008-01-18 22:16:26'),(197,139,1,39,1,1,'2008-01-18 22:16:26'),(198,12,1,39,1,1,'2008-01-18 22:16:26'),(199,24,1,46,1,1,'2008-01-18 22:57:29'),(202,142,1,28,1,1,'2008-01-19 08:43:26'),(203,71,1,27,1,1,'2008-01-19 19:53:04'),(204,143,1,27,2,1,'2008-01-19 20:47:47'),(205,91,1,35,1,1,'2008-01-21 21:33:44'),(206,144,1,35,1,1,'2008-01-21 21:33:44'),(207,60,1,28,2,1,'2008-01-23 11:42:59'),(208,59,1,27,1,1,'2008-01-23 17:24:33'),(209,60,1,27,1,1,'2008-01-23 17:24:47'),(210,145,1,51,1,1,'2008-01-23 23:53:24'),(211,146,1,51,1,1,'2008-01-23 23:53:24'),(212,102,1,16,3,1,'2008-01-24 08:59:20'),(213,147,1,41,1,1,'2008-01-24 19:27:16'),(214,30,1,27,1,1,'2008-01-25 05:38:46'),(215,31,1,51,1,1,'2008-01-27 00:16:53'),(216,148,1,46,1,1,'2008-01-28 16:28:06'),(217,149,1,30,1,1,'2008-01-29 08:32:00'),(218,126,1,27,1,1,'2008-01-30 19:04:03'),(219,150,1,112,1,1,'2008-01-31 14:11:14'),(220,30,1,25,3,1,'2008-01-31 14:42:40'),(221,151,1,27,1,1,'2008-02-01 08:23:09'),(222,152,1,27,1,1,'2008-02-04 23:24:16'),(223,153,1,18,1,1,'2008-02-06 17:40:14'),(225,155,1,41,1,1,'2008-02-08 09:10:19'),(226,156,1,135,1,1,'2008-02-08 22:50:39'),(227,100,1,27,1,1,'2008-02-10 17:37:40'),(228,39,1,35,3,1,'2008-02-11 09:40:17'),(229,157,1,26,1,1,'2008-02-11 15:51:08'),(232,160,1,27,1,1,'2008-02-13 15:21:18'),(233,161,1,27,1,1,'2008-02-13 17:25:45'),(234,162,1,46,1,0,'2008-02-13 18:03:01'),(235,163,1,27,1,1,'2008-02-13 18:04:22'),(237,28,1,25,1,1,'2008-02-13 19:00:08'),(238,165,1,30,3,1,'2008-02-14 16:30:29'),(239,166,1,46,3,1,'2008-02-14 16:33:02'),(240,167,1,25,1,1,'2008-02-14 18:58:50'),(241,168,1,20,1,1,'2008-02-16 07:52:20'),(243,91,1,39,1,1,'2008-02-19 08:25:22'),(244,170,1,32,2,1,'2008-02-19 21:26:51'),(246,172,1,126,2,1,'2008-02-19 21:27:51'),(247,173,1,25,1,1,'2008-02-21 02:57:32'),(249,175,1,83,1,1,'2008-02-21 19:11:41'),(250,176,1,28,1,1,'2008-02-23 23:10:34'),(252,178,1,120,1,1,'2008-02-25 00:09:58'),(253,179,1,120,1,1,'2008-02-25 00:09:58'),(254,180,1,27,1,1,'2008-02-27 09:41:38'),(255,181,1,119,1,1,'2008-02-28 05:05:02'),(256,182,1,19,1,1,'2008-02-28 15:30:14'),(257,183,1,17,1,1,'2008-03-01 16:01:27'),(260,186,1,18,1,1,'2008-03-04 23:12:47'),(261,91,1,42,2,1,'2008-03-06 10:20:07'),(262,187,1,119,3,1,'2008-03-06 22:59:49'),(263,188,1,119,3,1,'2008-03-06 22:59:49'),(264,98,1,45,1,1,'2008-03-07 03:22:17'),(267,191,1,119,1,1,'2008-03-10 11:33:45'),(269,31,1,54,1,1,'2008-03-10 21:10:17'),(270,193,1,27,1,1,'2008-03-10 22:53:31'),(271,194,1,25,1,1,'2008-03-11 15:06:18'),(274,72,1,83,1,1,'2008-03-16 00:54:08'),(276,198,1,134,1,1,'2008-03-17 00:29:05'),(279,200,1,26,1,1,'2008-03-17 19:12:59'),(280,201,1,26,3,1,'2008-03-18 13:05:03'),(281,100,1,27,1,1,'2008-03-18 14:19:30'),(282,202,1,46,2,1,'2008-03-18 17:58:42'),(283,203,1,46,2,1,'2008-03-18 17:58:42'),(284,204,1,46,2,1,'2008-03-18 17:58:42'),(285,205,1,108,1,1,'2008-03-19 17:36:51'),(286,206,1,108,1,1,'2008-03-19 17:36:51'),(287,207,1,108,1,1,'2008-03-19 17:36:51'),(288,208,1,108,1,1,'2008-03-19 17:36:51'),(289,209,1,108,1,1,'2008-03-19 17:36:52'),(290,210,1,17,1,1,'2008-03-19 17:37:56'),(291,211,1,17,1,1,'2008-03-19 17:37:57'),(292,212,1,17,1,1,'2008-03-19 17:37:57'),(293,213,1,17,1,1,'2008-03-19 17:37:57'),(294,214,1,17,1,1,'2008-03-19 17:37:57'),(295,215,1,17,1,1,'2008-03-19 17:37:57'),(296,216,1,17,1,1,'2008-03-19 17:37:57'),(297,217,1,135,1,1,'2008-03-19 17:54:39'),(298,218,1,135,1,1,'2008-03-19 17:54:39'),(299,219,1,135,1,1,'2008-03-19 17:54:39'),(300,220,1,135,1,1,'2008-03-19 17:54:39'),(301,221,1,135,1,1,'2008-03-19 17:54:39'),(302,143,1,119,1,1,'2008-03-19 18:22:27'),(303,222,1,25,2,1,'2008-03-21 14:03:29'),(304,223,1,93,1,1,'2008-03-22 03:39:48'),(305,224,1,18,1,1,'2008-03-22 23:32:31'),(306,225,1,32,1,1,'2008-03-24 20:53:08'),(307,226,1,32,1,1,'2008-03-24 20:53:08'),(308,227,1,32,1,1,'2008-03-24 20:53:08'),(309,228,1,119,1,1,'2008-03-27 09:21:02'),(311,230,1,42,1,1,'2008-03-27 15:55:49'),(312,231,1,20,1,1,'2008-03-27 17:35:23'),(313,232,1,51,1,1,'2008-03-27 21:57:38'),(315,61,1,46,1,1,'2008-03-29 12:07:20'),(316,100,1,27,1,1,'2008-03-30 03:26:33'),(317,234,1,93,1,1,'2008-03-30 10:55:22'),(318,4,1,119,1,1,'2008-03-31 06:08:44'),(319,5,1,119,1,1,'2008-03-31 06:08:44'),(320,16,1,119,1,1,'2008-03-31 06:08:44'),(321,17,1,119,1,1,'2008-03-31 06:08:44'),(322,28,1,119,1,1,'2008-03-31 06:08:44'),(323,29,1,119,1,1,'2008-03-31 06:08:44'),(324,235,1,119,1,1,'2008-03-31 06:08:44'),(325,143,1,119,1,1,'2008-03-31 06:08:44'),(326,4,1,119,1,1,'2008-03-31 06:08:44'),(327,5,1,119,1,1,'2008-03-31 06:08:44'),(328,16,1,119,1,1,'2008-03-31 06:08:44'),(329,17,1,119,1,1,'2008-03-31 06:08:44'),(330,28,1,119,1,1,'2008-03-31 06:08:44'),(331,4,1,120,1,1,'2008-03-31 06:09:09'),(332,5,1,120,1,1,'2008-03-31 06:09:09'),(333,16,1,120,1,1,'2008-03-31 06:09:09'),(334,17,1,120,1,1,'2008-03-31 06:09:09'),(335,28,1,120,1,1,'2008-03-31 06:09:09'),(336,29,1,120,1,1,'2008-03-31 06:09:09'),(337,235,1,120,1,1,'2008-03-31 06:09:09'),(338,143,1,120,1,1,'2008-03-31 06:09:09'),(339,4,1,126,1,1,'2008-03-31 06:09:27'),(340,5,1,126,1,1,'2008-03-31 06:09:27'),(341,16,1,126,1,1,'2008-03-31 06:09:27'),(342,17,1,126,1,1,'2008-03-31 06:09:27'),(343,28,1,126,1,1,'2008-03-31 06:09:27'),(344,29,1,126,1,1,'2008-03-31 06:09:28'),(345,235,1,126,1,1,'2008-03-31 06:09:28'),(346,143,1,126,1,1,'2008-03-31 06:09:28'),(347,4,1,123,1,1,'2008-03-31 06:09:48'),(348,5,1,123,1,1,'2008-03-31 06:09:48'),(349,16,1,123,1,1,'2008-03-31 06:09:48'),(350,17,1,123,1,1,'2008-03-31 06:09:48'),(351,28,1,123,1,1,'2008-03-31 06:09:48'),(352,29,1,123,1,1,'2008-03-31 06:09:48'),(353,235,1,123,1,1,'2008-03-31 06:09:48'),(354,143,1,123,1,1,'2008-03-31 06:09:48'),(356,237,1,133,1,1,'2008-03-31 07:38:37'),(357,134,1,133,1,1,'2008-03-31 07:38:37'),(358,76,1,42,2,1,'2008-04-01 15:52:04'),(359,238,1,42,2,1,'2008-04-01 15:52:22'),(361,24,1,45,1,1,'2008-04-01 20:35:26'),(362,240,1,20,1,1,'2008-04-02 05:46:21'),(363,113,1,51,3,1,'2008-04-04 07:50:11'),(364,241,1,51,3,1,'2008-04-04 07:50:11'),(366,243,1,26,1,1,'2008-04-04 18:45:46'),(367,100,1,26,1,1,'2008-04-04 18:45:46'),(370,79,1,134,1,1,'2008-04-05 14:06:09'),(376,251,1,27,1,1,'2008-04-09 12:56:39'),(377,28,1,35,1,1,'2008-04-09 15:56:02'),(379,28,1,26,1,1,'2008-04-09 19:01:06'),(380,100,1,26,1,1,'2008-04-09 19:01:06'),(381,253,1,46,1,1,'2008-04-10 10:10:16'),(382,254,1,39,1,1,'2008-04-10 17:21:56'),(384,100,1,25,1,1,'2008-04-11 02:00:07'),(385,125,1,25,1,1,'2008-04-11 02:00:07'),(386,46,1,25,1,1,'2008-04-11 02:00:07'),(389,167,1,42,1,1,'2008-04-12 05:37:31'),(390,256,1,53,1,1,'2008-04-12 07:33:10'),(391,257,1,25,1,1,'2008-04-12 19:44:54'),(392,258,1,35,1,1,'2008-04-14 12:36:23'),(393,258,1,119,1,1,'2008-04-14 12:37:20'),(395,24,1,132,1,1,'2008-04-14 13:06:10'),(396,2,1,46,1,1,'2008-04-14 18:18:02'),(399,223,1,48,1,1,'2008-04-15 14:34:55'),(400,233,1,48,1,1,'2008-04-15 14:35:08'),(401,262,1,27,1,1,'2008-04-16 15:39:34'),(417,31,1,51,2,1,'2008-04-22 13:02:52'),(418,223,1,120,1,1,'2008-04-22 20:38:04'),(419,71,1,27,1,1,'2008-04-22 23:58:59'),(426,79,1,52,2,1,'2008-05-05 22:11:43'),(435,84,1,54,1,1,'2008-05-08 15:09:38'),(439,162,1,20,1,1,'2008-05-08 22:37:04'),(458,30,1,51,1,1,'2008-05-19 16:05:25'),(459,3,1,51,1,1,'2008-05-19 16:57:23'),(468,28,1,27,1,1,'2008-05-23 10:55:31'),(469,105,1,16,1,1,'2008-05-23 18:54:37'),(476,79,1,27,3,1,'2008-05-27 10:47:48'),(478,319,1,44,3,1,'2008-05-27 14:11:25'),(482,39,1,120,1,1,'2008-05-28 15:45:26'),(489,46,1,119,1,1,'2008-06-02 12:08:51'),(495,24,1,18,1,1,'2008-06-06 05:51:16'),(496,12,1,25,1,1,'2008-06-06 19:55:02'),(511,47,1,16,1,1,'2008-06-13 16:16:15'),(512,28,1,17,1,1,'2008-06-14 04:05:38'),(513,47,1,17,1,1,'2008-06-14 04:05:38'),(520,47,1,16,1,1,'2008-06-18 04:31:20'),(525,347,1,25,1,1,'2008-06-19 10:52:08'),(529,117,1,93,1,1,'2008-06-21 17:15:45'),(530,31,1,103,1,1,'2008-06-22 05:23:21'),(536,24,1,16,1,1,'2008-06-22 23:38:55'),(539,203,1,46,1,1,'2008-06-22 23:57:37'),(540,122,1,46,1,1,'2008-06-22 23:57:37'),(547,223,1,25,1,1,'2008-06-25 01:45:06'),(548,33,1,16,3,1,'2008-06-25 06:51:51'),(553,28,1,19,1,1,'2008-06-27 13:12:23'),(560,12,1,25,1,1,'2008-07-02 15:31:00'),(577,32,1,135,1,1,'2008-07-09 12:13:41'),(584,51,1,18,2,1,'2008-07-11 00:06:55'),(592,319,1,44,1,1,'2008-07-18 13:15:35'),(597,30,1,119,1,1,'2008-07-21 19:01:07'),(601,72,1,32,3,1,'2008-07-24 21:54:16'),(602,132,1,27,1,1,'2008-07-25 23:13:50'),(610,49,1,108,1,1,'2008-07-29 17:16:09'),(615,79,1,163,1,1,'2008-08-01 21:01:53'),(616,30,1,163,1,1,'2008-08-01 21:01:53');

--
-- Table structure for table `tag_summary`
--

CREATE TABLE `tag_summary` (
  `tag_id` int(11) unsigned NOT NULL default '0',
  `store_id` smallint(5) unsigned NOT NULL default '0',
  `customers` int(11) unsigned NOT NULL default '0',
  `products` int(11) unsigned NOT NULL default '0',
  `uses` int(11) unsigned NOT NULL default '0',
  `historical_uses` int(11) unsigned NOT NULL default '0',
  `popularity` int(11) unsigned NOT NULL default '0',
  PRIMARY KEY  (`tag_id`,`store_id`),
  KEY `FK_TAG_SUMMARY_STORE` (`store_id`),
  CONSTRAINT `FK_TAG_SUMMARY_STORE` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `TAG_SUMMARY_TAG` FOREIGN KEY (`tag_id`) REFERENCES `tag` (`tag_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `tag_summary`
--

INSERT INTO `tag_summary` VALUES (1,0,1,1,1,1,1),(1,1,1,1,1,1,1),(2,0,1,3,4,4,4),(2,1,1,3,4,4,4),(3,0,1,2,2,2,2),(3,1,1,2,2,2,2),(4,0,1,4,7,7,7),(4,1,1,4,7,7,7),(5,0,1,4,7,7,7),(5,1,1,4,7,7,7),(6,0,1,1,1,1,1),(6,1,1,1,1,1,1),(7,0,1,2,3,3,3),(7,1,1,2,3,3,3),(8,0,1,2,4,4,4),(8,1,1,2,4,4,4),(9,0,1,1,1,1,1),(9,1,1,1,1,1,1),(10,0,1,1,1,1,1),(10,1,1,1,1,1,1),(11,0,1,2,6,6,6),(11,1,1,2,5,5,5),(11,2,1,1,1,1,1),(12,0,1,7,10,10,10),(12,1,1,6,9,9,9),(12,2,1,1,1,1,1),(13,0,1,1,2,2,2),(13,1,1,1,1,1,1),(13,2,1,1,1,1,1),(14,0,1,2,2,2,2),(14,1,1,2,2,2,2),(15,0,1,1,1,1,1),(15,1,1,1,1,1,1),(16,0,1,4,7,7,7),(16,1,1,4,6,6,6),(16,2,1,1,1,1,1),(17,0,1,5,8,8,8),(17,1,1,5,8,8,8),(18,0,1,1,1,1,1),(18,1,1,1,1,1,1),(19,0,1,1,1,1,1),(19,1,1,1,1,1,1),(20,0,1,3,3,3,3),(20,1,1,3,3,3,3),(22,0,1,1,1,1,1),(22,1,1,1,1,1,1),(23,0,1,1,1,1,1),(23,1,1,1,1,1,1),(24,0,1,7,7,7,7),(24,1,1,6,6,6,6),(24,2,1,1,1,1,1),(25,0,1,1,1,1,1),(25,2,1,1,1,1,1),(26,0,1,1,1,1,1),(26,2,1,1,1,1,1),(27,0,1,1,1,1,1),(27,1,1,1,1,1,1),(28,0,1,11,14,14,14),(28,1,1,11,14,14,14),(29,0,1,4,5,5,5),(29,1,1,4,5,5,5),(30,0,1,7,14,14,14),(30,1,1,6,12,12,12),(30,2,1,1,1,1,1),(30,3,1,1,1,1,1),(31,0,1,6,8,8,8),(31,1,1,6,7,7,7),(31,2,1,1,1,1,1),(32,0,1,1,2,2,2),(32,1,1,1,2,2,2),(33,0,1,2,2,2,2),(33,1,1,1,1,1,1),(33,3,1,1,1,1,1),(34,0,1,1,1,1,1),(34,1,1,1,1,1,1),(35,0,1,1,1,1,1),(35,1,1,1,1,1,1),(36,0,1,3,3,3,3),(36,1,1,3,3,3,3),(37,0,1,1,1,1,1),(37,1,1,1,1,1,1),(39,0,1,3,3,3,3),(39,1,1,2,2,2,2),(39,3,1,1,1,1,1),(40,0,1,1,1,1,1),(40,1,1,1,1,1,1),(44,0,1,1,1,1,1),(44,1,1,1,1,1,1),(45,0,1,1,1,1,1),(45,1,1,1,1,1,1),(46,0,1,4,4,4,4),(46,1,1,4,4,4,4),(47,0,1,4,6,6,6),(47,1,1,4,6,6,6),(48,0,1,2,2,2,2),(48,1,1,2,2,2,2),(49,0,1,2,2,2,2),(49,1,1,2,2,2,2),(51,0,1,2,3,3,3),(51,1,1,1,2,2,2),(51,2,1,1,1,1,1),(52,0,1,1,1,1,1),(52,1,1,1,1,1,1),(53,0,1,1,1,1,1),(53,1,1,1,1,1,1),(57,0,1,2,2,2,2),(57,1,1,2,2,2,2),(58,0,1,1,1,1,1),(58,1,1,1,1,1,1),(59,0,1,1,2,2,2),(59,1,1,1,2,2,2),(60,0,1,4,6,6,6),(60,1,1,3,5,5,5),(60,2,1,1,1,1,1),(61,0,1,2,2,2,2),(61,1,1,2,2,2,2),(62,0,1,1,1,1,1),(62,1,1,1,1,1,1),(67,0,1,1,1,1,1),(67,1,1,1,1,1,1),(71,0,1,3,4,4,4),(71,1,1,2,3,3,3),(71,2,1,1,1,1,1),(72,0,1,2,3,3,3),(72,1,1,2,2,2,2),(72,3,1,1,1,1,1),(73,0,1,1,1,1,1),(73,1,1,1,1,1,1),(75,0,1,1,1,1,1),(75,1,1,1,1,1,1),(76,0,1,2,2,2,2),(76,1,1,1,1,1,1),(76,2,1,1,1,1,1),(78,0,1,1,1,1,1),(78,1,1,1,1,1,1),(79,0,1,5,5,5,5),(79,1,1,3,3,3,3),(79,2,1,1,1,1,1),(79,3,1,1,1,1,1),(81,0,1,1,1,1,1),(81,1,1,1,1,1,1),(82,0,1,1,1,1,1),(82,1,1,1,1,1,1),(84,0,1,2,2,2,2),(84,1,1,2,2,2,2),(85,0,1,1,2,2,2),(85,1,1,1,2,2,2),(87,0,1,1,1,1,1),(87,1,1,1,1,1,1),(88,0,1,1,1,1,1),(88,1,1,1,1,1,1),(89,0,1,1,1,1,1),(89,1,1,1,1,1,1),(90,0,1,2,2,2,2),(90,1,1,2,2,2,2),(91,0,1,5,5,5,5),(91,1,1,4,4,4,4),(91,2,1,1,1,1,1),(92,0,1,1,1,1,1),(92,1,1,1,1,1,1),(93,0,1,1,1,1,1),(93,1,1,1,1,1,1),(95,0,1,1,1,1,1),(95,1,1,1,1,1,1),(96,0,1,1,1,1,1),(96,1,1,1,1,1,1),(97,0,1,1,1,1,1),(97,1,1,1,1,1,1),(98,0,1,2,2,2,2),(98,1,1,1,1,1,1),(98,3,1,1,1,1,1),(100,0,1,3,8,8,8),(100,1,1,3,7,7,7),(100,2,1,1,1,1,1),(101,0,1,1,1,1,1),(101,1,1,1,1,1,1),(102,0,1,2,2,2,2),(102,1,1,1,1,1,1),(102,3,1,1,1,1,1),(103,0,1,2,2,2,2),(103,1,1,2,2,2,2),(105,0,1,2,2,2,2),(105,1,1,2,2,2,2),(106,0,1,1,1,1,1),(106,1,1,1,1,1,1),(108,0,1,1,1,1,1),(108,1,1,1,1,1,1),(109,0,1,1,1,1,1),(109,1,1,1,1,1,1),(110,0,1,1,1,1,1),(110,1,1,1,1,1,1),(113,0,1,2,2,2,2),(113,1,1,1,1,1,1),(113,3,1,1,1,1,1),(114,0,1,1,1,1,1),(114,1,1,1,1,1,1),(115,0,1,1,1,1,1),(115,1,1,1,1,1,1),(117,0,1,2,2,2,2),(117,1,1,2,2,2,2),(120,0,1,1,1,1,1),(120,1,1,1,1,1,1),(122,0,1,1,2,2,2),(122,1,1,1,2,2,2),(123,0,1,1,1,1,1),(123,1,1,1,1,1,1),(125,0,1,2,2,2,2),(125,1,1,2,2,2,2),(126,0,1,1,2,2,2),(126,1,1,1,2,2,2),(127,0,1,1,1,1,1),(127,1,1,1,1,1,1),(128,0,1,1,1,1,1),(128,1,1,1,1,1,1),(129,0,1,1,1,1,1),(129,1,1,1,1,1,1),(130,0,1,1,1,1,1),(130,1,1,1,1,1,1),(131,0,1,1,1,1,1),(131,1,1,1,1,1,1),(132,0,1,2,2,2,2),(132,1,1,2,2,2,2),(133,0,1,1,1,1,1),(133,1,1,1,1,1,1),(134,0,1,2,2,2,2),(134,1,1,1,1,1,1),(134,2,1,1,1,1,1),(135,0,1,1,1,1,1),(135,2,1,1,1,1,1),(136,0,1,1,1,1,1),(136,2,1,1,1,1,1),(137,0,1,1,1,1,1),(137,1,1,1,1,1,1),(138,0,1,1,1,1,1),(138,1,1,1,1,1,1),(139,0,1,1,1,1,1),(139,1,1,1,1,1,1),(142,0,1,1,1,1,1),(142,1,1,1,1,1,1),(143,0,1,5,6,6,6),(143,1,1,4,5,5,5),(143,2,1,1,1,1,1),(144,0,1,1,1,1,1),(144,1,1,1,1,1,1),(145,0,1,1,1,1,1),(145,1,1,1,1,1,1),(146,0,1,1,1,1,1),(146,1,1,1,1,1,1),(147,0,1,1,1,1,1),(147,1,1,1,1,1,1),(148,0,1,1,1,1,1),(148,1,1,1,1,1,1),(149,0,1,1,1,1,1),(149,1,1,1,1,1,1),(150,0,1,1,1,1,1),(150,1,1,1,1,1,1),(151,0,1,1,1,1,1),(151,1,1,1,1,1,1),(152,0,1,1,1,1,1),(152,1,1,1,1,1,1),(153,0,1,1,1,1,1),(153,1,1,1,1,1,1),(155,0,1,1,1,1,1),(155,1,1,1,1,1,1),(156,0,1,1,1,1,1),(156,1,1,1,1,1,1),(157,0,1,1,1,1,1),(157,1,1,1,1,1,1),(160,0,1,1,1,1,1),(160,1,1,1,1,1,1),(161,0,1,1,1,1,1),(161,1,1,1,1,1,1),(162,0,1,1,1,2,2),(162,1,1,1,1,2,2),(163,0,1,1,1,1,1),(163,1,1,1,1,1,1),(165,0,1,1,1,1,1),(165,3,1,1,1,1,1),(166,0,1,1,1,1,1),(166,3,1,1,1,1,1),(167,0,1,2,2,2,2),(167,1,1,2,2,2,2),(168,0,1,1,1,1,1),(168,1,1,1,1,1,1),(170,0,1,1,1,1,1),(170,2,1,1,1,1,1),(172,0,1,1,1,1,1),(172,2,1,1,1,1,1),(173,0,1,1,1,1,1),(173,1,1,1,1,1,1),(175,0,1,1,1,1,1),(175,1,1,1,1,1,1),(176,0,1,1,1,1,1),(176,1,1,1,1,1,1),(178,0,1,1,1,1,1),(178,1,1,1,1,1,1),(179,0,1,1,1,1,1),(179,1,1,1,1,1,1),(180,0,1,1,1,1,1),(180,1,1,1,1,1,1),(181,0,1,1,1,1,1),(181,1,1,1,1,1,1),(182,0,1,1,1,1,1),(182,1,1,1,1,1,1),(183,0,1,1,1,1,1),(183,1,1,1,1,1,1),(186,0,1,1,1,1,1),(186,1,1,1,1,1,1),(187,0,1,1,1,1,1),(187,3,1,1,1,1,1),(188,0,1,1,1,1,1),(188,3,1,1,1,1,1),(191,0,1,1,1,1,1),(191,1,1,1,1,1,1),(193,0,1,1,1,1,1),(193,1,1,1,1,1,1),(194,0,1,1,1,1,1),(194,1,1,1,1,1,1),(195,0,0,0,0,0,0),(198,0,1,1,1,1,1),(198,1,1,1,1,1,1),(200,0,1,1,1,1,1),(200,1,1,1,1,1,1),(201,0,1,1,1,1,1),(201,3,1,1,1,1,1),(202,0,1,1,1,1,1),(202,2,1,1,1,1,1),(203,0,1,1,2,2,2),(203,1,1,1,1,1,1),(203,2,1,1,1,1,1),(204,0,1,1,1,1,1),(204,2,1,1,1,1,1),(205,0,1,1,1,1,1),(205,1,1,1,1,1,1),(206,0,1,1,1,1,1),(206,1,1,1,1,1,1),(207,0,1,1,1,1,1),(207,1,1,1,1,1,1),(208,0,1,1,1,1,1),(208,1,1,1,1,1,1),(209,0,1,1,1,1,1),(209,1,1,1,1,1,1),(210,0,1,1,1,1,1),(210,1,1,1,1,1,1),(211,0,1,1,1,1,1),(211,1,1,1,1,1,1),(212,0,1,1,1,1,1),(212,1,1,1,1,1,1),(213,0,1,1,1,1,1),(213,1,1,1,1,1,1),(214,0,1,1,1,1,1),(214,1,1,1,1,1,1),(215,0,1,1,1,1,1),(215,1,1,1,1,1,1),(216,0,1,1,1,1,1),(216,1,1,1,1,1,1),(217,0,1,1,1,1,1),(217,1,1,1,1,1,1),(218,0,1,1,1,1,1),(218,1,1,1,1,1,1),(219,0,1,1,1,1,1),(219,1,1,1,1,1,1),(220,0,1,1,1,1,1),(220,1,1,1,1,1,1),(221,0,1,1,1,1,1),(221,1,1,1,1,1,1),(222,0,1,1,1,1,1),(222,2,1,1,1,1,1),(223,0,1,4,4,4,4),(223,1,1,4,4,4,4),(224,0,1,1,1,1,1),(224,1,1,1,1,1,1),(225,0,1,1,1,1,1),(225,1,1,1,1,1,1),(226,0,1,1,1,1,1),(226,1,1,1,1,1,1),(227,0,1,1,1,1,1),(227,1,1,1,1,1,1),(228,0,1,1,1,1,1),(228,1,1,1,1,1,1),(230,0,1,1,1,1,1),(230,1,1,1,1,1,1),(231,0,1,1,1,1,1),(231,1,1,1,1,1,1),(232,0,1,1,1,1,1),(232,1,1,1,1,1,1),(233,0,1,1,1,1,1),(233,1,1,1,1,1,1),(234,0,1,1,1,1,1),(234,1,1,1,1,1,1),(235,0,1,4,4,4,4),(235,1,1,4,4,4,4),(237,0,1,1,1,1,1),(237,1,1,1,1,1,1),(238,0,1,1,1,1,1),(238,2,1,1,1,1,1),(240,0,1,1,1,1,1),(240,1,1,1,1,1,1),(241,0,1,1,1,1,1),(241,3,1,1,1,1,1),(243,0,1,1,1,1,1),(243,1,1,1,1,1,1),(251,0,1,1,1,1,1),(251,1,1,1,1,1,1),(253,0,1,1,1,1,1),(253,1,1,1,1,1,1),(254,0,1,1,1,1,1),(254,1,1,1,1,1,1),(256,0,1,1,1,1,1),(256,1,1,1,1,1,1),(257,0,1,1,1,1,1),(257,1,1,1,1,1,1),(258,0,1,2,2,2,2),(258,1,1,2,2,2,2),(262,0,1,1,1,1,1),(262,1,1,1,1,1,1),(319,0,1,1,2,2,2),(319,1,1,1,1,1,1),(319,3,1,1,1,1,1),(347,0,1,1,1,1,1),(347,1,1,1,1,1,1);

--
-- Table structure for table `tax_calculation`
--

CREATE TABLE `tax_calculation` (
  `tax_calculation_rate_id` int(11) NOT NULL,
  `tax_calculation_rule_id` int(11) NOT NULL,
  `customer_tax_class_id` smallint(6) NOT NULL,
  `product_tax_class_id` smallint(6) NOT NULL,
  KEY `FK_TAX_CALCULATION_RULE` (`tax_calculation_rule_id`),
  KEY `FK_TAX_CALCULATION_RATE` (`tax_calculation_rate_id`),
  KEY `FK_TAX_CALCULATION_CTC` (`customer_tax_class_id`),
  KEY `FK_TAX_CALCULATION_PTC` (`product_tax_class_id`),
  KEY `IDX_TAX_CALCULATION` (`tax_calculation_rate_id`,`customer_tax_class_id`,`product_tax_class_id`),
  CONSTRAINT `FK_TAX_CALCULATION_PTC` FOREIGN KEY (`product_tax_class_id`) REFERENCES `tax_class` (`class_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_TAX_CALCULATION_CTC` FOREIGN KEY (`customer_tax_class_id`) REFERENCES `tax_class` (`class_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_TAX_CALCULATION_RATE` FOREIGN KEY (`tax_calculation_rate_id`) REFERENCES `tax_calculation_rate` (`tax_calculation_rate_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_TAX_CALCULATION_RULE` FOREIGN KEY (`tax_calculation_rule_id`) REFERENCES `tax_calculation_rule` (`tax_calculation_rule_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tax_calculation`
--

INSERT INTO `tax_calculation` VALUES (1,2,3,1),(2,2,3,1),(1,1,3,2),(2,1,3,2);

--
-- Table structure for table `tax_calculation_rate`
--

CREATE TABLE `tax_calculation_rate` (
  `tax_calculation_rate_id` int(11) NOT NULL auto_increment,
  `tax_country_id` char(2) NOT NULL,
  `tax_region_id` mediumint(9) NOT NULL,
  `tax_postcode` varchar(12) NOT NULL,
  `code` varchar(255) NOT NULL,
  `rate` decimal(12,4) NOT NULL,
  PRIMARY KEY  (`tax_calculation_rate_id`),
  KEY `IDX_TAX_CALCULATION_RATE` (`tax_country_id`,`tax_region_id`,`tax_postcode`),
  KEY `IDX_TAX_CALCULATION_RATE_CODE` (`code`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tax_calculation_rate`
--

INSERT INTO `tax_calculation_rate` VALUES (1,'US',12,'*','US-CA-*-Rate 1','8.2500'),(2,'US',43,'*','US-NY-*-Rate 1','8.3750');

--
-- Table structure for table `tax_calculation_rate_title`
--

CREATE TABLE `tax_calculation_rate_title` (
  `tax_calculation_rate_title_id` int(11) NOT NULL auto_increment,
  `tax_calculation_rate_id` int(11) NOT NULL,
  `store_id` smallint(5) unsigned NOT NULL,
  `value` varchar(255) NOT NULL,
  PRIMARY KEY  (`tax_calculation_rate_title_id`),
  KEY `IDX_TAX_CALCULATION_RATE_TITLE` (`tax_calculation_rate_id`,`store_id`),
  KEY `FK_TAX_CALCULATION_RATE_TITLE_RATE` (`tax_calculation_rate_id`),
  KEY `FK_TAX_CALCULATION_RATE_TITLE_STORE` (`store_id`),
  CONSTRAINT `FK_TAX_CALCULATION_RATE_TITLE_STORE` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_TAX_CALCULATION_RATE_TITLE_RATE` FOREIGN KEY (`tax_calculation_rate_id`) REFERENCES `tax_calculation_rate` (`tax_calculation_rate_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `tax_calculation_rule`
--

CREATE TABLE `tax_calculation_rule` (
  `tax_calculation_rule_id` int(11) NOT NULL auto_increment,
  `code` varchar(255) NOT NULL,
  `priority` mediumint(9) NOT NULL,
  `position` mediumint(9) NOT NULL,
  PRIMARY KEY  (`tax_calculation_rule_id`),
  KEY `IDX_TAX_CALCULATION_RULE` (`priority`,`position`,`tax_calculation_rule_id`),
  KEY `IDX_TAX_CALCULATION_RULE_CODE` (`code`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tax_calculation_rule`
--

INSERT INTO `tax_calculation_rule` VALUES (1,'Retail Customer-Taxable Goods-Rate 1',1,1),(2,'Retail Customer-default-Rate 1',1,1);

--
-- Table structure for table `tax_class`
--

CREATE TABLE `tax_class` (
  `class_id` smallint(6) NOT NULL auto_increment,
  `class_name` varchar(255) NOT NULL default '',
  `class_type` enum('CUSTOMER','PRODUCT') NOT NULL default 'CUSTOMER',
  PRIMARY KEY  (`class_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

--
-- Dumping data for table `tax_class`
--

INSERT INTO `tax_class` VALUES (1,'default','PRODUCT'),(2,'Taxable Goods','PRODUCT'),(3,'Retail Customer','CUSTOMER'),(4,'Shipping','PRODUCT');

--
-- Table structure for table `wishlist`
--

CREATE TABLE `wishlist` (
  `wishlist_id` int(10) unsigned NOT NULL auto_increment,
  `customer_id` int(10) unsigned NOT NULL default '0',
  `shared` tinyint(1) unsigned default '0',
  `sharing_code` varchar(32) character set latin1 collate latin1_general_ci NOT NULL default '',
  PRIMARY KEY  (`wishlist_id`),
  UNIQUE KEY `FK_CUSTOMER` (`customer_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Wishlist main';

--
-- Table structure for table `wishlist_item`
--

CREATE TABLE `wishlist_item` (
  `wishlist_item_id` int(10) unsigned NOT NULL auto_increment,
  `wishlist_id` int(10) unsigned NOT NULL default '0',
  `product_id` int(10) unsigned NOT NULL default '0',
  `store_id` smallint(5) unsigned NOT NULL,
  `added_at` datetime default NULL,
  `description` text,
  PRIMARY KEY  (`wishlist_item_id`),
  KEY `FK_ITEM_WISHLIST` (`wishlist_id`),
  KEY `FK_WISHLIST_PRODUCT` (`product_id`),
  KEY `FK_WISHLIST_STORE` (`store_id`),
  CONSTRAINT `FK_ITEM_WISHLIST` FOREIGN KEY (`wishlist_id`) REFERENCES `wishlist` (`wishlist_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_WISHLIST_ITEM_STORE` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_WISHLIST_PRODUCT` FOREIGN KEY (`product_id`) REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Wishlist items';



