1. Using MySQL Workbench, create a new database names Sales (ensure that the database does not...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
1. Using MySQL Workbench, create a new database names Sales (ensure that the database does not already exist and remember to refresh your SCHEMA). 2. Using the newly created Sales database, create a new table named customer with the following fields & properties: a. customer_id integer b. first name varchar (255) c. last_name varchar(255) d. email_address varchar(255) number_of_complaints integer e. 3. Perform a Select for all entries, did you find any data? 4. Now, create a second table named sale, you will need to create one column, call it sale_id varchar(255) primary key. 5. Refresh your schema list to ensure that the table was created [screen shot| here!] 6. Remove (use Drop) the table named sale 7. Drop the table named customer 8. re-add the customer table this time including the primary key constraint (customer_id) 9. Then, create the items table with the primary key constraint item_code item_code - VARCHAR of 255, item - VARCHAR of 255, unit_price-NUMERIC of 10 and 2, company_id - VARCHAR of 255 10. Create the companies table with the primary key constraint company_id company_id - VARCHAR of 255, company_name - VARCHAR of 255, headquarters_phone_number - integer 1. Using MySQL Workbench, create a new database names Sales (ensure that the database does not already exist and remember to refresh your SCHEMA). 2. Using the newly created Sales database, create a new table named customer with the following fields & properties: a. customer_id integer b. first name varchar (255) c. last_name varchar(255) d. email_address varchar(255) number_of_complaints integer e. 3. Perform a Select for all entries, did you find any data? 4. Now, create a second table named sale, you will need to create one column, call it sale_id varchar(255) primary key. 5. Refresh your schema list to ensure that the table was created [screen shot| here!] 6. Remove (use Drop) the table named sale 7. Drop the table named customer 8. re-add the customer table this time including the primary key constraint (customer_id) 9. Then, create the items table with the primary key constraint item_code item_code - VARCHAR of 255, item - VARCHAR of 255, unit_price-NUMERIC of 10 and 2, company_id - VARCHAR of 255 10. Create the companies table with the primary key constraint company_id company_id - VARCHAR of 255, company_name - VARCHAR of 255, headquarters_phone_number - integer
Expert Answer:
Answer rating: 100% (QA)
Solution 1 To create a new database use the CREATE DATABASE statement CREATE DATABASE IF NOT EXISTS Sales To avoid an error in case you accidentally c... View the full answer
Related Book For
Database Systems Design Implementation and Management
ISBN: 978-1285196145
11th edition
Authors: Carlos Coronel, Steven Morris
Posted Date:
Students also viewed these electrical engineering questions
-
1. Create a new database and name it Baseball Gear. 2. Include in the Baseball Gear database a table (entity) for Customer, Order, Order Line Item, and Item. 3. For each table (entity) created...
-
How do you create a new database in MySQL?
-
How do you create a new database in SQL Server 2014?
-
For the following 28 scores on a 40-point test, a. Construct a bar graph using 4-point score intervals and b. Draw a frequency curve using 4-point score intervals. 27 24 21 36 25 25 38 27 25 17 31 20...
-
Bangers, Inc. is a start-up manufacturer of Australian-style frozen veggie pies located in San Antonio, Texas. The company is five years old and recently installed the manufacturing capacity to...
-
In 1939 or 1940, Emanuel Zucchini took his human-cannonball act to an extreme: After being shot from a cannon, he soared over three Ferris wheels and into a net (Fig. 4.42) (a) Treating him as a...
-
Unless otherwise specified, which rule will always be processed?
-
1. Would Lyles claim of racial discrimination be for intentional (disparate-treatment) or unintentional (disparate-impact) discrimination? Explain. 2. Can Lyle establish a prima facie case of racial...
-
Figure 1 shows a flowchart of nested if. Produce a java programming code segment of the flowchart. Start False True True Fine=0.00 Speed-110 Speed 120 Fine - 120 True Figure 1 False True Speed <130...
-
Use Mark Gilley's FlashCard statement. There is an error in his bill. The average daily balance, finance charge, available credit, and new balance amounts are not filled in. You can find a copy of...
-
QUESTION 4 Your friend, Tyler, has had a bad year with investments. First, he sold stock in a company that was rapidly going downhill. Tyler's loss on the stock was $10,000. Then, a limited...
-
John Wick needs to have $47,000 in 7 years. If he plans to start investing next month, what is the amount that he will have to invest every month for the next 7 years ? John can earn 6.4 per cent per...
-
Why should closed-ended questions be limited they limit the client's answers to one or two words. they may only give you the facts. the practitioner may miss gathering important information. the...
-
List five items that you should consider for the product launch decision. Characterize each item as to whether it is a cost or benefit, whether it is financial or nonfinancial in nature and if it is...
-
I am doing step by step instructions for an assignment on how to create a budget in excel. I have 10-15 steps and one has to be a step with a "caution or warning" statement, what are some ideas that...
-
The Constance Corporations inventory at December 31, 2021, was $133,000 (at cost) based on a physical count of inventory on hand, before any necessary adjustment for the following: Merchandise...
-
The front wheel of a tricycle has a circumference of 56 inches, and the back wheels have a circumference of 24 inches. If points P and Q are both touching the sidewalk when Felicity starts to ride,...
-
On January 1, 2017, McIlroy, Inc., acquired a 60 percent interest in the common stock of Stinson, Inc., for $340,200. Stinson's book value on that date consisted of common stock of $100,000 and...
-
Explain the difference between an ORDER BY clause and a GROUP BY clause.
-
Describe the type(s) of relationship(s) between EMPLOYEE and STORE.
-
What is logical independence?
-
This question is an extension of Exercise 10.22. Consider the data file \(m r o z\) on working wives and the model \(\ln (W A G E)=\beta_{1}+\beta_{2} E D U C+\beta_{3} E X P E R+e\). Use the 428...
-
Consider the data file \(m r o z\) on working wives. Use the 428 observations on married women who participate in the labor force. In this exercise, we examine the effectiveness of alternative...
-
To examine the quantity theory of money, Brumm (2005) ["Money Growth, Output Growth, and Inflation: A Reexamination of the Modern Quantity Theory's Linchpin Prediction," Southern Economic Journal,...
Study smarter with the SolutionInn App