Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1.(6pts)WhyisSQLcalledbothadatadefinition (DDL) andadatamanipulationlanguage (DML)? Give an example to illustrate each type ofcommand. 2.(23 pts) Review the database about Quality Appliance Manufacturing Company shown on the

1.(6pts)WhyisSQLcalledbothadatadefinition (DDL) andadatamanipulationlanguage (DML)? Give an example to illustrate each type ofcommand.

2.(23 pts) Review the database about Quality Appliance Manufacturing Company shown on the last page. Then, provide SQL programs to answer the queries shown below:a-c(2*3pts=6);d-f (3*4pts = 12); g (5pts).a.List the names of the suppliers that supply bulb (see PARTTYPE in PART table) costing between $150 and $200.b. Find the highest cost of the bulbs (see PARTTYPE in PART table) supplied by supplier number 1234. c.List the names and numbers of the inspectors who were inspecting bulbs (see APPLIANCETYPE) on April 1, 2020.d.Find the total amount of money (use SUM) spent on Quality Appliance products by each buyer (use GROUP BY) from Mexico, Venezuela, and Brazil. Display BUYERNUM and SUM(PRICE) for each supplier.e.Find the total cost of the parts used in each refrigerator manufactured on February 28, 2010. Only include in the results those refrigerators that used at least $100 in parts.f.Among all of the inspectors, list the names and numbers of those inspectors who earn more money than theaverage salary of all paid inspectors (use AVG). g.List the names and numbers of the lowest paid inspectors (use MIN) who were hired ONLY in 2012 (from Jan-01-2012 to Dec-31-2012)3.(6pts)Explainthevalue/purposeforusingwildcards inSQLprograms and describe the functions of the three wildcard symbols in SQL: the asterisk (*), _ and %. Write THREE separate SQL programs where these three wildcards are used to access data from the typical Employeetable with employees information, emp-id, names, title, salary, start_date, etc.

4.(12 pts) Explain the FOUR operators: UNION, INTEREST, EXCEPT and EXISTS used in SQL. Provide specific FOUR SQL program examples of the fouroperators. 5.(6 pts) Explain and compare two join operations, Inner Join and Outer Join in SQL. When do you think the Outer Join is useful and effective to use?53points allowed for this assignment.See blow for # 22.Consider the following relational database for the Quality Appliance Manufacturing Co. The database is designed to track the major appliances (refrigerators, washing machines, dishwashers, etc.) that Quality manufactures. It also records information about Qualitys suppliers, the parts they supply, the buyers of the finished appliances, and the finished goods inspectors. Note the following facts about this environment:Suppliers are the companies that supply Quality with its major components, such as electric motors, for the appliances. Supplier number is a unique identifier.Parts are the major components that the suppliers supply to Quality. Each part comes with a part number but that part number is only unique within a supplier. Thus, from Qualitys point of view, the unique identifier of a part is the combination of part number and supplier number.Each appliance that Quality manufactures is given an appliance number that is unique across all of the types of appliances that Quality makes.Buyers are major department stores, home improvement chains, and wholesalers. Buyer numbers are unique.An appliance may be inspected by several inspectors. There is clearly a many-to-many relationship between appliances and inspectors, as indicated by the INSPECTION table.There are one-to-many relationships between suppliers and parts (Supplier Number is a foreign key in the PART table,) parts and appliances (Appliance Number is a foreign key in the PART table,) and appliances and buyers (Buyer Number is a foreign key in the APPLIANCE table.)SUPPLIERNUMSUPPLIERNAMECITYCOUNTRYTELEPHONESUPPLIER TablePARTNUMSUPPLIERNUMPARTTYPECOSTAPPLIANCENUMPART TableAPPLIANCENUMAPPLIANCETYPEDATEMANUFBUYERNUMPRICEAPPLIANCE TableBUYERNUMBUYERNAMECITYCOUNTRYCREDITRATING BUYER TableINSPECTORNUMINSPECTORNAMESALARYDATEHIREINSPECTOR TableAPPLIANCENUMINSPECTORNUMDATEINSPECTIONSCOREINSPECTION Tab

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

Focus On Geodatabases In ArcGIS Pro

Authors: David W. Allen

1st Edition

1589484452, 978-1589484450

More Books

Students also viewed these Databases questions

Question

Understand the principles of a learning organization.

Answered: 1 week ago