Here are the schema and insert statements for create databa…
Here are the schema and insert statements for create database store; use store;create table suppliers( sid integer primary key, sname varchar(50), address varchar(50) );create table parts( pid integer primary key, pname varchar(40), color varchar(15) );create table catalog( sid integer, pid integer, cost integer, primary key(sid,pid), foreign key(sid) references suppliers(sid), foreign key(pid) references parts (pid) ); Some sample data for the tables are given below insert into suppliers values (sid, sname, address) (1, ‘Acme Widget Suppliers’, ‘1 Grub St., Potemkin Village, IL 61801’),(2, ‘Big Red Tool and Die’, ‘4 My Way, Bermuda Shorts, OR 90305’),(3, ‘Perfunctory Parts’, ‘99999 Short Pier, Terra Del Fuego, TX 41299’),(4, ‘Alien Aircaft Inc.’, ‘2 Groom Lake, Rachel, NV 51902’); insert into parts values (pid, pname, color)(1, ‘Left Handed Bacon Stretcher Cover’, ‘Red’),(2, ‘Smoke Shifter End’, ‘Black’),(3, ‘Acme Widget Washer’, ‘Red’),(4, ‘Acme Widget Washer’, ‘Silver’),(5, ‘I Brake for Crop Circles Sticker’, ‘Translucent’),(6, ‘Anti-Gravity Turbine Generator’, ‘Cyan’),(7, ‘Anti-Gravity Turbine Generator’, ‘Magenta’),(8, ‘Fire Hydrant Cap’, ‘Red’),(9, ‘7 Segment Display’, ‘Green’); insert into catalog values (sid, pid, cost) (1, 3, 0.50),(1, 4, 0.50),(1, 8, 11.70),(2, 3, 0.55),(2, 8, 7.95),(2, 1, 16.50),(4, 8, 12.50),(2, 9, 1.00),(4, 5, 2.20),(4, 6, 1247548.23),(4, 7, 1247548.23); (Please use functionality supported by MySQL only) (a) Find the pnames of parts for which there is some supplier. [4] [Hint: a part will only be added to the catalog table if it has a supplier] (b) Find the suppliers who supply some part. You must use Exists to write the query. One can use an equivalent non-nested query without the ‘exists’ clause to answer the same question, but that would not receive any grade. [5] [Hints: must have an entry in the catalog table]
Read DetailsIn Uruk the bridal bed was made, fit for the goddess of love…
In Uruk the bridal bed was made, fit for the goddess of love. The bride waited for the bridegroom, but in the night _____________ got up and came to the house. Then ___________ stepped out, he stood in the street and blocked the way . . . so they grappled, holding each other like bulls. They broke the doorposts and the walls shook, they snorted like bulls locked together. a. Whose name goes in the first blank? b. Whose name goes in the second blank? c. Where exactly is Uruk? (Please use a specific regional or country name rather than a broader term such as the name of a continent or other wide geographical area.) d. Keeping class discussion in mind, what action does the character whose name goes in the second blank prevent the character whose name goes in the first blank from taking in the overall paragraph from which this quotation is taken? (8 points)
Read Details