Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You are given the following CREATE TABLE statements: CREATE TABLE Programme programmeld VARCHAR(5) programmeName VARCHAR(30) NOT NULL, years INT PRIMARY KEY (programmeld)); CREATE TABLE Student

image text in transcribed
image text in transcribed
image text in transcribed
You are given the following CREATE TABLE statements: CREATE TABLE Programme programmeld VARCHAR(5) programmeName VARCHAR(30) NOT NULL, years INT PRIMARY KEY (programmeld)); CREATE TABLE Student studentNo VARCHAR(5) studentName VARCHAR(30) NOT NULL age INT, programmeld VARCHAR(5). PRIMARY KEY (studentNo) FOREIGN KEY (programmeld) REFERENCES Programme(programmeld) ON DELETE SET NULL); You are further given the following instance of the two tables: programmeld programmeName years studentNo CSAD MSc Advanced Computer 2020134 Science 2020345 CSAI MSc Advanced Computer 2 2020938 Science with a Year in Industry 2020436 CSMS MSc Computer Science 1 2020582 CDSM MSc Data Science and 1 2020358 Artificial Intelligence OZOM MSc Data Science and 2020175 Artificial Intelligence with a 2020043 Year in Industry 2020836 programmeld CSAD CSAD NULL CSAI student Name age John White 19 Ann Beech 18 David Ford 19 Mary Howe 20 Susan Brand 19 Julie Lee 19 Alice While 18 Chang Huang 18 Adam Smith 17 CSMS CSMS CSMS CZDM CZDM Which of the following queries is/are allowed by SQL? (1) DELETE FROM Programme WHERE programmeld = 'CDSM': (ii) DELETE FROM Programme WHERE programmeld = 'CSMS': (iii) DELETE FROM Student WHERE studentNo = '2020134': (iv) DELETE FROM Student WHERE studentNo = '2020938': () UPDATE Programme SET programmeld = 'CZDA WHERE programmeld = 'CZDM': (vi) UPDATE Programme SET programmeld = 'CDSA' WHERE programmeld = 'CDSM': (vii) UPDATE Student SET programmeld = 'CSMSP WHERE programmeld = 'CSMS'; WHERE studentNo = '2020938'; (V) UPDATE Programme SET programmeld = 'CZDA WHERE programmeld = 'CZDM'; = (vi) UPDATE Programme SET programmeld = 'CDSA WHERE programmeld = 'CDSM'; (vii) UPDATE Student SET programmeld = 'CSMSP WHERE programmeld 'CSMS'; O 00). (ii), (iii) and (iv) only O 6). (iii), (iv), (v) and (vi) only (iii), (iv) and (vii) only O 0) (i), (iii), (iv) and (vi) only O (v). (viand (vii) only

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Business Process Driven Database Design With Oracle PL SQL

Authors: Rajeev Kaula

1st Edition

1795532386, 978-1795532389

More Books

Students also viewed these Databases questions