Create a database called company consisting of two tables

Assignment Help Database Management System
Reference no: EM131978468

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.

Reference no: EM131978468

Questions Cloud

Prescribing medications for children and adolescents : What are some of the issues surrounding prescribing medications for children and adolescents? How can this be improved?
Strategic tool to make better decisions in business : How can finance be used as a strategic tool to make better decisions in business?
Theoretical perspectives of maslow and rogers : Describe the nature of "attachment" in early childhood and its importance. What other concept in the Thompson (2014) reading held interest for you?
Calculate the after-tax rate of return on taxable bond : You can invest in taxable bonds that are paying a yield of 9.7 percent. Calculate the after-tax rate of return on the taxable bond?
Create a database called company consisting of two tables : 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.
What is the yield to maturity for bonds : What is the yield to maturity for these bonds?
Tell us about a person that is a schizophrenic : In the Jeffrey Alan Grey personality theory what would this theory tell us about a person that is a schizophrenic?
The financial services authority : The Financial Services Authority (FSA) in the United Kingdom has long been regarded as one of the most successful regulator in the world.
Tell us about a person that is a schizophrenic : In the Carl Jung Personality theory what would this theory tell us about a person that is a schizophrenic?

Reviews

Write a Review

Database Management System Questions & Answers

  Knowledge and data warehousing

Design a dimensional model for analysing Purchases for Adventure Works Cycles and implement it as cubes using SQL Server Analysis Services. The AdventureWorks OLTP sample database is the data source for you BI analysis.

  Design a database schema

Design a Database schema

  Entity-relationship diagram

Create an entity-relationship diagram and design accompanying table layout using sound relational modeling practices and concepts.

  Implement a database of courses and students for a school

Implement a database of courses and students for a school.

  Prepare the e-r diagram for the movie database

Energy in the home, personal energy use and home energy efficiency and Efficient use of ‘waste' heat and renewable heat sources

  Design relation schemas for the entire database

Design relation schemas for the entire database.

  Prepare the relational schema for database

Prepare the relational schema for database

  Data modeling and normalization

Data Modeling and Normalization

  Use cases perform a requirements analysis for the case study

Use Cases Perform a requirements analysis for the Case Study

  Knowledge and data warehousing

Knowledge and Data Warehousing

  Stack and queue data structure

Identify and explain the differences between a stack and a queue data structure

  Practice on topic of normalization

Practice on topic of Normalization

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