1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Volgvan
3 years ago
15

James River Jewelry is a small jewelry shop. While James River Jewelry does sell typical jewelry purchased form jewelry vendors,

including such items as rings, necklaces, earrings, and watches, it specializes in hard-to-find Asian jewelry. Although some Asian jewelry is manufactured jewelry purchased from vendors in the same manner as the standard jewelry is obtained, many of the Asian jewelry pieces are often unique single items purchased directly from the artisan who created the piece (the term "manufactured" would be an inappropriate description of these pieces). It has a small but loyal clientele, and it wants to further increase customer loyalty by creating a frequent buyer program. In this program, after every 10 purchases, a customer will receive a credit equal to 50 percent of the sum of his or her 10 most recent purchases. This credit must be applied to the next (or "11th") purchase. Assume that James River designs a database with the following tables. CUSTOMER (CustomerID, LastName, FirstName, Phone, Email) PURCHASE (InvoiceNumber, InvoiceDate, PreTaxAmount, CustomerID) PURCHASE_ITEM (InvoiceNumber, ItemNumber, RetailPrice) ITEM (ItemNumber, Description, Cost, ArtistName) The referential integrity constraints are: CustomerID in PURCHASE must exist in CustomerID in CUSTOMER InvoiceNumber in PURCHASE_ITEM must exist in InvoiceNumber in PURCHASE ItemNumber in PURCHASE_ITEM must exist in ItemNumber in ITEM Assume that CustomerID of CUSTOMER, ItemNumber of ITEM, InvoiceNumber of PURCHASE, and ItemNumber of PURCHASE_ITEM are all surrogate keys with values as follows: CustomerID Start at 1 Increment by 1 InvoiceNumber Start at 1 Increment by 1 ItemNumber Start at 1 Increment by 1 Write SQL statements and answer questions for this database as follows: A. Write SQL CREATE TABLE statements for each of these tables. B. Write foreign key constraints for the relationships in each of these tables. Make your own assumptions regarding cascading deletions and justify those assumptions. (Hint: You can combine the SQL for your answers to parts A and B.) C. Write SQL statements to insert at least three rows of data into each of these tables. Assume that surrogate key column values will be supplied by the DBMS. D. Write SQL statements to list all columns for all tables. E. Write an SQL statement to list ItemNumber and Description for all items that cost more than $100. F. Write an SQL statement to list ItemNumber and Description for all items that cost more than $100 and were produced by an artist with a last name ending with the letters son. G. Write an SQL statement to list LastName and FirstName of customers who have made at least one purchase with PreTaxAmount greater than $200. Use a subquery. H. Answer part G but use a join using JOIN…ON syntax. I. Write an SQL statement to list LastName and FirstName of customers who have purchased an item that costs more than $50. Use a subquery. J. Answer part I but use a join using JOIN…ON syntax K. Write an SQL statement to list LastName and FirstName of customers who have purchased an item that was created by an artist with a last name that begins with the letter J. Use a subquery. L. Answer part K but use a join using JOIN…ON syntax M. Write an SQL statement to show the Name and sum of PreTaxAmount for each customer using JOIN…ON syntax. N. Write an SQL statement to show the sum of PreTaxAmount for each artist (hint: the result will have only one line per each artist). Use a join using JOIN…ON syntax, and sort the results by ArtistLastName in ascending order. O. Write an SQL statement to show the sum of PreTaxAmount for each ArtistName but exclude any items that were part of purchases with PreTaxAmount less than $25. Use a join using JOIN…ON syntax, and sort the results by ArtistLastName in descending order. P. Write an SQL statement to show which customers bought which items, and include any items which have not been sold. Includes CUSTOMER.LastName, CUSTOMER.FIRSTName, InvoiceNumber, InvoiceDate, ItemNumber, ItemDescription, ArtistLastName, and ArtistFirstName. Use a join using JOIN…ON syntax, and sort the results by ArtistLastName and ArtistFirstName in ascending order. Q. Write an SQL statement to modify all ITEM rows with an artist last name of Baxter to an artist first name of Rex. R. Write SQL statements to switch the values of ArtistLastName so that all rows currently having the value Baker will have the value Baxter, and all rows currently having the value Baxter will have the value Baker.

