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
Write the following decorators and apply them to a single function (applying multiple decorators to a single function): 1. The f
natita [175]

Answer:

Complete question is:

write the following decorators and apply them to a single function (applying multiple decorators to a single function):

1. The first decorator is called strong and has an inner function called wrapper. The purpose of this decorator is to add the html tags of <strong> and </strong> to the argument of the decorator. The return value of the wrapper should look like: return “<strong>” + func() + “</strong>”

2. The decorator will return the wrapper per usual.

3. The second decorator is called emphasis and has an inner function called wrapper. The purpose of this decorator is to add the html tags of <em> and </em> to the argument of the decorator similar to step 1. The return value of the wrapper should look like: return “<em>” + func() + “</em>.

4. Use the greetings() function in problem 1 as the decorated function that simply prints “Hello”.

5. Apply both decorators (by @ operator to greetings()).

6. Invoke the greetings() function and capture the result.

Code :

def strong_decorator(func):

def func_wrapper(name):

return "<strong>{0}</strong>".format(func(name))

return func_wrapper

def em_decorator(func):

def func_wrapper(name):

return "<em>{0}</em>".format(func(name))

return func_wrapper

@strong_decorator

@em_decorator

def Greetings(name):

return "{0}".format(name)

print(Greetings("Hello"))

Explanation:

5 0
3 years ago
The welding method that requires the operator to observe and only make corrections is
SVEN [57.7K]
Automatic manual semiautomatic
3 0
3 years ago
Read 2 more answers
Find the mechanical average of a wheel axle System of the wheel has a radius of 1.5 feet in the accident has a radius of 6 inche
kvasek [131]

Answer:

Mechanical average of a wheel = 3

Explanation:

Given:

Radius of wheel = 1.5 ft = 1.5 x 12 = 18 inches

Radius of axle = 6 inches

Find:

Mechanical average of a wheel

Computation:

Mechanical average of a wheel = Radius of wheel / Radius of axle

Mechanical average of a wheel = 18 / 6

Mechanical average of a wheel = 3

4 0
3 years ago
In Process Costing, the journal entry to record the cost of goods transferred out from the WIP shaping department to the WIP pac
ddd [48]

Answer:

Journal entry :

Date Account and explanation Debit credit

                WIP-Packing department XXX  

                WIP-Shaping department            XXX

(To record cost of goods transferred out from the WIP shaping department to the WIP packaging department )  

So above statement is False

Explanation:

4 0
3 years ago
When Ontario
Marat540 [252]

Answer:

Explanation:

This will be possible when setting them up in summer with a certain quantity of sag, they have already know that the cables won't be able to sag any further because of the heat. During winter, when the cables contract because of the cold weather, the sag will therefore be reduced, but much tension will not be put on the cables.

4 0
3 years ago
Other questions:
  • A metallic material with yield stress of 140 MPa and cross section of 300 mm x 100 mm, is subjected to a tensile force of 8.00 M
    12·1 answer
  • What steps would you take to design an improved toothpaste container?
    12·1 answer
  • During an experiment conducted in a room at 25°C, a laboratory assistant measures that a refrigerator that draws 2 kW of power h
    13·1 answer
  • A 230 V shunt motor has a nominal armature current of 60 A. If the armature resistance is 0.15 ohm, calculate the following: a.
    5·1 answer
  • Which scientist was famous for his laws on gravity?
    10·2 answers
  • Which permission do you need to shoot on the owner’s property?
    8·1 answer
  • 1. In order for a team to accomplish its goal(s), it is NOT important for the team members to
    14·2 answers
  • A front wheel drive vehicle with four wheel disc brakes is pulling to the left. Tech A says an external kink or internal restric
    13·1 answer
  • Please look at the attachments and help me with these questions
    7·1 answer
  • A 75-hp motor that has an efficiency of 91.0% is worn-out and is replaced by a motor that has a high efficiency 75-hp motor that
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!