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

Solve 3.4 and 3.5 Questions are from Database Systems. FET 3.4 Here is a query o

ID: 3881635 • Letter: S

Question

Solve 3.4 and 3.5

Questions are from Database Systems.

FET 3.4 Here is a query on the suppliers-and-parts database. What does it do? What is the predicate for the result? ( ( s JOIN SP ) WHERE P# = P# ('P2') ) { S#, CITY } 3.5 Suppose the expression in Exercise 3.4 is used in a view definition: CREATE VIEW V AS (( S JOIN SP) WHERE P# = P# ('P2') ) { S#, CITY } ; Now consider this query: ( V WHERE CITY = 'London' ) { S# } What does this query do? What is the predicate for the result? Show what is involved on the part of the DBMS in processing this query.

Explanation / Answer

3.4

The query will join the S and SP tables where Part# is P2. It will display the S# and CITY

Select S.S#,CITY from S inner join SP on S.S#=SP.S# where SP.P#= 'P2';

3.5

This view will display the S# from the above query where CITY = 'London'

Select S# from V where CITY = 'London';

S# CITY S1 London S2 Paris S3 Paris S4 London
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote