• Non ci sono risultati.

Data Science And Database Technology Practice 4

N/A
N/A
Protected

Academic year: 2021

Condividi "Data Science And Database Technology Practice 4"

Copied!
8
0
0

Testo completo

(1)

Data Science And Database Technology

Practice 4 Exercise 1

IMP

DIP

Update statement

UPDATE DIP SET DNAME = 'SALES' WHERE DNAME='ACCOUNTING';

(2)
(3)

EXERCISE 2

CARDS

FLIGHTS

TICKETS

At the beginning the NOTIFY table is empty.

(4)

Trace of the trigger execution at step 1

INSERT INTO TICKETS (TICKETID, FLIGHTID, FLIGHTDATE, NAME, CARDNO) VALUES ('T02', 'RN12K', '01‐MAY‐07', 'PIPPO', NULL);

INSERT INTO TICKETS (TICKETID, FLIGHTID, FLIGHTDATE, NAME, CARDNO) VALUES ('T03', 'RN12K', '02‐APR‐07', 'BILL', 50);

TICKETS

CREDITS

STEP 2

Trace of the trigger execution at step 2

INSERT INTO TICKETS (TICKETID, FLIGHTID, FLIGHTDATE, NAME, CARDNO) VALUES ('T04', 'RN12K', '03‐MAG‐07', 'BILL', 50);

INSERT INTO TICKETS (TICKETID, FLIGHTID, FLIGHTDATE, NAME, CARDNO) VALUES ('T05', 'RN12K', '03‐MAG‐07', 'BILL', 50);

TICKETS

CREDITS

(5)

CARDS

STEP 3

Trace of the trigger execution at step 3

INSERT INTO TICKETS (TICKETID, FLIGHTID, FLIGHTDATE, NAME, CARDNO) VALUES ('T06', 'RN12K', '03‐MAY‐07', 'BILL', 50);

INSERT INTO TICKETS (TICKETID, FLIGHTID, FLIGHTDATE, NAME, CARDNO) VALUES ('T07', 'RN12K', '03‐MAY‐07', 'BILL', 50);

TICKETS

CARDS

(6)

CREDITS

NOTIFY

(7)

EXERCISE 3

IMP

A - Trigger to manage the insertion of a new record into the IMP table Insert statement

INSERT INTO IMP(EMPNO, ENAME, JOB, SAL) VALUES(4, 'NERI', 'CORRIERE', 750);

Database after the trigger execution IMP

SUMMARY

(8)

B - Trigger to manage the update of JOB on the IMP table 6) Update statement

UPDATE IMP SET JOB='CORRIERE' WHERE EMPNO=2;

IMP

SUMMARY

Riferimenti

Documenti correlati

‐‐‐insert into the credits table the miles for the customer INSERT INTO CREDITS(TICKETID, CARDNO, MILES) VALUES(:NEW.TICKETID, :NEW.CARDNO, FLIGHTMILES);. ‐‐‐STEP

It is possible to find this node in a join (specify the join conditions, as in the example image) or in filter operations on the attributes of a table (WHERE conditions)... -

• An access predicate indicates, in the case of a B + Tree index, that the data is selected based on a certain attribute by descending the tree hierarchy.

The statistics are made on the number of expressed votes, the average vote and the total incomes obtained by the production company by introducing advertisement in the applications

Performing a 10-fold Stratified Cross-Validation, what is the impact the maximal gain and maximal depth parameters on the average accuracy achieved by Decision Tree.. Report at least

The update on the MaxCalls attribute for a single cell could cause an inconsistent situation in which the MaxCalls value in the CELL table becomes smaller than the number of

Report the corresponding algebraic expression and specify the cardinality of each node (representing an inter- mediate result or a leaf). If necessary, assume a

Siccome le regole specificano il significato delle espressioni in modo operazionale, si dice che esse definiscono una semantica operazionale di tali espressioni. Alcune