Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please use the provided tables below: customer zip 28210 TABLES: customers customer id customer name customer-add 1000 Cora Blanca 1555 Seminole Ct 1100 Yash Reed

Please use the provided tables below:

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

customer zip 28210 TABLES: customers customer id customer name customer-add 1000 Cora Blanca 1555 Seminole Ct 1100 Yash Reed 878 Madison Ave. 1200 John Mills 4200 Olive Ave. 1300 David Cox 608 Old Post Rd. 1400 Tina Evans 235 Easton Ave. 1500 Will Allen 2508 W. Shaw Rd. 1600 James Boyd 200 Pembury Ln. 1700 Will Parsons 4990 S. Pine St. 1800 Walter Kelly 1200 Little St. 1900 Ann Damian 7822 N. Ridge Rd. 2000 Grace Hull 4090Caldweld St. 2100 Jane Brown 3320 W. Main St. 2200 Betty Draper 1600 Sardis Rd. customer state NC NC SC GA FL NC 27407 29206 30030 customer city Charlotte Greensboro Columbia Decatur Jacksonville Raleigh Columbia Raleigh Columbia Jacksonville Charlotte Charlotte Sarasota customer phone 704/552.1810 336/316-5434 803/432.6225 404/243.7379 904/992-7234 919/809.2545 803/432-7600 919/355/0034 803/432-1987 904/725-4672 704/365.7655 704/372/9000 918/941-9121 SC 32221 27542 29206 27545 29206 32216 28205 NC SC FL NC NC 28210 32441 FL unit price 46.80 items item_id 100 200 300 350 400 Title Under the Sun Dark Lady Happy Days Top of the Mountain Streets from Old The Hunt Rainbow Row Skies Above The Seas and Moon Greek Isles artist Donald Arley Keith Morris Andrea Reid Janice Jones Sharon Brune Walter Alford Judy Ford Alexander Wilson Susan Beeler Benjamin Caudle on hand 340 250 210 290 320 450 120.99 78.00 110.00 123.00 39.99 46.00 98.00 67.81 76.00 600 700 800 850 390 350 275 235 300 orders order_id 1 2 customer id 1200 1500 1500 2100 1600 3 4 5 6 1900 7 2200 order date 2013-10-23 2013-10-30 2013-11-09 2013-11-15 2013-11-15 2013-12-15 2013-12-18 2013-12-20 2014-01-18 2014-01-31 2014-02-01 2014-02-27 2014-03-10 2014-03-14 ship_date 2013-10-28 2013-11-03 2013-11-14 2013-11-20 2013-11-20 2013-12-19 2013-12-22 2013-12-22 2014-01-23 2014-02-04 2014-02-06 2014-03-02 2014-03-15 2014-03-19 1600 8 9 1000 10 11 2200 1500 1400 1100 12 13 14 1400 orderline order_id 1 1 2 2 3 4 4 4 5 6 7 7 8 9 10 10 10 11 12 12 13 13 13 14 item id 800 600 700 300 850 200 100 850 450 800 300 600 100 100 450 600 200 700 300 700 200 600 450 700 200 800 450 order qty 2 1 3 2 1 4 1 1 1 2 2 2 1 3 6 8 4 GN 2 10 4 8 6 14 14 NA Pretty Prints III Assignment Description: In this assignment, a script file should be created to contain a set a SQL statements for the Pretty Prints Company to better manage their business. Use the database created for Pretty Prints in Assignment 2. Include the SQL statements to satisfy the following queries. The following queries should be included in the script: 1. Create a view named Under_100. It consists of the item_id, title, artist, unit_price and order_qty for every print with a unit_price under 100 dollars. 2. Create a view named Allen. It consists of the customer_id, customer_name, customer_phone, title, and artist of each print ordered. 3. Create a view named orders. It consists of the item_id, title, artist, unit_price and order_qty for every print ordered in the range of 2014-01-01 and 2014-02-28. 4. Create a view named zip_27. It consists of the customer_name, customer_phone, title, artist and date_shipped of each print ordered by a customer whose zip code begins with 27. 5. Create the following indexes. Use the indicated index name. a. Create an index named customer_id on the customer_id field in the customers table. b. Create an index named name on the customer_name field in the customers table. c. Create an index named shipped on the customer_id and ship_date in the orders table. 6. Drop the name index. 7. Specify the integrity constraint that the unit_price of any print must be more than $35. 8. Create the following foreign keys within the prints database. a. customer_id is a foreign key in the orders table. b. Item_id is a foreign key in the orderline table. 9. Add to the items table a new character field named type that is one character in length. 10. Change the type field in the items table to M for the print titled Skies Above. 11. Change the length of the artist field in the items table to 30. 12. What command would you use to delete the orders table from the prints database? (Do not delete the orders table.) REQUIREMENTS: Each student must work independently on this assignment. No group work is allowed. Submit completed work into Canvas. Take a screenshot of the submission verification in the event you need proof of submission

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Practical Database Programming With Visual C# .NET

Authors: Ying Bai

1st Edition

0470467274, 978-0470467275

More Books

Students also viewed these Databases questions

Question

Dont use metrics to appraise individuals.

Answered: 1 week ago

Question

4. Explain the characteristics of successful mentoring programs.

Answered: 1 week ago