Question: Assignment 3 SQL Assignment 2 For the first 2 questions, you first need to type each code and execute them on Oracle, and then try

 Assignment 3 SQL Assignment 2 For the first 2 questions, you

Assignment 3 SQL Assignment 2 For the first 2 questions, you first need to type each code and execute them on Oracle, and then try to make changes to the schemas by using appropriate table-altering commands. Type the following relation schema and execute it drop table STUDENT cascade constraints; create table Student 1. name varchar2 (30) not null, StudentNumber number (4) not null, class number (2) , major varchar2 (4), primary key (StudentNumber)) a. Change the data type of StudentNumber from number (4) to number (10) b. Rename the attribute StudentNumber to SID. (Assume that only the schema of the STUDENT table is created and the table is not populated yet) Rename the STUDENT table to STUDENTINFO c. 2. Type the following code and execute it. drop table section cascade constraints; create table section ( CourseNo char (8), SectionID number (4) , InstructorSSN number (9), constraint section_pk primary key (CourseNo, SectionID), constraint section ct check (instructorSSN is not ull) ) Add an attribute deptName of varchar2(25) Disable the constraint section ct. a. b. c. Drop the attribute deptName. 3. Be sure you are done with the first two questions before proceeding to the question No. 3 a. Download createDB.sql and execute it. b. Update the prerequisite of the course CS3320 to CS1310. c. Delete all the prerequisites for the course CS3380 Use appropriate SQL command to answer the following questions: 4. List the names of all your tables (i.e. the tables under your schema.) 5. List the attribute names and data types of the table STUDENTINFO

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!