Employee ( Eid, Ename,EAge, ECity, E_Street, E_House#, E_Basic_Salary, E_Bonus,E_Rank, E_Department) Eid is Primary E_Rank can be “Manager, Developer, Admin” E_Department can be “HR, CS, IT, Labour” Employee Age between 18 and Default value for department is “CS”. Project( p_id, pName, p_bonus,duration_in_months, Eid) Pid and Eid combine makes Primary NOTE: Eid in project is foreign key from Employee. Write SQL Queries for the following statements. Display whole address of employee along with name, columns names must be “Emp Name” and “Address”. Display 30% top records of Display names of all those employees whose address is “house number 44, street no 25, Rwp”. Display data of employees who lives in “isb or rwp or khi or lhr”. (do not use or keyword) Display those employees whose age is more than 18 and less than 33. (do not use relational operators “ > or <”. Display all those employees whose name starts with “S” and does not contain “I” in Display all cities of employee. (city name must not repeat) Display All employees of “isb”. Employees must be displayed from younger to older. Younger first and older Display name of employee and total salary of employee. (total salary is sum of basic salary and bonus) Display total number of Display total number of employees working in each Display Total expenditures of company. (total expenditures = basic salary + bonus of employee + all project bonus) Display names of projects in which ‘Ahmar’ is Display total project bonus of ‘Danish’. Display total expenditures of only those departments whose total expenditures are more than 1 Million. (total expenditures = sum of basic salary of all employees of that department) Create Employee Create Project Insert a record in employee table, ( you must not enter edepartment and ebonus). change basic salary of all employees, add increment of 5% to Delete only those employees whose salary is above Change data type employee bonus to “float”. Assume that you forgot to add primary key in Employee table, write a code that add a primary key in employee Drop primary key constraint you created in above Add a new column ‘e_father_name’ in employee Drop E_age column from employee
Employee ( Eid, Ename,EAge, ECity, E_Street, E_House#, E_Basic_Salary, E_Bonus,E_Rank, E_Department) Eid is Primary E_Rank can be “Manager, Developer, Admin” E_Department can be “HR, CS, IT, Labour” Employee Age between 18 and Default value for department is “CS”. Project( p_id, pName, p_bonus,duration_in_months, Eid) Pid and Eid combine makes Primary NOTE: Eid in project is foreign key from Employee. Write SQL Queries for the following statements. Display whole address of employee along with name, columns names must be “Emp Name” and “Address”. Display 30% top records of Display names of all those employees whose address is “house number 44, street no 25, Rwp”. Display data of employees who lives in “isb or rwp or khi or lhr”. (do not use or keyword) Display those employees whose age is more than 18 and less than 33. (do not use relational operators “ > or <”. Display all those employees whose name starts with “S” and does not contain “I” in Display all cities of employee. (city name must not repeat) Display All employees of “isb”. Employees must be displayed from younger to older. Younger first and older Display name of employee and total salary of employee. (total salary is sum of basic salary and bonus) Display total number of Display total number of employees working in each Display Total expenditures of company. (total expenditures = basic salary + bonus of employee + all project bonus) Display names of projects in which ‘Ahmar’ is Display total project bonus of ‘Danish’. Display total expenditures of only those departments whose total expenditures are more than 1 Million. (total expenditures = sum of basic salary of all employees of that department) Create Employee Create Project Insert a record in employee table, ( you must not enter edepartment and ebonus). change basic salary of all employees, add increment of 5% to Delete only those employees whose salary is above Change data type employee bonus to “float”. Assume that you forgot to add primary key in Employee table, write a code that add a primary key in employee Drop primary key constraint you created in above Add a new column ‘e_father_name’ in employee Drop E_age column from employee
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
Employee ( Eid, Ename,EAge, ECity, E_Street, E_House#, E_Basic_Salary, E_Bonus,E_Rank, E_Department)
- Eid is Primary
- E_Rank can be “Manager, Developer, Admin”
- E_Department can be “HR, CS, IT, Labour”
- Employee Age between 18 and
- Default value for department is “CS”.
Project( p_id, pName, p_bonus,duration_in_months, Eid)
- Pid and Eid combine makes Primary
NOTE: Eid in project is foreign key from Employee. Write SQL Queries for the following statements.
- Display whole address of employee along with name, columns names must be “Emp Name” and “Address”.
- Display 30% top records of
- Display names of all those employees whose address is “house number 44, street no 25, Rwp”.
- Display data of employees who lives in “isb or rwp or khi or lhr”. (do not use or keyword)
- Display those employees whose age is more than 18 and less than 33. (do not use relational operators “ > or <”.
- Display all those employees whose name starts with “S” and does not contain “I” in
- Display all cities of employee. (city name must not repeat)
- Display All employees of “isb”. Employees must be displayed from younger to older. Younger first and older
- Display name of employee and total salary of employee. (total salary is sum of basic salary and bonus)
- Display total number of
- Display total number of employees working in each
- Display Total expenditures of company. (total expenditures = basic salary + bonus of employee + all project bonus)
- Display names of projects in which ‘Ahmar’ is
- Display total project bonus of ‘Danish’.
- Display total expenditures of only those departments whose total expenditures are more than 1 Million. (total expenditures = sum of basic salary of all employees of that department)
- Create Employee
- Create Project
- Insert a record in employee table, ( you must not enter edepartment and ebonus).
- change basic salary of all employees, add increment of 5% to
- Delete only those employees whose salary is above
- Change data type employee bonus to “float”.
- Assume that you forgot to add primary key in Employee table, write a code that add a primary key in employee
- Drop primary key constraint you created in above
- Add a new column ‘e_father_name’ in employee
- Drop E_age column from employee
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education