Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

(1) Install MySQL in your computer. You may also install xampp instead of just M

ID: 3871780 • Letter: #

Question

(1) Install MySQL in your computer. You may also install xampp instead of just MySQL. Install the 'Big' PVFC database of the textbook in MySQL and call the database 'bigpvfc'. You may execute the sql file, bigpvfc.sql (provided separately), in MySQL console.

Provide the MySQL commands for the following queries.

(e) List some information of raw materials made of walnut with a standard price more than or equal to $1000.0 or less than or equal to $0.1 in the following format.

+------------+----------------------------+-----------+-------+-----------------+---------+
| MaterialId | MaterialName               | Thickness | Width | Material        | Price   |
+------------+----------------------------+-----------+-------+-----------------+---------+
| 101016CHE | 10in X 10in X 16ft Cherry | 10        | 10    | Cherry          |    1000 |
| 101216CHE | 10in X 12in X 16ft Cherry | 10        | 12    | Cherry          |    1200 |
| 101216WAL | 10in X 12in X 16ft Walnut | 10        | 12    | Walnut          |    1080 |
...
| NUT3/8     | Upholstery Tack 3/8in      | NULL      | NULL | Upholstery Tack | 0.01875 |
| NUT5/8     | Upholstery Tack 5/8in      | NULL      | NULL | Upholstery Tack | 0.02875 |
| NUT7/8     | Upholstery Tack 7/8in      | NULL      | NULL | Upholstery Tack | 0.04375 |
+------------+----------------------------+-----------+-------+-----------------+---------+
94 rows in set (0.01 sec)

Explanation / Answer

e. We will use Normal select query. Syntax:

SELECT <attributes> FROM <table name> WHERE <condition>;

Using above question:

SELECT MaterialId, MaterialName, Thickness, Width, Material, Price

FROM bigpvfc

WHERE Material = 'walnut' and Price NOT BETWEEN 0.1 AND 1000;