Database Transactions

Transactions Terms

Introducation – 

Concept of Database Transaction –

Transaction Execution –

System View of Transaction – 

Rollback Operation

Commit Operation

Transaction Handling Issues

Transaction Properties (ACID Properties)

1. AUTOMICITY

2. CONSISTENCY

3. ISOLATION

4. DURABILITY

Transaction Control Command

 BEGIN or BEGIN WORK or START TRANSACTION

COMMIT or COMMIT WORK (WORK keyword is optional)

ROLLBACK or ROLLBACK WORK (WORK keyword is optional)

SAVEPOINT

SET AUTOCOMMIT

 

Create table – 

(With INTEGRITY CONSTRAINTS)

 CREATE TABLE Students

 (

    S_ID integer PRIMARY KEY,

    NAME char(30) NOT NULL,

    GENDER enum(‘M’, ‘F’, ‘O’),

    SUBJECT enum(‘MATH’, ‘COMMERCE’, ‘BIOLOGY’ ,’ART’),

    CLASS char(4),

    SECTION enum(‘A’, ‘B’, ‘C’, ‘Z’),

    BIRTH_DATE date,

    School_Name varchar(40) DEFAULT ‘KV HARDA’,

    CHECK (ID>1000)

 );

Leave a Reply

Your email address will not be published. Required fields are marked *