Question: Write the data definition statements of SQL that modify the structures of a database listed on a page 4 of the examination paper in the

Write the data definition statements of SQL that modify the structures of a database listed on a page 4 of the
examination paper in the way described below. Note, that some of the modification may require more than
one data definition statements of SQL statement.
(1) Add a foreign key constraint in the database that a department manager is an employee.
(2 marks)
(2) Add a check constraint in the database that the value of the attribute Sex is either M or F.
(2 marks)
(3) It is possible that the salary of an employee can be up to $999999.99.
(2 marks)
(4) In the future information about a department manager will be optional.
(2 marks)
(5) We would like to store information in the database about the percentage of an employee works on a
project. The value of a percentage is between 0 and 1. For example, 0.25 means 25%, and 1.0 means
100%.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!