Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Needs to be written in sql Table Name: DEPENDENT XX Constraint Foreign Employee (SSN) NOT NULL ON DELETE CASCADE Attribute Data Type Employee SSN CHAR()

Needs to be written in sql image text in transcribed
Table Name: DEPENDENT XX Constraint Foreign Employee (SSN) NOT NULL ON DELETE CASCADE Attribute Data Type Employee SSN CHAR() Name VARCHAR(15 CHAR NOT NULL Gender CHECK (M,F, 'm', T Sex Birthday DATE Relationship VARCHAR lat you hev rwo ay to efine forign key, one is to define forcign key withinhe CREATE TABLE statement, for example CREATE TABLE products (product id numeric(10) not null, supplier id numeric(10), CONSTRAINT fk supplier FOREIGN KEY (supplier id) REFERENCES supplier(supplier id) ON DELETE SET NULL) Another way is to create table without defining foreign key and add foreign key later using the ALTERTABLE statement (sometimes you might have to do like this), for example ALTER TABLE Products ADD CONSTRAINT fk_supplier FOREIGN KEY (supplier id) REFERENCES suppliersupplier id) ON DELETE SET NULL 2. Insert Data Table Name: EMPLOYEE XX SSN FName Mini LName BDate Address Sex 09-JUN-60 07-FEB-78 li s 59 E, Salt LakeCity,UT M. 80 KOI NULL- 35 S 18 E, Salt Lake City, UT|F 1700001-NULL 3- -2- E 554433221 543216789 Gilbert PAN Wong 3344555Prunkin T 08-DEC-45 638 Voss, Houston, TX M 40000 554433221 5 987654321 ennifer S Wallace 20-JUN-31 291 Berry, Bellaire, TX F 43000 5544332214 123456789 66653444 sh K Narayan 15-SEP-52 975 Fire Oak, Humble, TX M 38000 33445555 453453453 oyee A Engish 31-JUL-62 5631 Rice, Houston, IX F 25000 333445555 5 M 55000 $43216789 1 4 888665555 James E 10-NoV-27 450 Stone, Houston, TX 999887777- Alic a_Zelayat19-JUL 58 3321 Castle Spring, m T.250 019876543211 987987987 Ahmad V Jabbur 29-MAR-59 980 Dallas, Houston, TX M 25000 987654321 Table Name: DEPARTMENT xxx MgrSSNMgrDate 888668555 19-JUN-7 Manufacture

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

Building Database Driven Catalogs

Authors: Sherif Danish

1st Edition

0070153078, 978-0070153073

More Books

Students also viewed these Databases questions

Question

List the commonly used accuracy metrics for KNN.

Answered: 1 week ago