Give an expression within sql for queries, Database Management System

Assignment Help:

Consider the following relations:

 S (S#, SNAME, STATUS, CITY)

 SP (S#, P#, QTY)

 P (P#, PNAME, COLOR, WEIGHT, CITY)

Give an expression within SQL for each of queries below:

(i) Get supplier names for supplier who supply at least one red part

(ii) Get supplier names for supplier who do not supply part P2.

(i) SELECT SNAME FROM S

WHERE S# IN (SELECT S# FROM SP

WHERE P# IN (SELECT P# FROM P

WHERE COLOR = RED'))

(ii) SELECT SNAME FROM S

WHERE S# NOT IN (SELECT S# FROM SP WHERE P# = 'P2')


Related Discussions:- Give an expression within sql for queries

Note gate, i want notes on this topic

i want notes on this topic

Describe the four main ways of optimising disk block access, Describe the f...

Describe the four main ways of optimising disk block access. Ans: a. Disk  b. Non-volatile writes buffers c. File organization (Clustering) d. Log-based file system

Write a short note on oracle instance, Write a short note on oracle Instanc...

Write a short note on oracle Instance? Oracle Instances: An instance is the (executed) Oracle software and the memory they use. It is the instance which manipulates the data s

Ideal data dictionary, An ideal data dictionary should have everything a DB...

An ideal data dictionary should have everything a DBA wants to know about the database. 1 Conceptual, External, and internal database descriptions. 2.    Descriptions of attr

Improved availability, Improved availability: The data in a distributed sys...

Improved availability: The data in a distributed system may be replicated so that it is at more than one site. Thus, the failure of a node or a communication link does not necessar

Which database level is closest to the users, Which database level is close...

Which database level is closest to the users? External database level is closest to the users.

What is predictive modelling, Problem: (a) Data mining is one of the b...

Problem: (a) Data mining is one of the best ways to analyse data and using software techniques, hidden and unexpected patterns and relationships in sets of data can be extrac

Assignment - 1 - redoing to improve grades, Assignment #1 Data Management ...

Assignment #1 Data Management The questions on this exam are based on the Baxter Aviation case scenario. 1. (5 points) The systems analyst proposes the following two relationshi

What is bcnf boyce-codd normal form, BCNF Boyce-Codd Normal Form A rel...

BCNF Boyce-Codd Normal Form A relation schema R is in BCNF if it is in 3NF and accepts an additional constraint that for every FD X A, X has to be a candidate key. If a relati

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd