In focus

Basic Concepts Of DBMS

In this article we will learn about the basic concepts of DBMS.

Author Mar 16, 2016

Introduction
 
A database management system (DBMS) is system software for creating and managing databases. The DBMS provides users and programmers with a systematic way to create, retrieve, update and manage data.
 
DBMS 
 
Objectives of DBMS
 
The following objectives are used in DBMS
  • Data availability-The data availability is responsible for the cost performance and the query update. Availability functions make the database available to users helps in defining and creating a database and getting the data in and out of a database.

  • Data integrity-The data integrity provides protection for the existence of the database and maintaining the quality of the database.

  • Data independence- DBMS provides two types of data independences. First is a physical data independence program, which remains unaffected from the changes in the storage structure or access method, and the second is the logical data independence program, which remains unaffected from the changes in the schema.
ACID Properties
 
ACID properties are an important concept for databases. The acronym stands for Atomicity, Consistency, Isolation, and Durability. The ACID properties of a DBMS allow safe sharing of data. Without these ACID properties, everyday occurrences such using computer systems to buy products would be difficult and the potential for inaccuracy would be huge.
 
The following basic concepts are used in database management systems (DBMS)
  • Atomicity
  • Consistency
  • Isolation
  • Durability
Atomicity
 
The first ACID property is atomicity. When an update occurs to a database, either all or none of the update becomes available to anyone beyond the user or application performing the update. This update to the database is called a transaction and it either commits or aborts. This means that only a fragment of the update cannot be placed into the database, should a problem occur with either the hardware or the software involved.
 
Features to consider for atomicity
  • It is maintained in the presence of deadlocks.
  • It is maintained in the presence of database software failures.
  • It is maintained in the presence of application software failures.
  • It is maintained in the presence of CPU failures.
  • It can be turned off at the system level.
  • It can be turned off at the session level.
Consistency
 
Consistency is the ACID property that ensures that any changes to values in an instance are consistent with changes to other values in the same instance. A consistency constraint is a predicate on data which serves as a precondition, post-condition, and transformation condition on any transaction.
 
Isolation
 
The isolation portion of the ACID Properties is needed when there are concurrent transactions. Concurrent transactions are transactions that occur at the same time, such as shared multiple users accessing shared objects.
 
Durability
 
Maintaining updates of committed transactions is critical. These updates must never be lost. The ACID property of durability addresses this need. Durability refers to the ability of the system to recover committed transaction updates if either the system or the storage media fails.
 
Features to consider for durability
  • Recovery to the most recent successful commit after an application software failure.
  • Recovery to the most recent successful backup after a disk failure.
  • Recovery to the most recent successful commit after a CPU failure.
  • Recovery to the most recent successful commit after a data disk failure.
  • Recovery to the most recent successful backup after a disk failure.
Concurrency Control and Locking
 
Concurrency control and locking is the mechanism used by DBMSs for the sharing of data. Atomicity, consistency, and isolation are achieved through concurrency control and locking.
 
The amount of data that can be locked with the single instance or groups of instances defines the granularity of the lock.
 
The types of granularity are illustrated here are
  • Page Locking
  • Cluster Locking
  • Class or Table Locking
  • Object or Instance Locking
Page Locking
 
Page locking (or page-level locking) concurrency control is shown in the figure below. In this situation, all the data on a specific page are locked. A page is a common unit of storage in computer systems and is used by all types of DBMSs. In this figure, each rectangle represents a page. Locking for objects is on the left and page locking for relational tuples is on the right. If the concept of pages is new to you, just think of a page as a unit of space on the disk where multiple data instances are stored.
 
database1 
 
Cluster Locking
 
Cluster locking or container locking for concurrency control is illustrated in the figure below. In this form of locking, all data clustered together (on a page or multiple pages) will be locked simultaneously. This applies only to clusters of objects in ODBMSs. Note that in this example, the cluster of objects spans portions of three pages.
 
database2 
 
Class or Table Locking
 
Class or table locking means that all instances of either a class or table are locked, as is illustrated below. This shows one form of concurrency control. Note the circle at the lower left. It represents all instances of a class, regardless of the page where they are stored.
 
database3 
 
 
Object or Instance Locking
 
Instance locking locks a single relational tuple in an RDBMS or a single object in an ODBMS. This type of concurrency control is illustrated below.
 
database4 

acid data database dbms

COMMENT USING