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

  Create an erd that shows the entities

Create an ERD that shows the entities, attributes, relationships, cardinality and optionality that describe the booking of a room by a guest. This ERD is to be labelled ERD 1.

  Define what database to use with a use statement

Create the following queries and save them all in a file.Define what database to use with a USE statement.

  Use r to calculate following probability from z distribution

Use R to calculate the following probability from Z distribution

  Draw an ER diagram for your proposed database

Describe the situation. Your description should be brief and relatively informal. If there are any unique or particularly difficult aspects of your proposed application

  Identify the business rules for patient and order

Typically, a hospital patient receives medications that have been ordered by a particular doctor. Because the patient often receives several medications.

  Design a dss to help decision-makers

Design a DSS to help decision-makers run the 2012 London Olympics-Write down the step-by-step solution to train the classifier by the basic perceptron learning rule.

  How healthcare data sets are used in healthcare settings

For each data set, your analysis should include the purpose of the data, type of setting, secondary data sources classification, reporting process and frequency (i.e., quarterly, annually), and other important components. Utilize this unit's readi..

  Describe your experiences related to your setup of mysql

Describe the approach that you would take to go from a conceptual or logical model that you created to the implementation of that database structure in MySQL.

  Graph the bond yield to maturity

Identify two possibly mispriced bond issues, one overpriced and one underpriced. and graph the bond yield to maturity (YTM) on the y-axis of an XY-scatter plot, with the bond to maturity in years on the x-axis.

  Traditional file systems and modern database environment

Write down the difference between traditional file systems Vs modern database environment. Describe the following: Physical data independence Vs logical data independence

  How do i display and parse a date

1) How do I display and parse a date? 2) What is object serialization? 3) Can I persist my objects using serialization instead of using a relational or object database?

  Describe why physical database design is necessary

What is physical database design? Describe why physical database design is necessary. Explain why the need to perform joins is an important factor affecting application and database performance.

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