Question 5I Consider the following database instance. Table name: Student Primary key: SID SID SNAME Fred 1. Mack 3. Shell Table name: Course Primary key: CID CID CNAME Finance 2. CIS Table name: Register Primary key: SID,CID 2)

Oracle 12c: SQL
3rd Edition
ISBN:9781305251038
Author:Joan Casteel
Publisher:Joan Casteel
Chapter13: Views
Section: Chapter Questions
Problem 2MC
icon
Related questions
Question
Subtitle
Dictate
Font
Paragraph
A Select v
Styles
Editing
Voice
Question 5I
Consider the following database instance.
For each of the following questions, show the contents of the database (1,e, re-draw the
tables showing the data) after performing the given SQL statements. Assume each SQL
statement is performed on the original database instance considering the effect of the
previous statements, so these are done in the order listed. After each step the data is
committed (written) to the database.
Table name: Student
Primary key: SID
SID
SNAME
5.1)
2.
Fred
delete from Student where sid = 1:
commit:
Mack
Shell
Table name: Course
5.2)
Primary key: CID
update Course set cid 5 where cid 1:
commit:
CID
CNAME
1
Finance
CIS
Table name: Register
5.3)
Primary key: SID.CID
Foreign key: SID references Student(SID)
on delete cascade
insert Register values(3,2);
commit
Foreign key: CID references Course(CID)
on update cascade
CID
SID
2.
5.4)
1
2.
update Register set gid = 1 where sid=2
commit
Questions on next page:
A1 PM
10/26/2021
54 F Mostly sunny
of 6
931 words
P Type here to search
pg dn
pg up
delete
insert
prtsc
1>
17
2.
Transcribed Image Text:Subtitle Dictate Font Paragraph A Select v Styles Editing Voice Question 5I Consider the following database instance. For each of the following questions, show the contents of the database (1,e, re-draw the tables showing the data) after performing the given SQL statements. Assume each SQL statement is performed on the original database instance considering the effect of the previous statements, so these are done in the order listed. After each step the data is committed (written) to the database. Table name: Student Primary key: SID SID SNAME 5.1) 2. Fred delete from Student where sid = 1: commit: Mack Shell Table name: Course 5.2) Primary key: CID update Course set cid 5 where cid 1: commit: CID CNAME 1 Finance CIS Table name: Register 5.3) Primary key: SID.CID Foreign key: SID references Student(SID) on delete cascade insert Register values(3,2); commit Foreign key: CID references Course(CID) on update cascade CID SID 2. 5.4) 1 2. update Register set gid = 1 where sid=2 commit Questions on next page: A1 PM 10/26/2021 54 F Mostly sunny of 6 931 words P Type here to search pg dn pg up delete insert prtsc 1> 17 2.
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Table
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning