Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

DO the full thing and send me a screenshot of the terminal and give me code that I can copy and paste please. I paid

image text in transcribed

DO the full thing and send me a screenshot of the terminal and give me code that I can copy and paste please. I paid a lot for this serivice

CRUD: Spring Cleaning *Always remember to create your table at the beginning of the file and to drop that table at the end of the file to avoid attempting to create duplicate tables* 1. In the MySQL shell, create a new database named shirts_db and use it i. i. 2. Create and name a new file '07.shirts.sql a. You bought a new closet. i. Create a table shirt_closet with the following information: shirt_id: the primary key, cannot be null, automatically increments article: name of the type of shirt, e.g. t-shirt, polo, etc. color: name of the color of the shirt shirt_size: abbreviation for a size last_worn: the number of whole days since the last time the shirt was worn b. You fill the closet with all your shirts. Bulk insert the following data into shirts: ('t-shirt', 'white', 'S', 10), ('t-shirt', 'green', 'S', 200), ('polo shirt', 'black', 'M', 10), (tank top', 'blue', 'S', 50), ('t-shirt', 'pink', 'S', 0), ('polo shirt', 'red', 'M', 5), ('tank top', 'white', 'S', 200), ('tank top', 'blue', 'M', 15) c. You open your closet and see all your shirts. Get all the data in shirts and print it (single line of code) d. You bought a "new" shirt and you put it in your closet. i. Add a new shirt: Purple polo shirt, size M last worn 50 days ago e. You're curious what kind of shirts you have in what color. Select all shirts, but only print out article and color f. You want to see why you bought certain shirts in size medium. i. Select all medium shirts and print out everything but shirt_id g. A pair of children were playing tug of war with only your polos... Update all polo shirts: change their size to L h. You wore a shirt. i. Update the shirt last worn 15 days ago: change last_worn to O i. You were impatient, so you just threw all your shirts in one cycle and cranked up the heat. i. Update all white shirts: change size to 'XS' and color to 'off white j. You decide to sell some old shirts. They're vintage now. i. Delete all old shirts, i.e. shirts last worn 200 days ago k. Something about tank tops is starting to make you mad. i. Delete all tank tops I. You just don't like shirts anymore. i. Delete all shirts m. Nor the closet. Drop the shirt_closet table

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

Step: 3

blur-text-image

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

Database In Depth Relational Theory For Practitioners

Authors: C.J. Date

1st Edition

0596100124, 978-0596100124

More Books

Students also viewed these Databases questions

Question

What are environmental controls? List and explain three examples.

Answered: 1 week ago

Question

Estimate the number of items in each photograph in Problems 3740.

Answered: 1 week ago