Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use the 4 tables in the attachment as reference, write ONE SQL script to handle the following three functions: create, update, and delete. Create Create

Use the 4 tables in the attachment as reference, write ONE SQL script to handle the following three functions: create, update, and delete.

  1. Create

Create a database named IS3400. Then create 4 tables as shown in the attachment. The first column in each table is the primary key of that table. All primary keys should be varchar type. For other columns, use your best judgment to decide their value types. Also use your best judgement to define the appropriate constraints, i.e. primary key, foreign key, not null, and unique. Insert ALL records in the attachment to the 4 tables that you created.

  1. Update

Update Student Joe Smith to Joseph Smith. And update his email to be joseph@uccs.edu.

  1. Delete

Professor Jane Jobs has left the university. Delete her record in the Professor table.

At the very beginning of the SQL script file, write the following lines as comments.

# By Joe Smith (replace it with your name)

# Homework 1, xx/xx/xxxx (replace it with the submission date)

# Create, Update, and Delete

Save your code as HW1.sql.

Attachment

Student

SID

SFName

SLName

SEmail

SPhone

1111

James

Marks

jmas@uccs.edu

555-1111

1222

Jason

Marks

jmk@uccs.edu

555-1111

1333

Joe

Smith

joe@uccs.edu

555-5555

1444

John

Smith

john@uccs.edu

555-6666

1555

James

Jobs

jobs@uccs.edu

Professor

PID

PFName

PLName

PRank

PEmail

2111

James

Ma

Assistant Professor

jma@uccs.edu

2222

Jack

Jobs

Dean

jack@uccs.edu

2333

Jim

Johnsons

Assistant Professor

jim@uccs.edu

2444

Jill

Johnsons

Associate Professor

jill@uccs.edu

2555

Jane

Jobs

President

jane@uccs.edu

Course

CCallNum

CDept

CNumber

CTitle

3111

INFS

3000

MIS

3222

INFS

3000

MIS

3333

INFS

3080

Programming

3444

ACCT

1100

Accounting Intro

3555

MGMT

2050

Micro Econ

Enrollment

EID

YYear

Semester

SID

PID

CCallNum

4001

2013

Spring

1111

2111

3111

4002

2013

Spring

1111

2222

3444

4011

2014

Fall

1111

2111

3111

4014

2014

Fall

1222

2111

3111

4035

2014

Fall

1444

2111

3111

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

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2015 Porto Portugal September 7 11 2015 Proceedings Part 3 Lnai 9286

Authors: Albert Bifet ,Michael May ,Bianca Zadrozny ,Ricard Gavalda ,Dino Pedreschi ,Francesco Bonchi ,Jaime Cardoso ,Myra Spiliopoulou

1st Edition

3319234609, 978-3319234601

More Books

Students also viewed these Databases questions