Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2. (a) Explain, with an example, what the following statement means [6] A transaction may be correct in itself, but can still produce a wrong

image text in transcribed

2. (a) Explain, with an example, what the following statement means [6] A transaction may be correct in itself, but can still produce a wrong result when it is executed in par- allel with other transactions. (b) Explain in English what each of the following code fragments does: i. ttitle center 'Current Stock Value' skip 2 left - 'prepared by Officer right - &Todays_Date skip 4; btitle center format 999 SQL.PNO; ii. The following code creates a view in SQL: CREATE VIEW MyView AS SELECT S1.StoreCode, S1.StoreName, S1.Branch FROM Stores S1 WHERE S1. StoreCode NOT IN (SELECT FROM Stores S2 WHERE S2.Branch - London') WITH CHECK OPTION; What is a view, what does the above view do and what do we obtain as results when we perform the following? . SELECT COUNT(*) FROM MyView WHERE Branch - 'Cardiff'; INSERT INTO MyView VALUES ('S100', 'SuperStore', 'London'); [6] iii. SELECT M#, S# FROM Enrollment, Module WHERE Enrollment.M#(+) - Module.M# Module.M# LIKE CM%: AND [3] (c) Suppose that we have two tables Customer (Cust#, CustName) and Reservation (Flight#, Cust#). Outline how a PL/SQL trigger may be used to implement the following referential integrity: if the Cust# value in the Customer table is updated, the corresponding Cust# value in Reservation is set to 'Updated'. Precise PL/SQL code is not re quired to answer this question. (3)

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