Consider the following schema for a company database and answer the following questions: DEPARTMENT Dname Dnumber Mgr_ssn Mgr_start_date EMPLOYEE Fname Minit Lname Ssn Bdate Address Sex Salary Dno WORKS ON Essn Pno Hours PROJECT Pname Pnumber Plocation Q1//create all tables of this schema and apply any necessary constraints Q2// Write SQL statements that carry out the following tasks: 1-alter the employee table to add column city of 20 characters. 2- alter the employee table to apply the following business rule The minimum salary is 3000 and maximum salary is 10000 3- insert sample data in each table. 4- display a list of each employee SSN , Name and Salary. 5- display a list of each employee SSN, Name and Salary for employees working in department no 2.

Oracle 12c: SQL
3rd Edition
ISBN:9781305251038
Author:Joan Casteel
Publisher:Joan Casteel
Chapter13: Views
Section: Chapter Questions
Problem 7MC
icon
Related questions
Question
SQL
Consider the following schema for a company database and
answer the following questions:
DEPARTMENT Dname Dnumber Mgr_ssn Mgr_start_date
M
EMPLOYEE
Fname Minit Lname
Ssn
Bdate
Address Sex Salary
Dno
WORKS ON Essn
Pno
Hours
M
PROJECT
Pname
Pnumber
Plocation
Q1//create all tables of this schema and apply any necessary
constraints
Q2// Write SQL statements that carry out the following tasks:
1-alter the employee table to add column city of 20 characters.
2- alter the employee table to apply the following business rule
The minimum salary is 3000 and maximum salary is 10000
3- insert sample data in each table.
4- display a list of each employee SSN, Name and Salary.
5- display a list of each employee SSN , Name and Salary for
employees working in department no 2.
Transcribed Image Text:Consider the following schema for a company database and answer the following questions: DEPARTMENT Dname Dnumber Mgr_ssn Mgr_start_date M EMPLOYEE Fname Minit Lname Ssn Bdate Address Sex Salary Dno WORKS ON Essn Pno Hours M PROJECT Pname Pnumber Plocation Q1//create all tables of this schema and apply any necessary constraints Q2// Write SQL statements that carry out the following tasks: 1-alter the employee table to add column city of 20 characters. 2- alter the employee table to apply the following business rule The minimum salary is 3000 and maximum salary is 10000 3- insert sample data in each table. 4- display a list of each employee SSN, Name and Salary. 5- display a list of each employee SSN , Name and Salary for employees working in department no 2.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 8 steps with 7 images

Blurred answer
Knowledge Booster
Hyperlinks
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
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781305627482
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781285196145
Author:
Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:
Cengage Learning
A Guide to SQL
A Guide to SQL
Computer Science
ISBN:
9781111527273
Author:
Philip J. Pratt
Publisher:
Course Technology Ptr
Principles of Information Systems (MindTap Course…
Principles of Information Systems (MindTap Course…
Computer Science
ISBN:
9781305971776
Author:
Ralph Stair, George Reynolds
Publisher:
Cengage Learning
Fundamentals of Information Systems
Fundamentals of Information Systems
Computer Science
ISBN:
9781337097536
Author:
Ralph Stair, George Reynolds
Publisher:
Cengage Learning