Docsity

Database Security and Concurrency Control: Mechanisms and Techniques, Slides of Database Management Systems (DBMS)

Partial preview of the text

Download Database Security and Concurrency Control: Mechanisms and Techniques and more Slides Database Management Systems (DBMS) in PDF only on Docsity!

Security and Transaction

Database Security is the mechanisms that

protect the database against intentional or

accidental threats.

A threat is any situation or event, whether

intentional or accidental, that will adversely

affect a system and consequently an

organization.

Computer-based security controls for

multi-user environment

  • Authorization
  • Views
  • Backup and recovery
  • Integrity
  • Encryption
  • RAID technology

Authorization

The granting of a right or privilege that

enables a subject to have legitimate

access to a system or a system’s object.

Authentication A mechanism that determines whether a user is who he or she claims to be.

Backup and Recovery

The process of periodically taking a copy

of the database and log file on to offline

storage media.

Integrity

Integrity constraints contribute to

maintaining a secure database

system by preventing data from

becoming invalid, and hence giving

misleading or incorrect results.

RAID

Redundant Array of Independent Disks

  • RAID works on having a large disk array comprising an arrangement of several independent disks that are organized to improve reliability and at the same time increase performance.
  • Performance is increased through data striping: the data is segmented into equal size partitions ( striping unit ) which are transparently distributed across multiple disks.
  • Reliability is improved through storing redundant information across the disks using a parity scheme or an error-correcting scheme.

Functions are intended to ensure the

database is reliable and remains in a

consistent state:

  • Transaction support
  • Concurrency control service
  • Recovery services

Properties of Transactions (ACID)

  • Atomicity : A transaction is either performed in its entirety or is not performed at all. It is the responsibility of the recovery subsystem of the DBMS to ensure atomicity.
  • Consistency : A transaction must transform the database from one consistent state to another consistent state. It is the responsibility of DBMS and the application developer to ensure consistency.

Transaction Properties (cont’d)

  • Isolation : Transactions execute independently of one another. It is the responsibility of the concurrency control subsystem to ensure isolation.
  • Durability : A successfully completed (committed) transaction are permanently recorded in the database. It is the responsibility of the recovery subsystem to ensure durability.

Potential problems caused by

concurrency

  • Lost update problem

An apparently successfully completed update operation by one user can be overridden by another user.

  • Uncommitted dependency problem

It occurs when one transaction is allowed to see the intermediate results of another transaction before it has committed.

  • Inconsistent analysis problem

It occurs when a transaction reads several values from the database but a second transaction updates some of them during the execution of the first. Docsity.com

The objective of Serializability is to find non-

serial schedules that allow transactions to

execute concurrently without interfering with

one another, and thereby produce a database

state that could be produce by a serial execution.

  • Schedule shows the sequence of the operations

of transaction.

  • Serial schedule : A schedule where the operations

of each transaction are executed consecutively without any interleaved operations from other transactions.

  • Non-serial schedule : A schedule where the

operations from a set of concurrent transactions are interleaved. Docsity.com

Two-phase locking

A transaction follows the two-phase

locking protocol if all locking operations

precede the first unlock operation in the

transaction.

  • Growing phase

It acquires all the locks needed but cannot release any locks.

  • Shrinking phase

It releases its locks but cannot acquire any new locks.

Two-phase locking (cont’d)

It never releases any lock until it has reached

the stage where no new locks are needed.

The rules are:

  • A transaction must acquire a lock on an item before

operating on the item. The lock may be read or write, depending on the type of access needed.

  • Once the transaction releases a lock, it can never

acquire any new locks.