Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask DBMS Expert


Home >> DBMS

ASSIGNMENT-1
1. Create a database called COMPANY consisting of two tables - EMP & DEPT

2. Perform the following queries on the tables just created:

1. List the names of analysts and salesmen.
2. List details of employees who have joined before 30 Sep 81.
3. List names of employees who are not managers.
4. List the names of employees whose employee numbers are 7369, 7521, 7839,
7934, 7788.
5. List employees not belonging to department 30, 40, or 10.
6. List employee names for those who have joined between 30 June and 31 Dec. 81.
7. List the different designations in the company.
8. List the names of employees who are not eligible for commission.
9. List the name and designation of the employee who does not report to anybody.
10. List the employees not assigned to any department.
11. List the employees who are eligible for commission.
12. List employees hose names either start or end with "S".
13. List names of employees whose names have "i" as the second character.
14. List the number of employees working with the company.
15. List the number of designations available in the EMP table.
16. List the total salaries paid to the employees.
17. List the maximum, minimum and average salary in the company.
18. List the maximum salary paid to a salesman.

ASSIGNMENT-2

1) Please refer to the tables created as a part of Assignment 1. Perform the following queries against those tables:

1. List the number of employees and average salary for employees in department 20.
2. List name, salary and PF amount of all employees. (PF is calculated as 10% of basic salary)

3. List names of employees who are more than 2 years old in the company.
4. List the employee details in the ascending order of their basic salary.
5. List the employee name and hire date in the descending order of the hire date.
6. List employee name, salary, PF, HRA, DA and gross; order the results in the
ascending order of gross. HRA is 50% of the salary and DA is 30% of the salary.
7. List the department numbers and number of employees in each department.
8. List the department number and total salary payable in each department.
9. List the jobs and number of employees in each job. The result should be in the descending order of the number of employees.
10. List the total salary, maximum and minimum salary and average salary of the employees jobwise.
11. List the total salary, maximum and minimum salary and average salary of the employees, for department 20.
12. List the total salary, maximum and minimum salary and average salary of the employees jobwise, for department 20 and display only those rows having an average salary > 1000

2) The following questions pertain to a database with the following tables.

Suppliers - S (S#, Name, Status, City)
Parts - P (P#, Pname, Colour, Weight, City)
Projects - J (J#, Jname, City)
Shipment - SPJ (S#, P#, J#, Qty)

The significance of an SPJ record is that the specified supplier supplies the specified part to the specified project in the specified quantity (and the combination S#-P#-J# uniquely identifies such a record).

1. Get full details of all projects in London.

2. Get S# for suppliers who supply project J1.

3. Get all part-color/part-city combinations.

4. Get all S#/P#/J# triples such that all are co-located.

5. Get al S#, P#, J# triples such that they are not all co-located.

6. Get P# for parts supplied by a supplier in London.

7. Get all pairs of cities such that a supplier in the first city supplies to a Project in the second city.

8. Get J# for projects supplied by at least one supplier not in the same city.

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

10. Get the total quantity of part P1 supplied by S1.

11. For each part supplied to a project, get the P#, J# and corresponding total quantity.

12. Get P# of parts supplied to some project in an average quantity > 320.

13. Get project names for projects supplied by supplier S1.

14. Get colors of parts supplied by S1.

15. Get J# for projects using at least one part available from supplier S1.

16. Get supplier numbers for suppliers supplying at least one part supplied by at least one supplier who supplies at least one red part.

17. Get supplier numbers for suppliers with a status lower than that of supplier S1.

18. Get project numbers for projects not supplied with any red part by any London supplier.

DBMS, Programming

  • Category:- DBMS
  • Reference No.:- M92816121
  • Price:- $25

Priced at Now at $25, Verified Solution

Have any Question?


Related Questions in DBMS

Project outline and requirements provide a brief

Project Outline and Requirements Provide a brief description of the organization (can be hypothetical) that will be used as the basis for the projects in the course. Include company size, location(s), and other pertinent ...

Sqlwrite a select statement that returns three columns from

SQL Write a SELECT statement that returns three columns from the Vendors table: VendorContactFName, VendorContactLName, and VendorName. Sort the result set by last name, then by first name.

Sqlwrite a select statement that returns one column from

SQL Write a SELECT statement that returns one column from the Vendor table named Full Name. Create this column from the VendorContactFName and VendorContactLName columns. Format it as follows: last name, comma, first nam ...

Stored procedure please create the following stored

Stored procedure. Please create the following stored routines using CPS3740_2017S database using the tables in dreamhome database. xxxx is your email id 1) Implement a stored procedure p3Q21_xxxx to display the Branch ci ...

Sql transactions exercisesconsider table itemnameprice

SQL Transactions Exercises Consider table Item(name,price) where name is a key, and the following two concurrent transactions. T1: Begin Transaction; Update Item Set price = 2*price Where name = 'pencil'; Insert Into Ite ...

In sql developercreate a table userpermissions provide

IN SQL DEVELOPER Create a table UserPermissions (provide create and insert statements code) Document UserName Policy SYSTEM Menu JDOW W2 USAM Permissions SYSTEM W2 JDOW Form 1040 USAM Policy JDOW W2 SYSTEM Write a PL/SQL ...

Suppose that you have designed a database for morgan

Suppose that you have designed a database for Morgan Importing that has the following tables: EMPLOYEE (EmployeeID, LastName, FirstName, Department, Phone, Fax, EmailAddress) STORE (StoreName, City, Country, Phone, Fax, ...

Database and information retrieval assignment - data

Database and Information Retrieval Assignment - Data Privacy Essay Task - Write an essay (aim for 750 words) that addresses issues associated with data proivacy. Use the Australian Privacy Principles - discussed in class ...

Analytic reportpurpose the purpose of this task is to

Analytic Report: Purpose: The purpose of this task is to provide students with practical experience in working in teams to write a Data Analytical report to provide useful insights, pattern and trends in the chosen/given ...

Assignmenta restaurant is designing a database to keep

Assignment A restaurant is designing a database to keep track of customer services. A customer is defined as a customer ID, name, address and a telephone number. Customers are served by employees. Each employee is define ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As