MySQL */ CREATE TABLE AGENT ( AGENT_CODE int, AGENT_LNAME varchar(15), AGENT_FNAME varchar(15), AGENT_INITIAL varchar(1), AGENT_AREACODE varchar(3), AGENT_PHONE varchar(8), AGENT_ADDRESS varchar(30), AGENT_CITY varchar(15), AGENT_STATE varchar(2), AGENT_ZIP varchar(5), AGENT_DATE_HIRED datetime, AGENT_YTD_PAY numeric, AGENT_YTD_FIT numeric, AGENT_YTD_FICA numeric, AGENT_YTD_SLS numeric, AGENT_DEP int ) ENGINE = InnoDB; INSERT INTO AGENT VALUES('501','Alby','Alex','B','713', '228-1249','123 Pleasant View Dr.','Nashville','TN','37119', '2000-11-1','26566.24','6641.56','2125.3','132735.75','3'); INSERT INTO AGENT VALUES('502','Hahn','Leah','F','615', '882-1244','334 East Main Street','Louisville','KY','25246', '1986-5-23','32213.76','8053.44','2577.1','138967.35','0'); INSERT INTO AGENT VALUES('503',' Okon','John','T','615', '123-5589','452 Technology Circle','Oak Ridge','TN','36155', '2005-6-15','23198.29','5799.57','1855.86','127093.45','2'); CREATE TABLE CUSTOMER ( CUS_CODE integer, CUS_LNAME varchar(15), CUS_FNAME varchar(15), CUS_INITIAL varchar(1), CUS_AREACODE varchar(3), CUS_PHONE varchar(8), CUS_RENEW_DATE datetime, AGENT_CODE integer ) ENGINE = InnoDB; INSERT INTO CUSTOMER VALUES('10010','Ramas','Alfred','A','615','844-2573','2018-4-5','502'); INSERT INTO CUSTOMER VALUES('10011','Dunne','Leona','K','713','894-1238','2018-6-16','501'); INSERT INTO CUSTOMER VALUES('10012','Smith','Kathy','W','615','894-2285','2019-1-29','502'); INSERT INTO CUSTOMER VALUES('10013','Olowski','Paul','F','615','894-2180','2018-10-14','502'); INSERT INTO CUSTOMER VALUES('10014','Orlando','Myron','','615','222-1672','2019-12-28','501'); INSERT INTO CUSTOMER VALUES('10015','O''Brian','Amy','B','713','442-3381','2018-9-22','503'); INSERT INTO CUSTOMER VALUES('10016','Brown','James','G','615','297-1228','2019-3-25','502'); INSERT INTO CUSTOMER VALUES('10017','Williams','George','','615','290-2556','2018-7-17','503'); INSERT INTO CUSTOMER VALUES('10018','Farriss','Anne','G','713','382-7185','2018-12-3','501'); INSERT INTO CUSTOMER VALUES('10019','Smith','Olette','K','615','297-3809','2019-3-14','503');SaleCo/* Database Systems, Coronel/Morris */ /* Type of SQL : MySQL */ CREATE TABLE CUSTOMER ( CUS_CODE integer, CUS_LNAME varchar(15), CUS_FNAME varchar(15), CUS_INITIAL varchar(1), CUS_AREACODE varchar(3), CUS_PHONE varchar(8) ); INSERT INTO CUSTOMER VALUES('10010','Ramas','Alfred','A','615','844-2573'); INSERT INTO CUSTOMER VALUES('10011','Dunne','Leona','K','713','894-1238'); INSERT INTO CUSTOMER VALUES('10012','Smith','Kathy','W','615','894-2285'); INSERT INTO CUSTOMER VALUES('10013','Olowski','Paul','F','615','894-2180'); INSERT INTO CUSTOMER VALUES('10014','Orlando','Myron','','615','222-1672'); INSERT INTO CUSTOMER VALUES('10015','O''Brian','Amy','B','713','442-3381'); INSERT INTO CUSTOMER VALUES('10016','Brown','James','G','615','297-1228'); INSERT INTO CUSTOMER VALUES('10017','Williams','George','','615','290-2556'); INSERT INTO CUSTOMER VALUES('10018','Farriss','Anne','G','713','382-7185'); INSERT INTO CUSTOMER VALUES('10019','Smith','Olette','K','615','297-3809'); /* -- */ CREATE TABLE INVOICE ( INV_NUMBER int, CUS_CODE int, INV_DATE datetime ); INSERT INTO INVOICE VALUES('1001','10014','2018-3-8'); INSERT INTO INVOICE VALUES('1002','10011','2018-3-8'); INSERT INTO INVOICE VALUES('1003','10012','2018-3-8'); INSERT INTO INVOICE VALUES('1004','10011','2018-3-9'); /* -- */ CREATE TABLE LINE ( INV_NUMBER int, LINE_NUMBER int, PROD_CODE varchar(10), LINE_UNITS float(8), LINE_PRICE numeric );
MySQL */ CREATE TABLE AGENT ( AGENT_CODE int, AGENT_LNAME varchar(15), AGENT_FNAME varchar(15), AGENT_INITIAL varchar(1), AGENT_AREACODE varchar(3), AGENT_PHONE varchar(8), AGENT_ADDRESS varchar(30), AGENT_CITY varchar(15), AGENT_STATE varchar(2), AGENT_ZIP varchar(5), AGENT_DATE_HIRED datetime, AGENT_YTD_PAY numeric, AGENT_YTD_FIT numeric, AGENT_YTD_FICA numeric, AGENT_YTD_SLS numeric, AGENT_DEP int ) ENGINE = InnoDB; INSERT INTO AGENT VALUES('501','Alby','Alex','B','713', '228-1249','123 Pleasant View Dr.','Nashville','TN','37119', '2000-11-1','26566.24','6641.56','2125.3','132735.75','3'); INSERT INTO AGENT VALUES('502','Hahn','Leah','F','615', '882-1244','334 East Main Street','Louisville','KY','25246', '1986-5-23','32213.76','8053.44','2577.1','138967.35','0'); INSERT INTO AGENT VALUES('503',' Okon','John','T','615', '123-5589','452 Technology Circle','Oak Ridge','TN','36155', '2005-6-15','23198.29','5799.57','1855.86','127093.45','2'); CREATE TABLE CUSTOMER ( CUS_CODE integer, CUS_LNAME varchar(15), CUS_FNAME varchar(15), CUS_INITIAL varchar(1), CUS_AREACODE varchar(3), CUS_PHONE varchar(8), CUS_RENEW_DATE datetime, AGENT_CODE integer ) ENGINE = InnoDB; INSERT INTO CUSTOMER VALUES('10010','Ramas','Alfred','A','615','844-2573','2018-4-5','502'); INSERT INTO CUSTOMER VALUES('10011','Dunne','Leona','K','713','894-1238','2018-6-16','501'); INSERT INTO CUSTOMER VALUES('10012','Smith','Kathy','W','615','894-2285','2019-1-29','502'); INSERT INTO CUSTOMER VALUES('10013','Olowski','Paul','F','615','894-2180','2018-10-14','502'); INSERT INTO CUSTOMER VALUES('10014','Orlando','Myron','','615','222-1672','2019-12-28','501'); INSERT INTO CUSTOMER VALUES('10015','O''Brian','Amy','B','713','442-3381','2018-9-22','503'); INSERT INTO CUSTOMER VALUES('10016','Brown','James','G','615','297-1228','2019-3-25','502'); INSERT INTO CUSTOMER VALUES('10017','Williams','George','','615','290-2556','2018-7-17','503'); INSERT INTO CUSTOMER VALUES('10018','Farriss','Anne','G','713','382-7185','2018-12-3','501'); INSERT INTO CUSTOMER VALUES('10019','Smith','Olette','K','615','297-3809','2019-3-14','503');SaleCo/* Database Systems, Coronel/Morris */ /* Type of SQL : MySQL */ CREATE TABLE CUSTOMER ( CUS_CODE integer, CUS_LNAME varchar(15), CUS_FNAME varchar(15), CUS_INITIAL varchar(1), CUS_AREACODE varchar(3), CUS_PHONE varchar(8) ); INSERT INTO CUSTOMER VALUES('10010','Ramas','Alfred','A','615','844-2573'); INSERT INTO CUSTOMER VALUES('10011','Dunne','Leona','K','713','894-1238'); INSERT INTO CUSTOMER VALUES('10012','Smith','Kathy','W','615','894-2285'); INSERT INTO CUSTOMER VALUES('10013','Olowski','Paul','F','615','894-2180'); INSERT INTO CUSTOMER VALUES('10014','Orlando','Myron','','615','222-1672'); INSERT INTO CUSTOMER VALUES('10015','O''Brian','Amy','B','713','442-3381'); INSERT INTO CUSTOMER VALUES('10016','Brown','James','G','615','297-1228'); INSERT INTO CUSTOMER VALUES('10017','Williams','George','','615','290-2556'); INSERT INTO CUSTOMER VALUES('10018','Farriss','Anne','G','713','382-7185'); INSERT INTO CUSTOMER VALUES('10019','Smith','Olette','K','615','297-3809'); /* -- */ CREATE TABLE INVOICE ( INV_NUMBER int, CUS_CODE int, INV_DATE datetime ); INSERT INTO INVOICE VALUES('1001','10014','2018-3-8'); INSERT INTO INVOICE VALUES('1002','10011','2018-3-8'); INSERT INTO INVOICE VALUES('1003','10012','2018-3-8'); INSERT INTO INVOICE VALUES('1004','10011','2018-3-9'); /* -- */ CREATE TABLE LINE ( INV_NUMBER int, LINE_NUMBER int, PROD_CODE varchar(10), LINE_UNITS float(8), LINE_PRICE numeric );
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
Please help me with the solution:
MySQL */ CREATE TABLE AGENT ( AGENT_CODE int, AGENT_LNAME varchar(15), AGENT_FNAME varchar(15), AGENT_INITIAL varchar(1), AGENT_AREACODE varchar(3), AGENT_PHONE varchar(8), AGENT_ADDRESS varchar(30), AGENT_CITY varchar(15), AGENT_STATE varchar(2), AGENT_ZIP varchar(5), AGENT_DATE_HIRED datetime, AGENT_YTD_PAY numeric, AGENT_YTD_FIT numeric, AGENT_YTD_FICA numeric, AGENT_YTD_SLS numeric, AGENT_DEP int ) ENGINE = InnoDB; INSERT INTO AGENT VALUES('501','Alby','Alex','B','713', '228-1249','123 Pleasant View Dr.','Nashville','TN','37119', '2000-11-1','26566.24','6641.56','2125.3','132735.75','3'); INSERT INTO AGENT VALUES('502','Hahn','Leah','F','615', '882-1244','334 East Main Street','Louisville','KY','25246', '1986-5-23','32213.76','8053.44','2577.1','138967.35','0'); INSERT INTO AGENT VALUES('503',' Okon','John','T','615', '123-5589','452 Technology Circle','Oak Ridge','TN','36155', '2005-6-15','23198.29','5799.57','1855.86','127093.45','2'); CREATE TABLE CUSTOMER ( CUS_CODE integer, CUS_LNAME varchar(15), CUS_FNAME varchar(15), CUS_INITIAL varchar(1), CUS_AREACODE varchar(3), CUS_PHONE varchar(8), CUS_RENEW_DATE datetime, AGENT_CODE integer ) ENGINE = InnoDB; INSERT INTO CUSTOMER VALUES('10010','Ramas','Alfred','A','615','844-2573','2018-4-5','502'); INSERT INTO CUSTOMER VALUES('10011','Dunne','Leona','K','713','894-1238','2018-6-16','501'); INSERT INTO CUSTOMER VALUES('10012','Smith','Kathy','W','615','894-2285','2019-1-29','502'); INSERT INTO CUSTOMER VALUES('10013','Olowski','Paul','F','615','894-2180','2018-10-14','502'); INSERT INTO CUSTOMER VALUES('10014','Orlando','Myron','','615','222-1672','2019-12-28','501'); INSERT INTO CUSTOMER VALUES('10015','O''Brian','Amy','B','713','442-3381','2018-9-22','503'); INSERT INTO CUSTOMER VALUES('10016','Brown','James','G','615','297-1228','2019-3-25','502'); INSERT INTO CUSTOMER VALUES('10017','Williams','George','','615','290-2556','2018-7-17','503'); INSERT INTO CUSTOMER VALUES('10018','Farriss','Anne','G','713','382-7185','2018-12-3','501'); INSERT INTO CUSTOMER VALUES('10019','Smith','Olette','K','615','297-3809','2019-3-14','503');SaleCo/* Database Systems, Coronel/Morris */ /* Type of SQL : MySQL */ CREATE TABLE CUSTOMER ( CUS_CODE integer, CUS_LNAME varchar(15), CUS_FNAME varchar(15), CUS_INITIAL varchar(1), CUS_AREACODE varchar(3), CUS_PHONE varchar(8) ); INSERT INTO CUSTOMER VALUES('10010','Ramas','Alfred','A','615','844-2573'); INSERT INTO CUSTOMER VALUES('10011','Dunne','Leona','K','713','894-1238'); INSERT INTO CUSTOMER VALUES('10012','Smith','Kathy','W','615','894-2285'); INSERT INTO CUSTOMER VALUES('10013','Olowski','Paul','F','615','894-2180'); INSERT INTO CUSTOMER VALUES('10014','Orlando','Myron','','615','222-1672'); INSERT INTO CUSTOMER VALUES('10015','O''Brian','Amy','B','713','442-3381'); INSERT INTO CUSTOMER VALUES('10016','Brown','James','G','615','297-1228'); INSERT INTO CUSTOMER VALUES('10017','Williams','George','','615','290-2556'); INSERT INTO CUSTOMER VALUES('10018','Farriss','Anne','G','713','382-7185'); INSERT INTO CUSTOMER VALUES('10019','Smith','Olette','K','615','297-3809'); /* -- */ CREATE TABLE INVOICE ( INV_NUMBER int, CUS_CODE int, INV_DATE datetime ); INSERT INTO INVOICE VALUES('1001','10014','2018-3-8'); INSERT INTO INVOICE VALUES('1002','10011','2018-3-8'); INSERT INTO INVOICE VALUES('1003','10012','2018-3-8'); INSERT INTO INVOICE VALUES('1004','10011','2018-3-9'); /* -- */ CREATE TABLE LINE ( INV_NUMBER int, LINE_NUMBER int, PROD_CODE varchar(10), LINE_UNITS float(8), LINE_PRICE numeric );
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 5 steps with 5 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education