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

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.

Posted Date: 3/12/2013 2:46:05 AM | Location : United States







Related Discussions:- Sql script to create and populate the tables, Assignment Help, Ask Question on Sql script to create and populate the tables, Get Answer, Expert's Help, Sql script to create and populate the tables Discussions

Write discussion on Sql script to create and populate the tables
Your posts are moderated
Related Questions
Avoiding Collection Exceptions   In many cases, if you reference a nonexistent collection element, then PL/SQL raises a predefined exception. Consider the illustration shown b

Forward Declarations The PL/SQL needs that you declare an identifier before using it. And hence, you should declare a subprogram before calling it. For illustration, the decla

Data Types in SQL - Character CHARACTER or, synonymously, CHAR, for character strings. When this type is to be the declared type of something (e.g., a column), the permissible

Using LOCK TABLE You use the LOCK TABLE statement to lock the whole database tables in the specified lock mode so that you can share or deny the access to them. For illustrati

Example of DELETE - SQL As with UPDATE, a FOR PORTION OF clause can be specified if the target table has a defined period name, as illustrated in Example. Example: Deleting

Manipulating Local Collections Within PL/SQL, to manipulate the local collection, by using the  TABLE and CAST operators . The operands of CAST are a collection declared locally

Find the account numbers of all customers whose balance is more than 10,000 $

LAWS / RULES - Dollo's Law                     :           Living organisms do exhibit evolutionary irreversibility or evolution is irreversible. Williston's Law

Example of Table Literal - SQL Example: A Table Literal (correct version) VALUES ('S1', 'C1', 'Anne'), ('S1', 'C2', 'Anne'), ('S2', 'C1', 'Boris'), ('S3', 'C3'

What are the rates for help in writing PL/SQL procedures and functions?