Sql script to create and populate the tables, PL-SQL Programming

Assignment Help:

Create the four tables and populate them with the given data. Answer the following queries in SQL.

1. Get all part-color/part-city combinations. Note: Here and subsequently, the term "all" is to be taken to mean "all currently represented in the database" not "all possible".  

2. Get all supplier-number/part-number/job-number triples such that the indicated supplier, part, and job are colocated.  

3. Get all supplier-number/part-number/job-number triples such that the no two of the indicated supplier, part, and job are colocated.  

4. Get all pairs of part numbers such that some supplier supplies both the indicated parts. 

5. Get job numbers for jobs whose city is first in the alphabetic list of such cities.

6. Get job numbers for jobs not supplied with any red part by any London supplier.  

7. Get part numbers for parts supplied to all jobs in London.  

8. Get supplier numbers for suppliers who supply the same part to all jobs.  

9. Get the total quantity of part P1 supplied by supplier S1.  

10. Get part number for parts that are supplied either by a London supplier or to a London job.

Please turn in the following materials:

1.  A SQL script to create and populate the tables.

2.  A SQL script to answer the queries.

3.  The results of your queries.


Related Discussions:- Sql script to create and populate the tables

In operator-comparison operators, IN Operator The operator IN tests the ...

IN Operator The operator IN tests the set membership. This means "equal to any member of." The set may have nulls, but they are ignored. For illustration, the statement below do

Using exists - collection methods, Using EXISTS The EXISTS(n) returns ...

Using EXISTS The EXISTS(n) returns TRUE if the nth element in a collection exist. Or else, EXISTS(n) returns FALSE. Primarily, you use EXISTS with DELETE to maintain the spars

Explicit cursors, Explicit Cursors The set of rows returned by the que...

Explicit Cursors The set of rows returned by the query can include zero, one, or multiple rows, depending on how many rows meet your search criteria. Whenever a query returns

Package utl file in pl/sql, UTL_FILE: The Package UTL_FILE permits you...

UTL_FILE: The Package UTL_FILE permits your PL/SQL programs to read & write operating system (OS) text files. It gives a restricted version of the standard OS stream file I/O,

Constants and variables in pl sql, Constants and Variables:   You can...

Constants and Variables:   You can declare the constants and variables in the declarative section of any PL/SQL subprogram, block, or package. The Declarations allot the stor

Scope and visibility- pl/sql, Scope and Visibility The References to an ...

Scope and Visibility The References to an identifier are resolved according to its visibility and scope. The scope of an identifier is that area of a program unit (subprogram, b

Authorisations - privileges, Authorisations - Privileges As relational...

Authorisations - Privileges As relational theory is silent on the issue of authorisation, it offers nothing with which SQL's vast edifice in support of what it calls privilege

Exception handling, set serveroutput on declare a number(5); b n...

set serveroutput on declare a number(5); b number(5); c number(5); begin a:=&a; b:=&b; c:=a/b; dbms_output.put_line(c); exception when zero_d

I want customer management program, This is a Customer Management project. ...

This is a Customer Management project. Customer data is presented in a text file. The program will load this text data into its DB columns. The data mapping is user definable. User

Pascal programming and mysql programming, I have a Pascal Source file that ...

I have a Pascal Source file that needs to be compiled into a Service. In addition, there are various functions (Pascal Procedures I guess) that need to be created to Read and Write

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