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

Data mining assignment -in this assignment you are asked to

Data Mining Assignment - In this assignment you are asked to explore the use of neural networks for classification and numeric prediction. You are also asked to carry out a data mining investigation on a real-world data ...

Sql query assignment -for this assignment you are to write

SQL Query Assignment - For this assignment you are to write your answers in a word document. This assignment is in three parts: Part A (reporting queries), Part B (query performance), Part C (query design). For this assi ...

The groceries datasetimagine 10000 receipts sitting on your

The groceries Dataset Imagine 10000 receipts sitting on your table. Each receipt represents a transaction with items that were purchased. The receipt is a representation of stuff that went into a customer's basket. That ...

You are in a real estate business renting apartments to

You are in a real estate business renting apartments to customers. Your job is to define an appropriate schema using SQL DDL in MySQL. The relations are Property(Id, Address, NumberOfUnits), Unit(ApartmentNumber, Propert ...

Objectivethe objective of this lab is to be familiar with a

OBJECTIVE: The objective of this lab is to be familiar with a process in big data modeling. You're required to produce three big data models using the MS PowerPoint software. This tool is available on UMUC Virtual Deskto ...

The relation memberstudentid organizationid roleid stores

The relation Member(StudentId, OrganizationId, RoleId) stores the membership information of student joining organization. For example, ('S1', 'O2', 'R3') indicates that student with Id 'S1' joined the organization with i ...

Relational database exerciseyou have been assigned to a new

Relational Database Exercise: You have been assigned to a new development team. A client is requesting a relational database system to manage their present store with the anticipation of adding more stores in the future. ...

Relational database design a given the following business

Relational Database Design A) Given the following business rules, identify entity types, attributes (at least two attributes for each entity, including the primary key) and relationships, and then draw an Entity-Relation ...

We can represent a data set as a collection of object nodes

We can represent a data set as a collection of object nodes and a collection of attribute nodes, where there is a link between each object and each attribute, and where the weight of that link is the value of the object ...

Data model development and implementationpurpose of the

Data model development and implementation Purpose of the assessment (with ULO Mapping) The purpose of this assignment is to develop data models and map Database System into a standard development environment to gain unde ...

  • 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