Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Database Design We have discussed several queries in the class involving the S, P.J and SPI tables The S table contains the information about supplier
Database Design
We have discussed several queries in the class involving the S, P.J and SPI tables The S table contains the information about supplier number (S#), supplier name (sname), status, and the city where the supplier is located. The status is maintained as a numerical number while the values for all the other attributes in the S table are strings. The P table contains the part nurnber(P#), part name (pname), color, and weight of each part as well as the city where the part is located. The weight is maintained as a numerical number while the values for all the other attributes in the P table are strings. The J table contains the project number (JA) and project name (iname) information about each project as well as the city where the project is located. The values for all the attributes in the J table are strings. Finally, the SP] table keeps tracking the relationships among suppliers, parts, and projects. For example, the very first record in the SPI table shown below indicates that supplier s1 supplies part p1 to project j1 with a quantity of 200. In this table, the quantity information is maintained as a numerical number while the values for all the other attributes are strings. s# s1 s2 s3 S4 s5 SNAME Smith Jones Blake Clark Adams STATUS 20 10 30 20 30 CITY London Paris Paris London Athens PNAME nut bolt screw stapler ca cog P# COLOR red green blue red WEIGHT CITY London Paris Rome London Paris London p2 4 blue 12 p6 re 9 Save and Submit to savend hmit m JNAME CITY sorter Paris j2 j3 j4 j5 j6 j7 punch reader console Rome Athens Athens collator London terminal Oslo tape London SP) p# 1 p3 p3 p3 p3 j2 2 2 5 03 600 p3 400 p3 800 j2 100 p3 200 p4 2 500 p6 B00 The above tables illustrate the schema and contain some sample records for the S, P. J, and SPJ tables. Using SQL, find the pairs of part names of those parts that are supplied to the same project
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started