Engineering
1 answer:
Sveta_85 [38]3 years ago
7 0

Answer:

This question is comprising many parts (a to r). That is impossible to answer in one sheet. Following are attached images having answers to most of the parts.

I hope it will help you a lot.

Explanation:

You might be interested in
A sheet of steel 3-mm thick has nitrogen atomospheres on both sides at 900 C and is permitted to achieve a steady-state di usion
kati45 [8]

Answer:

X_B = 1.8 \times 10^{-3} m = 1.8 mm

Explanation:

Given data:

Diffusion constant for nitrogen is = 1.85\times 10^{-10} m^2/s

Diffusion flux = 1.0\times 10^{-7} kg/m^2-s

concentration of nitrogen at high presuure = 2 kg/m^3

location on which nitrogen  concentration is 0.5 kg/m^3   ......?

from fick's first law

J = D \frac{C_A C_B}{X_A X_B}

Take C_A as point  on which nitrogen concentration is 2 kg/m^3

x_B = X_A + D\frac{C_A -C_B}{J}

Assume X_A is zero at the surface

X_B = 0 + ( 12\times 10^{-11} ) \frac{2-0.5}{1\times 10^{-7}}

X_B = 1.8 \times 10^{-3} m = 1.8 mm

4 0
3 years ago
Suppose a large amount of power is required. Which engine would you choose between Otto and Diesel? Why?
Firdavs [7]

Answer:

Otto engine

Explanation:

As we know that

Power = Torque x speed

So we can say that when speed of engine then power of engine also will increases.

The speed of Otto engine is more as compare to Diesel engine so the power of Otto engine is more.But on the other hand torque of Diesel engine is more as compare to Otto engine but the speed is low so the product of speed and torque is more for Otto engine .It means that when requires large amount of power then Otto engine should be use.

6 0
3 years ago
A book of the Law was found in the Temple, which was being repaired, during the___
grigory [225]

Answer:

2

Explanation:

5 0
3 years ago
Read 2 more answers
As a parent, you have a responsibility to ensure the safety of your family. Which of the safety concerns listed below would be c
Furkat [3]

Answer:

B and C

Explanation:

4 0
3 years ago
The "divide and average" method, an old-time method for approximating the square root of any positive number a, can be formulate
Shalnov [3]

Answer:

<u>note:</u>

find the attachment:

4 0
3 years ago
Other questions:
  • A steel bolt has a modulus of 207 GPa. It holds two rigid plates together at a high temperature under conditions where the creep
    5·1 answer
  • A piston cylinder assembly fitted with a slowly rotating paddle wheel contains 0.13 kg of air at 300K. The air undergoes a const
    10·1 answer
  • A household refrigerator that has a power input of 450 W and a COP of 1.5 is to cool 5 large watermelons, 10 kg each, to 8 C. If
    7·1 answer
  • What does carbon addition to iron do, what does it produce, how does it change properties, what are its reflections? Describe in
    12·1 answer
  • Consider five wireless stations A,B,C,D,E. Station
    5·2 answers
  • For the following three (3) questions, assume that the link layer uses the flag bytes with byte stuffing approach for framing, w
    15·1 answer
  • The drag coefficient of a vehicle increases when its windows are rolled down or its sunroof is opened. A sports car has a fronta
    13·2 answers
  • 1. Asphyxiation is a hazard posed by Compressed Natural Gas (CNG) vehicles and can be detected when you notice
    7·1 answer
  • You’re going to write a program that models the Littleton City Lotto (not a real Lotto game). The program is going to allow to u
    6·1 answer
  • Hello how are you all bye everyone have a great day ahead​
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!