Next, write a SQL statement to create a single column relational table MESSAGE to store variable size strings no longer than 500 characters.

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
icon
Related questions
Question
100%

Your implementation must directly follow a comment with a specification of a subtask.
(1) First, write a SQL statement to create a new relational table SALARY that consists of
two columns salary_level and minimum_salary. The column
salary_level is defined the same type as it defined in a table LPOSITION. The
column minimum_salary type is decimal that can store the value between 0.00
and 999999.99. The primary of the SALARY is salary_level.

(2) Next, write SQL statements to inserts into the relation table SALARY information
about salary levels and minimum salaries by using the data in a table below.
+--------------+---------------------+
| Salary level | Minimum salary |
+--------------+---------------------+
| A | 56700.00 |
+--------------+---------------------+
| B | 65500.00 |
+--------------+---------------------+
| C | 77800.00 |
+--------------+---------------------+
| D | 89600.00 |
+--------------+---------------------+
| E | 105300.00 |
+--------------+---------------------+

 

(3) Next, write a SQL statement to modify the budget of the department School of Computing and Information Technology to 1500000.00.

(4) Next, write a SQL statement to create a single column relational table MESSAGE to store variable size strings no longer than 500 characters.

 

(5) Next, write a SQL statement to insert into the relational table MESSAGE information about the contents of a sample database that verifies the consistency constraint for each department of all departments.

"The budget of a department must greater than or equals to the total amount of minimum salaries paid for the employees working in the department."

The script must list the outcomes of verification of the consistency constraint as a single column table with the following messages as the rows in the table.

A department budget since the budget the total amount of minimum salary .

For example, if the budget of the department School of Computing and Information Technology is greater than the total amount of minimum salary for the employees in the department, then verification of the consistency constraint must return the following message.

A department School of Computing and Information Technology budget is valid since the budget 1500000.00 greater than or equals to the total amount minimum salary 1125100.00 If the budget of the department School of Physics is less than the total amount of minimum salary for the employees in the department, then verification of the consistency constraint must return the following message. 

A department School of Physics budget is invalid since the budget 0.00 is less than the total amount minimum salary 1125100.00

Use a function CONCAT to create the messages like the one listed above.

 

I have done 1-4 . need help in ques 4. but would appreciate if u could answer every part for rechecking purpose. thanks

 

Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Table
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.
Similar questions
Recommended textbooks for you
Database System Concepts
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)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education