Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

SQL problem: Write a create table command to create a relation that will hold the following data: You will have to choose the datatype for

SQL problem:

Write a create table command to create a relation that will hold the following data:

image text in transcribed

You will have to choose the datatype for each column. Also:

a. The First Name cannot be NULL b. The Birth date column should have 01/01/1900 as default value c. Driver_Licence is the primary key d. SSN should also be unique e. You need a check constraint to check that Hire_Date > Birth_Date f. Add a comment to explain that the Hire Date corresponds to the date the employee was first hired g. Create an index on State field.

h. Now insert the data

i. Write a command to update the record with Drivers Licence lD820381 to have PA as State

j. Now delete the record with SSN 7394104

Driver_Licence SSN First_name Last_Name Birth_Date Hire_Date State AB17893 9820124 Harvey Goldberg 01/01/1982 06/05/2003 OH CD17673 8975382 Paul Maxwell 02/10/1974 07/14/2015 CA GH92641 7394104 Peter Feynman 05/17/2005 09/08/2020 HI VH02378 1325639 Sally Maxwell 07/22/2000 01/01/2020 CA ID820381 1325640 Sally Feynman 09/01/1985 06/03/2008 HI

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 M Kroenke, David J Auer

6th Edition

0132742926, 978-0132742924

More Books

Students also viewed these Databases questions

Question

Solve subject to the given condition; y' + (1/2)y = x ; y(0) = 1=2

Answered: 1 week ago