The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Apr 2017 |
| Last Sign in: | 327 Weeks Ago, 5 Days Ago |
| Questions Answered: | 12843 |
| Tutorials Posted: | 12834 |
MBA, Ph.D in Management
Harvard university
Feb-1997 - Aug-2003
Professor
Strayer University
Jan-2007 - Present
I have a few my SQL Workbench questions I am having a hard time with and was needing some help. I do need this done by around 6 PM EST. 3/9/2017. I will attach the sql file as well as a PDF of the questions. If you have any questions please ask.Â
Â
file:///I:/pics/CH11and12Exercise.pdf
Â
/********************************************************* This script creates the database named my_guitar_shop*********************************************************/DROP DATABASE IF EXISTS my_guitar_shop;CREATE DATABASE my_guitar_shop;USE my_guitar_shop;-- create the tables for the databaseCREATE TABLE categories (category_idINTPRIMARY KEYAUTO_INCREMENT,category_nameVARCHAR(255)NOT NULLUNIQUE);CREATE TABLE products (product_idINTPRIMARY KEYAUTO_INCREMENT,category_idINTNOT NULL,product_codeVARCHAR(10)NOT NULLUNIQUE,product_nameVARCHAR(255)NOT NULL,descriptionTEXTNOT NULL,list_priceDECIMAL(10,2)NOT NULL,discount_percentDECIMAL(10,2)NOT NULLDEFAULT 0.00,date_addedDATETIMEDEFAULT NULL,CONSTRAINT products_fk_categoriesFOREIGN KEY (category_id)REFERENCES categories (category_id));CREATE TABLE customers (customer_idINTPRIMARY KEYAUTO_INCREMENT,email_addressVARCHAR(255)NOT NULLUNIQUE,passwordVARCHAR(60)NOT NULL,first_nameVARCHAR(60)NOT NULL,last_nameVARCHAR(60)NOT NULL,shipping_address_idINTDEFAULT NULL,billing_address_idINTDEFAULT NULL);CREATE TABLE addresses (address_idINTPRIMARY KEYAUTO_INCREMENT,customer_idINTNOT NULL,line1VARCHAR(60)NOT NULL,line2VARCHAR(60)DEFAULT NULL,cityVARCHAR(40)NOT NULL,stateVARCHAR(2)NOT NULL,zip_codeVARCHAR(10)NOT NULL,phoneVARCHAR(12)NOT NULL,disabledTINYINT(1)NOT NULLDEFAULT 0,CONSTRAINT addresses_fk_customersFOREIGN KEY (customer_id)REFERENCES customers (customer_id));CREATE TABLE orders (order_idINTPRIMARY KEYAUTO_INCREMENT,customer_idINTNOT NULL,order_dateDATETIMENOT NULL,ship_amountDECIMAL(10,2)NOT NULL,tax_amountDECIMAL(10,2)NOT NULL,ship_dateDATETIMEDEFAULT NULL,ship_address_idINTNOT NULL,card_typeVARCHAR(50)NOT NULL,card_numberCHAR(16)NOT NULL,card_expiresCHAR(7)NOT NULL,