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

Describe drop table command or cascade of sql, Describe DROP TABLE command ...

Describe DROP TABLE command of SQL along with both the options - CASCADE and RESTRICT. DROP TABLE command - This command drops the specified table. Dropping a table also dro

One to many - relationship cardinality, One-to-many : An entity in A is rel...

One-to-many : An entity in A is related with any number of entities in B. An entity in B is related with at the most one entity in A. Example: Relationship between faculty and d

What is known as heap file organization, What is known as heap file organiz...

What is known as heap file organization? In the heap file organization, any record can be placed anywhere in the file where there is space for the record. There is no ordering

Define the phases of two phase locking protocol, Define the phases of two p...

Define the phases of two phase locking protocol Growing phase: a transaction may get locks but not release any lock. Shrinking phase: a transaction might be release locks bu

Insulation between conceptual and physical structures, Insulation between c...

Insulation between conceptual and physical structures It can be defined as: 1. The Database Administrator should be capable to vary the storage structures without affectin

What is mysql, What is MySQL? MySQL is a relational database management...

What is MySQL? MySQL is a relational database management system which has eleven million installations. It can be used for both Linux and Window. Managing database includes add

RDBMS, DISADVANTAGES OF RDBMS

DISADVANTAGES OF RDBMS

Write modified version of transfer that avoids deadlock, Your OS has a set ...

Your OS has a set of queues, each of which is protected by a lock. To enqueue or dequeue an item, a thread must hold the lock associated to the queue. You need to implement an a

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