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)

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
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
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education