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

I need a ppd-cpa or filesharing site, PPD , CPA, Filesharing Site Projec...

PPD , CPA, Filesharing Site Project Description: This is very easy I need a PPD , CPA, Filesharing Site. [PPD] stands for (pay per download) example hotsharecash [Files

Defining ref cursor types, Defining REF CURSOR Types To make cursor va...

Defining REF CURSOR Types To make cursor variables, you take 2 steps. At first, you define a REF CURSOR type, and then declare the cursor variables of that type. You can defin

%isopen - implicit cursor attributes, %ISOPEN The Oracle closes the SQ...

%ISOPEN The Oracle closes the SQL cursor automatically after executing its related SQL statement. As a result, the %ISOPEN forever yields FALSE.

Packages, Packages The package is a schema object which groups logicall...

Packages The package is a schema object which groups logically associated to the PL/SQL items, types, and subprograms. The Packages have 2 sections: the specification & the bod

Third step at defining type sid in sql, Third Step at defining type SID in ...

Third Step at defining type SID in SQL CREATE DOMAIN SID AS VARCHAR(5) CHECK ( VALUE IS NOT NULL AND SUBSTRING(VALUE FROM 1 FOR 1) = 'S' AND CAST('+'||SUBSTRING(VALUE

Package specification in pl/sql , Package Specification The package sp...

Package Specification The package specifications contain the public declarations. The scopes of these declarations are local to your database representation and global to the

Example of foreign key constraint - sql, Example of Foreign Key Constraint ...

Example of Foreign Key Constraint Example: Alternative formulation for 6.3 as a foreign key constraint ALTER TABLE EXAM_MARK ADD CONSTRAINT Must_be_enrolled_to_take_exam

Order of evaluation-pl/sql expressions , Order of Evaluation When you do...

Order of Evaluation When you do not use the parentheses to specify the order of evaluation, the operator precedence determine the order. Now compare the expressions below: NOT

Wrapping and unwrapping in sql, Wrapping and unwrapping in SQL Operato...

Wrapping and unwrapping in SQL Operators WRAP and UNWRAP in connection with attributes whose declared types are tuple types. Example shows how extension and projection can be

Example of not exists in sql, Example of NOT EXISTS in SQL Example: Us...

Example of NOT EXISTS in SQL Example: Use of NOT EXISTS CREATE ASSERTION Must_be_enrolled_to_take_exam_alternative1 CHECK ( NOT EXISTS (SELECT StudentId, CourseId

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