Database Systems Lab Exercises Create a table Faculty based on the following chart: Column Data type Constraints Faculty_Id Number (6) Primary Key => faculty_pk Last_Name Varchar2(15) Not...

70.2K

Verified Solution

Question

Programming

Database Systems

Lab Exercises

  1. Create a table Faculty based on the followingchart:

Column

Data type

Constraints

Faculty_Id

Number (6)

Primary Key => faculty_pk

Last_Name

Varchar2(15)

Not NULL

First_Name

Varchar2(15)

Not NULL

Dept

Char(3)

Save the SQL statement as ex1.sql. Confirm and validatethe creation of the new table.

  1. Create a table Dept based on the followingchart:

Column

Data type

Constraints

Dept_Code

Char (3)

Primary Key => dept_pk

Dept_Name

Varchar2(20)

Not NULL

Save the SQL statement as ex2.sql. Confirm and validatethe creation of the new table.

  1. Add a new column Location toDept table which has data type Char(7). Save theSQL statement as exsql. Confirm and validate themodification of the table.
  2. Add a new FOREIGN KEY constraint (namedfaculty_dept_fk) to column Dept onFaculty table that refers to columnDept_Code on Dept table. AddON DELETE CASCADE option. Save the SQL statementas exsql. Confirm and validate the modification of thetable.
  1. Increase Last_Name column to25 characters long. Save the SQL statement asexsql. Confirm and validate the modification of thetable

use this to draw https://www.diagrameditor.com/

Answer & Explanation Solved by verified expert
3.7 Ratings (543 Votes)
Ex1sqlCREATE TABLE Faculty FacultyId Number 6 NOT NULL LastName Varchar215 NOT NULL FirstName Varchar215 NOT NULL Dept Char3 CONSTRAINT Facultypk PRIMARY KEYFacultyId    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students