text: -- phpMyAdmin SQL Dump
  -- version 4.2.11
  -- http://www.phpmyadmin.net
  --
  -- Host: 127.0.0.1
  -- Generation Time: Jul 21, 2018 at 06:41 PM
  -- Server version: 5.6.21
  -- PHP Version: 5.6.3
  
  SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
  SET time_zone = "+00:00";
  
  
  /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
  /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
  /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
  /*!40101 SET NAMES utf8 */;
  
  --
  -- Database: `dbhmvcci318`
  --
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `authors`
  --
  
  CREATE TABLE IF NOT EXISTS `authors` (
  `author_id` int(11) NOT NULL,
    `author_firstname` varchar(50) NOT NULL,
    `author_lastname` varchar(50) NOT NULL,
    `author_othernames` varchar(50) NOT NULL,
    `author_birthdate` date NOT NULL,
    `author_history` text NOT NULL,
    `author_image` text NOT NULL,
    `author_isactive` int(11) NOT NULL DEFAULT '1'
  ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `authors`
  --
  
  INSERT INTO `authors` (`author_id`, `author_firstname`, `author_lastname`, `author_othernames`, `author_birthdate`, `author_history`, `author_image`, `author_isactive`) VALUES
  (1, 'John', 'Otaalo', 'Chrispine', '1990-03-24', 'Something about the author that does not have to do a lot there with', 'https://yt3.ggpht.com/-iLEaGGRXaY8/AAAAAAAAAAI/AAAAAAAAAAA/Ycv1cGgDaGk/s900-c-k-no/photo.jpg', 1),
  (2, 'Alexis', 'Sanchez', 'Gulliermo', '1989-02-05', 'He is a very prolific writer and footballer', 'http://i1.mirror.co.uk/incoming/article3841911.ece/ALTERNATES/s615/PAY-Alexis-Sanchez.jpg', 1);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `books`
  --
  
  CREATE TABLE IF NOT EXISTS `books` (
  `book_id` int(11) NOT NULL,
    `book_isbn` varchar(15) NOT NULL,
    `book_title` varchar(50) NOT NULL,
    `book_yop` date NOT NULL,
    `book_dateadded` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    `book_active` int(11) NOT NULL DEFAULT '1',
    `book_genreid` int(11) NOT NULL,
    `book_publisherid` int(11) NOT NULL
  ) ENGINE=InnoDB AUTO_INCREMENT=34 DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `books`
  --
  
  INSERT INTO `books` (`book_id`, `book_isbn`, `book_title`, `book_yop`, `book_dateadded`, `book_active`, `book_genreid`, `book_publisherid`) VALUES
  (32, 's', 'a', '0000-00-00', '2018-04-11 04:43:54', 1, 1, 1),
  (33, 'a', 'asda', '0000-00-00', '2018-04-11 05:27:15', 1, 1, 1);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `book_author`
  --
  
  CREATE TABLE IF NOT EXISTS `book_author` (
  `Book_Author_ID` int(11) NOT NULL,
    `BookId` int(11) NOT NULL,
    `AuthorId` int(11) NOT NULL,
    `Books_book_id` int(11) NOT NULL
  ) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `book_author`
  --
  
  INSERT INTO `book_author` (`Book_Author_ID`, `BookId`, `AuthorId`, `Books_book_id`) VALUES
  (15, 33, 1, 0),
  (16, 33, 2, 0);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `book_genre`
  --
  
  CREATE TABLE IF NOT EXISTS `book_genre` (
  `book_genreid` int(11) NOT NULL,
    `book_genre` varchar(20) NOT NULL,
    `book_genreactive` int(11) NOT NULL DEFAULT '1'
  ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `book_genre`
  --
  
  INSERT INTO `book_genre` (`book_genreid`, `book_genre`, `book_genreactive`) VALUES
  (1, 'Fiction', 1),
  (2, 'Horror', 1),
  (3, 'Fairy Tales', 1);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `book_images`
  --
  
  CREATE TABLE IF NOT EXISTS `book_images` (
  `imageID` int(11) NOT NULL,
    `book_id` int(11) NOT NULL,
    `imagePath` text NOT NULL,
    `imageIsTitle` int(11) NOT NULL DEFAULT '0',
    `imageActive` int(11) NOT NULL DEFAULT '1'
  ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `book_images`
  --
  
  INSERT INTO `book_images` (`imageID`, `book_id`, `imagePath`, `imageIsTitle`, `imageActive`) VALUES
  (1, 32, 'http://localhost/hmvcci318/upload/books/Archery Quiver Bag.jpg', 0, 1),
  (2, 32, 'http://localhost/hmvcci318/upload/books/Bukti Transfer Graji Mesin.png', 0, 1),
  (3, 33, 'http://localhost/hmvcci318/upload/books/game console.JPG', 0, 1);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `countries`
  --
  
  CREATE TABLE IF NOT EXISTS `countries` (
  `id` int(11) NOT NULL,
    `country_code` varchar(2) NOT NULL DEFAULT '',
    `country_name` varchar(100) NOT NULL DEFAULT ''
  ) ENGINE=MyISAM AUTO_INCREMENT=247 DEFAULT CHARSET=utf8;
  
  --
  -- Dumping data for table `countries`
  --
  
  INSERT INTO `countries` (`id`, `country_code`, `country_name`) VALUES
  (1, 'AF', 'Afghanistan'),
  (2, 'AL', 'Albania'),
  (3, 'DZ', 'Algeria'),
  (4, 'DS', 'American Samoa'),
  (5, 'AD', 'Andorra'),
  (6, 'AO', 'Angola'),
  (7, 'AI', 'Anguilla'),
  (8, 'AQ', 'Antarctica'),
  (9, 'AG', 'Antigua and Barbuda'),
  (10, 'AR', 'Argentina'),
  (11, 'AM', 'Armenia'),
  (12, 'AW', 'Aruba'),
  (13, 'AU', 'Australia'),
  (14, 'AT', 'Austria'),
  (15, 'AZ', 'Azerbaijan'),
  (16, 'BS', 'Bahamas'),
  (17, 'BH', 'Bahrain'),
  (18, 'BD', 'Bangladesh'),
  (19, 'BB', 'Barbados'),
  (20, 'BY', 'Belarus'),
  (21, 'BE', 'Belgium'),
  (22, 'BZ', 'Belize'),
  (23, 'BJ', 'Benin'),
  (24, 'BM', 'Bermuda'),
  (25, 'BT', 'Bhutan'),
  (26, 'BO', 'Bolivia'),
  (27, 'BA', 'Bosnia and Herzegovina'),
  (28, 'BW', 'Botswana'),
  (29, 'BV', 'Bouvet Island'),
  (30, 'BR', 'Brazil'),
  (31, 'IO', 'British Indian Ocean Territory'),
  (32, 'BN', 'Brunei Darussalam'),
  (33, 'BG', 'Bulgaria'),
  (34, 'BF', 'Burkina Faso'),
  (35, 'BI', 'Burundi'),
  (36, 'KH', 'Cambodia'),
  (37, 'CM', 'Cameroon'),
  (38, 'CA', 'Canada'),
  (39, 'CV', 'Cape Verde'),
  (40, 'KY', 'Cayman Islands'),
  (41, 'CF', 'Central African Republic'),
  (42, 'TD', 'Chad'),
  (43, 'CL', 'Chile'),
  (44, 'CN', 'China'),
  (45, 'CX', 'Christmas Island'),
  (46, 'CC', 'Cocos (Keeling) Islands'),
  (47, 'CO', 'Colombia'),
  (48, 'KM', 'Comoros'),
  (49, 'CG', 'Congo'),
  (50, 'CK', 'Cook Islands'),
  (51, 'CR', 'Costa Rica'),
  (52, 'HR', 'Croatia (Hrvatska)'),
  (53, 'CU', 'Cuba'),
  (54, 'CY', 'Cyprus'),
  (55, 'CZ', 'Czech Republic'),
  (56, 'DK', 'Denmark'),
  (57, 'DJ', 'Djibouti'),
  (58, 'DM', 'Dominica'),
  (59, 'DO', 'Dominican Republic'),
  (60, 'TP', 'East Timor'),
  (61, 'EC', 'Ecuador'),
  (62, 'EG', 'Egypt'),
  (63, 'SV', 'El Salvador'),
  (64, 'GQ', 'Equatorial Guinea'),
  (65, 'ER', 'Eritrea'),
  (66, 'EE', 'Estonia'),
  (67, 'ET', 'Ethiopia'),
  (68, 'FK', 'Falkland Islands (Malvinas)'),
  (69, 'FO', 'Faroe Islands'),
  (70, 'FJ', 'Fiji'),
  (71, 'FI', 'Finland'),
  (72, 'FR', 'France'),
  (73, 'FX', 'France, Metropolitan'),
  (74, 'GF', 'French Guiana'),
  (75, 'PF', 'French Polynesia'),
  (76, 'TF', 'French Southern Territories'),
  (77, 'GA', 'Gabon'),
  (78, 'GM', 'Gambia'),
  (79, 'GE', 'Georgia'),
  (80, 'DE', 'Germany'),
  (81, 'GH', 'Ghana'),
  (82, 'GI', 'Gibraltar'),
  (83, 'GK', 'Guernsey'),
  (84, 'GR', 'Greece'),
  (85, 'GL', 'Greenland'),
  (86, 'GD', 'Grenada'),
  (87, 'GP', 'Guadeloupe'),
  (88, 'GU', 'Guam'),
  (89, 'GT', 'Guatemala'),
  (90, 'GN', 'Guinea'),
  (91, 'GW', 'Guinea-Bissau'),
  (92, 'GY', 'Guyana'),
  (93, 'HT', 'Haiti'),
  (94, 'HM', 'Heard and Mc Donald Islands'),
  (95, 'HN', 'Honduras'),
  (96, 'HK', 'Hong Kong'),
  (97, 'HU', 'Hungary'),
  (98, 'IS', 'Iceland'),
  (99, 'IN', 'India'),
  (100, 'IM', 'Isle of Man'),
  (101, 'ID', 'Indonesia'),
  (102, 'IR', 'Iran (Islamic Republic of)'),
  (103, 'IQ', 'Iraq'),
  (104, 'IE', 'Ireland'),
  (105, 'IL', 'Israel'),
  (106, 'IT', 'Italy'),
  (107, 'CI', 'Ivory Coast'),
  (108, 'JE', 'Jersey'),
  (109, 'JM', 'Jamaica'),
  (110, 'JP', 'Japan'),
  (111, 'JO', 'Jordan'),
  (112, 'KZ', 'Kazakhstan'),
  (113, 'KE', 'Kenya'),
  (114, 'KI', 'Kiribati'),
  (115, 'KP', 'Korea, Democratic People''s Republic of'),
  (116, 'KR', 'Korea, Republic of'),
  (117, 'XK', 'Kosovo'),
  (118, 'KW', 'Kuwait'),
  (119, 'KG', 'Kyrgyzstan'),
  (120, 'LA', 'Lao People''s Democratic Republic'),
  (121, 'LV', 'Latvia'),
  (122, 'LB', 'Lebanon'),
  (123, 'LS', 'Lesotho'),
  (124, 'LR', 'Liberia'),
  (125, 'LY', 'Libyan Arab Jamahiriya'),
  (126, 'LI', 'Liechtenstein'),
  (127, 'LT', 'Lithuania'),
  (128, 'LU', 'Luxembourg'),
  (129, 'MO', 'Macau'),
  (130, 'MK', 'Macedonia'),
  (131, 'MG', 'Madagascar'),
  (132, 'MW', 'Malawi'),
  (133, 'MY', 'Malaysia'),
  (134, 'MV', 'Maldives'),
  (135, 'ML', 'Mali'),
  (136, 'MT', 'Malta'),
  (137, 'MH', 'Marshall Islands'),
  (138, 'MQ', 'Martinique'),
  (139, 'MR', 'Mauritania'),
  (140, 'MU', 'Mauritius'),
  (141, 'TY', 'Mayotte'),
  (142, 'MX', 'Mexico'),
  (143, 'FM', 'Micronesia, Federated States of'),
  (144, 'MD', 'Moldova, Republic of'),
  (145, 'MC', 'Monaco'),
  (146, 'MN', 'Mongolia'),
  (147, 'ME', 'Montenegro'),
  (148, 'MS', 'Montserrat'),
  (149, 'MA', 'Morocco'),
  (150, 'MZ', 'Mozambique'),
  (151, 'MM', 'Myanmar'),
  (152, 'NA', 'Namibia'),
  (153, 'NR', 'Nauru'),
  (154, 'NP', 'Nepal'),
  (155, 'NL', 'Netherlands'),
  (156, 'AN', 'Netherlands Antilles'),
  (157, 'NC', 'New Caledonia'),
  (158, 'NZ', 'New Zealand'),
  (159, 'NI', 'Nicaragua'),
  (160, 'NE', 'Niger'),
  (161, 'NG', 'Nigeria'),
  (162, 'NU', 'Niue'),
  (163, 'NF', 'Norfolk Island'),
  (164, 'MP', 'Northern Mariana Islands'),
  (165, 'NO', 'Norway'),
  (166, 'OM', 'Oman'),
  (167, 'PK', 'Pakistan'),
  (168, 'PW', 'Palau'),
  (169, 'PS', 'Palestine'),
  (170, 'PA', 'Panama'),
  (171, 'PG', 'Papua New Guinea'),
  (172, 'PY', 'Paraguay'),
  (173, 'PE', 'Peru'),
  (174, 'PH', 'Philippines'),
  (175, 'PN', 'Pitcairn'),
  (176, 'PL', 'Poland'),
  (177, 'PT', 'Portugal'),
  (178, 'PR', 'Puerto Rico'),
  (179, 'QA', 'Qatar'),
  (180, 'RE', 'Reunion'),
  (181, 'RO', 'Romania'),
  (182, 'RU', 'Russian Federation'),
  (183, 'RW', 'Rwanda'),
  (184, 'KN', 'Saint Kitts and Nevis'),
  (185, 'LC', 'Saint Lucia'),
  (186, 'VC', 'Saint Vincent and the Grenadines'),
  (187, 'WS', 'Samoa'),
  (188, 'SM', 'San Marino'),
  (189, 'ST', 'Sao Tome and Principe'),
  (190, 'SA', 'Saudi Arabia'),
  (191, 'SN', 'Senegal'),
  (192, 'RS', 'Serbia'),
  (193, 'SC', 'Seychelles'),
  (194, 'SL', 'Sierra Leone'),
  (195, 'SG', 'Singapore'),
  (196, 'SK', 'Slovakia'),
  (197, 'SI', 'Slovenia'),
  (198, 'SB', 'Solomon Islands'),
  (199, 'SO', 'Somalia'),
  (200, 'ZA', 'South Africa'),
  (201, 'GS', 'South Georgia South Sandwich Islands'),
  (202, 'ES', 'Spain'),
  (203, 'LK', 'Sri Lanka'),
  (204, 'SH', 'St. Helena'),
  (205, 'PM', 'St. Pierre and Miquelon'),
  (206, 'SD', 'Sudan'),
  (207, 'SR', 'Suriname'),
  (208, 'SJ', 'Svalbard and Jan Mayen Islands'),
  (209, 'SZ', 'Swaziland'),
  (210, 'SE', 'Sweden'),
  (211, 'CH', 'Switzerland'),
  (212, 'SY', 'Syrian Arab Republic'),
  (213, 'TW', 'Taiwan'),
  (214, 'TJ', 'Tajikistan'),
  (215, 'TZ', 'Tanzania, United Republic of'),
  (216, 'TH', 'Thailand'),
  (217, 'TG', 'Togo'),
  (218, 'TK', 'Tokelau'),
  (219, 'TO', 'Tonga'),
  (220, 'TT', 'Trinidad and Tobago'),
  (221, 'TN', 'Tunisia'),
  (222, 'TR', 'Turkey'),
  (223, 'TM', 'Turkmenistan'),
  (224, 'TC', 'Turks and Caicos Islands'),
  (225, 'TV', 'Tuvalu'),
  (226, 'UG', 'Uganda'),
  (227, 'UA', 'Ukraine'),
  (228, 'AE', 'United Arab Emirates'),
  (229, 'GB', 'United Kingdom'),
  (230, 'US', 'United States'),
  (231, 'UM', 'United States minor outlying islands'),
  (232, 'UY', 'Uruguay'),
  (233, 'UZ', 'Uzbekistan'),
  (234, 'VU', 'Vanuatu'),
  (235, 'VA', 'Vatican City State'),
  (236, 'VE', 'Venezuela'),
  (237, 'VN', 'Vietnam'),
  (238, 'VG', 'Virgin Islands (British)'),
  (239, 'VI', 'Virgin Islands (U.S.)'),
  (240, 'WF', 'Wallis and Futuna Islands'),
  (241, 'EH', 'Western Sahara'),
  (242, 'YE', 'Yemen'),
  (243, 'YU', 'Yugoslavia'),
  (244, 'ZR', 'Zaire'),
  (245, 'ZM', 'Zambia'),
  (246, 'ZW', 'Zimbabwe');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `order`
  --
  
  CREATE TABLE IF NOT EXISTS `order` (
  `order_id` int(11) NOT NULL,
    `user_id` int(11) NOT NULL,
    `total_amount` varchar(10) NOT NULL,
    `date_added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `order_details`
  --
  
  CREATE TABLE IF NOT EXISTS `order_details` (
  `order_detail_id` int(11) NOT NULL,
    `order_id` int(11) NOT NULL,
    `book_id` int(11) NOT NULL,
    `order_quantity` int(11) NOT NULL,
    `order_price` varchar(10) NOT NULL,
    `order_dateadded` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    `order_status` int(11) NOT NULL DEFAULT '0'
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `publishers`
  --
  
  CREATE TABLE IF NOT EXISTS `publishers` (
  `publisher_id` int(11) NOT NULL,
    `publisher_name` varchar(20) NOT NULL,
    `publisher_country` int(11) NOT NULL,
    `publisher_city` varchar(20) NOT NULL,
    `publisher_active` int(11) NOT NULL DEFAULT '1'
  ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `publishers`
  --
  
  INSERT INTO `publishers` (`publisher_id`, `publisher_name`, `publisher_country`, `publisher_city`, `publisher_active`) VALUES
  (1, 'LongHorn Publishers', 1, 'Test', 1),
  (2, 'Kilimanjaro Publishe', 244, 'Another City', 1);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `roles`
  --
  
  CREATE TABLE IF NOT EXISTS `roles` (
  `role_id` int(11) NOT NULL,
    `role_name` varchar(100) NOT NULL,
    `isactive` smallint(1) NOT NULL DEFAULT '0'
  ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `roles`
  --
  
  INSERT INTO `roles` (`role_id`, `role_name`, `isactive`) VALUES
  (1, 'Super User', 1),
  (2, 'Administrator', 1);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `users`
  --
  
  CREATE TABLE IF NOT EXISTS `users` (
  `user_id` int(11) NOT NULL,
    `google_id` varchar(200) NOT NULL,
    `user_name` varchar(50) NOT NULL,
    `user_gender` varchar(5) DEFAULT NULL,
    `user_firstname` varchar(20) DEFAULT NULL,
    `user_lastname` varchar(20) DEFAULT NULL,
    `user_fullname` varchar(200) DEFAULT NULL,
    `user_email` varchar(50) NOT NULL,
    `user_mobile` varchar(20) DEFAULT NULL,
    `user_password` varchar(255) NOT NULL,
    `user_photo` varchar(200) DEFAULT NULL,
    `user_active` int(11) NOT NULL DEFAULT '1'
  ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `users`
  --
  
  INSERT INTO `users` (`user_id`, `google_id`, `user_name`, `user_gender`, `user_firstname`, `user_lastname`, `user_fullname`, `user_email`, `user_mobile`, `user_password`, `user_photo`, `user_active`) VALUES
  (5, '114746095932612758526', 'landungpujisantoso2@gmail.com', NULL, 'Landung', 'Puji Santoso', 'Landung Puji Santoso', '', NULL, '$2y$10$nnlJNvUtWl4SUktrJ/ZNrew7P/tIAP2znlL4m8ZT6XLhRldBn/sY6', NULL, 1);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `user_billing`
  --
  
  CREATE TABLE IF NOT EXISTS `user_billing` (
  `billing_id` int(11) NOT NULL,
    `billing_user_id` int(11) NOT NULL,
    `billing_address` text NOT NULL,
    `billing_country` varchar(50) NOT NULL,
    `billing_phonenumber` varchar(20) NOT NULL,
    `active` int(11) NOT NULL DEFAULT '1'
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `user_roles`
  --
  
  CREATE TABLE IF NOT EXISTS `user_roles` (
    `user_id` int(11) NOT NULL,
    `role_id` int(11) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `user_roles`
  --
  
  INSERT INTO `user_roles` (`user_id`, `role_id`) VALUES
  (1, 2);
  
  --
  -- Indexes for dumped tables
  --
  
  --
  -- Indexes for table `authors`
  --
  ALTER TABLE `authors`
   ADD PRIMARY KEY (`author_id`);
  
  --
  -- Indexes for table `books`
  --
  ALTER TABLE `books`
   ADD PRIMARY KEY (`book_id`), ADD KEY `Books_idx_1` (`book_genreid`,`book_publisherid`), ADD KEY `Books_Publishers` (`book_publisherid`);
  
  --
  -- Indexes for table `book_author`
  --
  ALTER TABLE `book_author`
   ADD PRIMARY KEY (`Book_Author_ID`), ADD KEY `Book_Author_Authors` (`AuthorId`), ADD KEY `Book_Author_Books` (`BookId`);
  
  --
  -- Indexes for table `book_genre`
  --
  ALTER TABLE `book_genre`
   ADD PRIMARY KEY (`book_genreid`);
  
  --
  -- Indexes for table `book_images`
  --
  ALTER TABLE `book_images`
   ADD PRIMARY KEY (`imageID`), ADD KEY `Book_Images_Books` (`book_id`);
  
  --
  -- Indexes for table `countries`
  --
  ALTER TABLE `countries`
   ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `order`
  --
  ALTER TABLE `order`
   ADD PRIMARY KEY (`order_id`), ADD KEY `Order_User` (`user_id`);
  
  --
  -- Indexes for table `order_details`
  --
  ALTER TABLE `order_details`
   ADD PRIMARY KEY (`order_detail_id`), ADD KEY `order_id` (`order_id`), ADD KEY `book_id` (`book_id`);
  
  --
  -- Indexes for table `publishers`
  --
  ALTER TABLE `publishers`
   ADD PRIMARY KEY (`publisher_id`);
  
  --
  -- Indexes for table `roles`
  --
  ALTER TABLE `roles`
   ADD PRIMARY KEY (`role_id`);
  
  --
  -- Indexes for table `users`
  --
  ALTER TABLE `users`
   ADD PRIMARY KEY (`user_id`), ADD UNIQUE KEY `username` (`user_name`), ADD UNIQUE KEY `user_mobile` (`user_mobile`);
  
  --
  -- Indexes for table `user_billing`
  --
  ALTER TABLE `user_billing`
   ADD PRIMARY KEY (`billing_id`), ADD KEY `User_Billing_User` (`billing_user_id`);
  
  --
  -- Indexes for table `user_roles`
  --
  ALTER TABLE `user_roles`
   ADD PRIMARY KEY (`role_id`,`user_id`);
  
  --
  -- AUTO_INCREMENT for dumped tables
  --
  
  --
  -- AUTO_INCREMENT for table `authors`
  --
  ALTER TABLE `authors`
  MODIFY `author_id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3;
  --
  -- AUTO_INCREMENT for table `books`
  --
  ALTER TABLE `books`
  MODIFY `book_id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=34;
  --
  -- AUTO_INCREMENT for table `book_author`
  --
  ALTER TABLE `book_author`
  MODIFY `Book_Author_ID` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=17;
  --
  -- AUTO_INCREMENT for table `book_genre`
  --
  ALTER TABLE `book_genre`
  MODIFY `book_genreid` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=4;
  --
  -- AUTO_INCREMENT for table `book_images`
  --
  ALTER TABLE `book_images`
  MODIFY `imageID` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=4;
  --
  -- AUTO_INCREMENT for table `countries`
  --
  ALTER TABLE `countries`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=247;
  --
  -- AUTO_INCREMENT for table `order`
  --
  ALTER TABLE `order`
  MODIFY `order_id` int(11) NOT NULL AUTO_INCREMENT;
  --
  -- AUTO_INCREMENT for table `order_details`
  --
  ALTER TABLE `order_details`
  MODIFY `order_detail_id` int(11) NOT NULL AUTO_INCREMENT;
  --
  -- AUTO_INCREMENT for table `publishers`
  --
  ALTER TABLE `publishers`
  MODIFY `publisher_id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3;
  --
  -- AUTO_INCREMENT for table `roles`
  --
  ALTER TABLE `roles`
  MODIFY `role_id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3;
  --
  -- AUTO_INCREMENT for table `users`
  --
  ALTER TABLE `users`
  MODIFY `user_id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=6;
  --
  -- AUTO_INCREMENT for table `user_billing`
  --
  ALTER TABLE `user_billing`
  MODIFY `billing_id` int(11) NOT NULL AUTO_INCREMENT;
  --
  -- Constraints for dumped tables
  --
  
  --
  -- Constraints for table `order_details`
  --
  ALTER TABLE `order_details`
  ADD CONSTRAINT `order_details_ibfk_1` FOREIGN KEY (`order_id`) REFERENCES `order` (`order_id`) ON UPDATE CASCADE,
  ADD CONSTRAINT `order_details_ibfk_2` FOREIGN KEY (`book_id`) REFERENCES `books` (`book_id`) ON UPDATE CASCADE;
  
  /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
  /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
  /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
  