Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Need answer ASAP For the first 2 questions, YOU first need to type each code and

ID: 641304 • Letter: N

Question

Need answer ASAP

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. 1 . Type the following relation schema and execute it. drop table STUDENT cascade constraints; create table Student ( 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 StudentNurrther from number ( 4 ) to number ( 10) b. Rename the attribute StudentNuznber to SID. (Assume that only the schema of the STUDENT table ?s created and the table is not populated yet) C. Rename the STUDENT table to STUDENTINFO. 2. Type the following code and execute it. drop table section casctcL?: constraints; create table section 1 CourseNo char(S) SectionlD nurnber(11, InstructorSSN number (k)), constraint sectionpk primary key (CourseNo, SectionlD), constraint section_ct check (instructorSSN is not null) ); a. Add an attribute deptName of varchar2(25). b. Disable the constraint section ct. C. Drop the attribute deptName. Use appropriate SQL command to answer the following questions: 3. List the names of all your tables (i.e. the tables under your schema.) 4. List the attribute names and data types oft he table STUDENTINFO; 5. List the constraints of the tables STUDENTINFO and SECTION respectively.

Explanation / Answer

1)
a)

ALTER TABLE Student
MODIFY StudentNumber number(10)

b)
ALTER TABLE Student rename column StudentNumber to SID

c)
RENAME Student to STUDENTINFO

2)
a)
ALTER TABLE section
ADD deptName varchar2(25)

b)
ALTER TABLE section
DROP CONSTRAINT section_ct

c)
ALTER TABLE section
DROP COLUMN deptName

3)
SELECT table_name from all_tables where owner = 'YOURSCHEMA';

4)
DESC STUDENTINFO

5)

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote