Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CONSTRAINT Employee _ FK 2 FOREIGN KEY ( DNumber ) REFERENCES DepartmentQUESTION 3 ( 1 0 marks ) Write the data definition statements of SQL

CONSTRAINT Employee_FK2 FOREIGN KEY (DNumber) REFERENCES DepartmentQUESTION 3(10 marks)
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
Mor F.
(2 marks)
(3) It is possible that the salary of an employee can be up to
(2 marks)
(4) In the future information about a department manager will be optional.
(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%.
(2 marks)
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke

4th Edition

0136086535, 9780136086536

Students also viewed these Databases questions