You are in charge of creating a small database for a store that sells goods so...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
You are in charge of creating a small database for a store that sells goods so that it can keep track of its customers and their orders. a) Write an SQL statement to create a customer table containing the following information: • Every customer has a unique ID, that should not be empty and set as the primary key • The customer's first and last name that shouldn't be empty • The phone number that shouldn't be empty • The email, which could be empty. • The address, which could be empty. b) Write a SQL statement to create the table Orders, which will keep track of customer orders, using the following information: • Each order has a unique ID, which shouldn't be empty and should be set as the primary key. • The customer's ID and should not be empty and assign it as the foreign key of the customer ID in table customer. • The Items purchased by the customer and shouldn't be left empty. • The amount of each item, and should not be empty • The price of the items, and should not be empty You are in charge of creating a small database for a store that sells goods so that it can keep track of its customers and their orders. a) Write an SQL statement to create a customer table containing the following information: • Every customer has a unique ID, that should not be empty and set as the primary key • The customer's first and last name that shouldn't be empty • The phone number that shouldn't be empty • The email, which could be empty. • The address, which could be empty. b) Write a SQL statement to create the table Orders, which will keep track of customer orders, using the following information: • Each order has a unique ID, which shouldn't be empty and should be set as the primary key. • The customer's ID and should not be empty and assign it as the foreign key of the customer ID in table customer. • The Items purchased by the customer and shouldn't be left empty. • The amount of each item, and should not be empty • The price of the items, and should not be empty
Expert Answer:
Answer rating: 100% (QA)
Solution Certainly Here are the SQL statements to create the customer and orders tables as described ... View the full answer
Related Book For
Modern Database Management
ISBN: 978-0133544619
12th edition
Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi
Posted Date:
Students also viewed these databases questions
-
Given the functions defined by f(x) == 3 - x +3 and g(x) = 8x 3, calculate the following: (fog)(1)
-
List three specific parts of the Case Guide, Objectives and Strategy Section (See below) that you had the most difficulty understanding. Describe your current understanding of these parts. Provide...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Determine if the following strains satisfy the compatibility equations (2.6.2): a. b. c. where A, B and C are constants. Equation 2.6.2 ex=Ay, ey = ez = 0, exy = (Ax+Bz)/2, eyz = Bxz + Cy, ezx = C.x
-
For each of the states in Problem 12.55 find the dew point temperature.
-
Hindustan Petroleum Corporation Ltd. - Driving Change Through Internal Communication. Write SWOT Analysis and PESTLE.
-
Suppose that \(r=0, n=15\), and \(s_{y}=10\). Determine \(s\).
-
Autodesk Corporation produces toolboxes used by construction professionals and homeowners. The company is concerned that it does not have an understanding of its utility consumption. The companys...
-
= = = Standard Income Statement Financial Statements in CAD Dollars Using the numbers from the two income statements, fill in the percentages calculated for the common-sized vertical analysis, then...
-
Using the approach described in Example 10.6, classify first record in the worksheet Records to Classify in the Excel file Credit Risk Data using the k-NN algorithm for k = 1 to 5. Use only Checking,...
-
ABC Ltd commenced operations on 1 July 2019. On 30 June 2020, the company prepared its first statement of comprehensive income and its first statement of financial position. The statements were...
-
Take an advertisement from your local newspaper and argue that it is an offer.
-
Explain the difference between a mutual mistake and ambiguity.
-
Discuss the circumstances that would terminate a persons ability to accept a valid offer.
-
Give two examples of contracts of adhesion?
-
What are the individual characteristics that can prove instrumental in the recognition of opportunities? Are any of these characteristics necessary or sufficient for one to recognize an opportunity?
-
In the Multilevel Modelling, we analyzed the monetary decision for gym12. Lets now look at the implications of making yoga stretching mandatory for all new gyms. To do this, you would look at...
-
The following selected accounts and normal balances existed at year-end. Notice that expenses exceed revenue in this period. Make the four journal entries required to close the books: Accounts...
-
Explain how the volatility of a data warehouse is different from the volatility of a database for an operational information system.
-
If two queries involved in a UNION operation contained columns that were data type incompatible, how would you recommend fixing this?
-
For each product, display in ascending order, by product ID, the product ID and description, along with the customer ID and name for the customer who has bought the most of that product; also show...
-
W hat is diauxic growth? Explain the roles of cAMP and CAP in this process.
-
What is antisense RNA? How does it affect the translation of a complementary mRNA?
-
What are the functions of activator proteins and repressor proteins in transcription? Explain how these proteins work at the molecular level.
Study smarter with the SolutionInn App