CBSE Class 12 Informatics Practices Transactions Procedures and Functions

Read and download CBSE Class 12 Informatics Practices Transactions Procedures and Functions in NCERT book for Class 12 Informatics Practices. You can download latest NCERT eBooks chapter wise in PDF format free from Studiestoday.com. This Informatics Practices textbook for Class 12 is designed by NCERT and is very useful for students. Please also refer to the NCERT solutions for Class 12 Informatics Practices to understand the answers of the exercise questions given at the end of this chapter

NCERT Book for Class 12 Informatics Practices Transactions Procedures And Functions

Class 12 Informatics Practices students should refer to the following NCERT Book Transactions Procedures And Functions in Class 12. This NCERT Book for Class 12 Informatics Practices will be very useful for exams and help you to score good marks

Transactions Procedures And Functions NCERT Book Class 12

Chapter – 4

Transactions, Procedures and

Functions

(Informatics Practices)

A transaction is a sequence of SQL statements to accomplish a single task.

Example: Transfer funds between bank accounts.

-- assume source_acct, dest_acct, amount,

-- and source_balance are defined

BEGIN

    SELECT balance INTO source_balance

    FROM Accounts WHERE acct# = source_acct;

    -- check whether sufficient funds

   UPDATE Accounts SET balance = balance-amount

    WHERE acct# = source_acct;

    UPDATE Accounts SET balance = balance+amount

    WHERE acct# = dest_acct;

    COMMIT;

    END;

Oracle treats such a sequence as an indivisible unit, to ensure that database is left in a consistent state. PL/SQL gives fine-grained control over progress of transaction. This also gives responsibility to ensure that transaction completes ok. The first SQL statement begins a transaction. COMMIT forces any changes made to be written to database. ROLLBACK restores database to state at start of transaction. Both COMMIT and ROLLBACK finish the transaction. Can achieve finer-grained rollback via savepoints:

BEGIN

...

UPDATE Employees SET ... WHERE id# = emp_id;

DELETE FROM Employees WHERE ...

...

SAVEPOINT more_changes;

...

-- make changes to Employees

-- possibly raise some_exception

...

COMMIT;

EXCEPTION

WHEN some_exception THEN ROLLBACK TO more_changes;

END;

Locking with Cursors

When accessing tables via a cursor, normally the table is locked. PL/SQL provides a mechanism to lock individual rows instead:

DECLARE

CURSOR managers IS

SELECT emp#, job, salary

FROM Employees WHERE job = 'Manager'

FOR UPDATE OF salary;

BEGIN

FOR e IN managers LOOP

UPDATE Employees SET salary = new_sal

WHERE CURRENT OF managers;

COMMIT;

END LOOP;

END;

PL/SQL provides packaging mechanism for small blocks of procedural code:

PROCEDURE ProcName(ArgList) IS

declarations;

BEGIN

statements;

EXCEPTION handlers;

END ProcName;

FUNCTION FuncName(ArgList) RETURN Type IS

declarations;

BEGIN

statements; -- including RETURN Expr;

EXCEPTION handlers;

END FuncName;


Please refer to attached file for CBSE Classs 12 Informatics Practices Transactions Procedures and Functions

NCERT Book Class 12 Informatics Practices Transactions Procedures And Functions

The above NCERT Books for Class 12 Informatics Practices Transactions Procedures And Functions have been published by NCERT for latest academic session. The textbook by NCERT for Transactions Procedures And Functions Informatics Practices Class 12 is being used by various schools and almost all education boards in India. Teachers have always recommended students to refer to Transactions Procedures And Functions NCERT etextbooks as the exams for Class 12 Informatics Practices are always asked as per the syllabus defined in these ebooks. These Class 12 Transactions Procedures And Functions book for Informatics Practices also includes collection of question. Along with Informatics Practices Class 12 NCERT Book in Pdf for Transactions Procedures And Functions we have provided all NCERT Books in English Medium for Class 12 which will be really helpful for students who have opted for english language as a medium. Class 12 students will need their books in English so we have provided them here for all subjects in Class 12.

Where can I download latest NCERT Book for Class 12 Informatics Practices Transactions Procedures And Functions

You can download the NCERT Book for Class 12 Informatics Practices Transactions Procedures And Functions for latest session from StudiesToday.com

Can I download the NCERT Books of Class 12 Informatics Practices Transactions Procedures And Functions in Pdf

Yes, you can click on the link above and download chapter wise NCERT Books in PDFs for Class 12 for Informatics Practices Transactions Procedures And Functions

Are the Class 12 Informatics Practices Transactions Procedures And Functions NCERT Book available for the latest session

Yes, the NCERT Book issued for Class 12 Informatics Practices Transactions Procedures And Functions have been made available here for latest academic session

How can I download the Class 12 Informatics Practices Transactions Procedures And Functions NCERT Book

You can easily access the link above and download the Class 12 NCERT Books Informatics Practices Transactions Procedures And Functions for each chapter