Supplier(ID, name, loginID, password) 1 Acme acme joshua 2 Ronco ronco ronco 3 Popeil popi pp123 Part(ID, name, price, supplierID) 1 birdSeed 5 1 2 TNT 100 1 3 leadShot 20 NULL 4 pocketFisherman 19.99 3 |
Job(ID, name, address) 1 StudentUnion Calvin 2 NULL Calvin 3 ArtMuseum GrandRapids PJ(PID, JID, quantity, date) 1 1 10 10-20-2018 2 2 2 10-21-2018 1 2 3 10-21-2018 4 1 2 10-22-2018 |
- Names of parts that are under $10 and are supplied by Acme
- Names of parts that are used on job #1
- Names of parts that are supplied by Popeil and used at Calvin
Use this schema.
Supplier(ID, name, loginID, password, address) Part(ID, name, price, supplierID) Job(ID, name, address) PartJob(partID, jobID, quantity, date) PartPart(partID, subpartID, quantity)
Write queries to retrieve the following things.
- The names of suppliers from Grand Rapids, ordered alphabetically
- The names of parts $20 and over for which there is no supplierID
- The names of parts used in some Calvin job, with quantity & date
- The names of parts used to build the part “widget”