DBMS - Migration in DBMS

Migration in DBMS In an application, It is quite inevitable to have changes on the database. The changes can be on the structure of data or even the data itself. It is a good idea to apply changes to a database as versioned and reversible set of steps. A representation of changes to be done the database can be called Migration. Two types of migration are Schema and Data migrations....

DBMS - Query performance

Query performance in DBMS When we query a database there are certain operations performed, the main operation to consider is the type of scan it would result in. The performance is calculated based on the time taken to do the operations. Various types of operations have different costs based on disk and CPU usage. Cost can be assumed to be the amount of time taken. Therefore, lower the cost better the performance (faster response from DB)...

DBMS - Indexing data

Indexing data in DBMS Indexing in the database can be similar to an index in front of a book that shows the title and its page number, DB stores these in B-Tree or LSM Tree structures to search through them as fast as possible. Indexing improves the data lookup speed but not always. An index is the fastest when it requires lesser random disk access. We know that the data is stored on disk and therefore, Fragmentation of data is more important in performance....

DBMS - Persistence

Database data storage on disk Database persists information on disk in different forms like flat files, ISAM, heap files etc.. Depending on the Database Engine. In a common scenario, we store some information typed into a text editor by clicking save and choosing a location. Similarly, database saves our data into a configured location, mostly in a bit complicated structure than a text file. Database engines will structure the data and files in different ways to be able to retrieve them faster....

DBMS - ACID Properties

ACID Properties in DBMS The concept of transaction enables the correctness of data in a database, it is achieved by maintaining ACID properties. 1. Atomicity Atomicity is the assurance of DBMS that a transaction will always be either done or not done. Duh… But wait, there are situations where the transactions won’t reach the COMMIT / ROLLBACK, Database program crashes Your OS crashes Computer got restarted etc… In these conditions, the Database ensures that the existing data is not at all affected....

DBMS - Transactions

Transaction in RDBMS Transaction can be defined as a smallest unit of work. In simple words, A single task or operation with one or multiple steps. It can be considered as one of the core concepts in DBMS (A unit of work is generally important to understand in all systems) Let’s see some transactions in our Magic Library A reader asks for a book: The librarian finds the book and gives it to the reader....

DBMS - Introduction

Introduction to DBMS DBMS: A DataBase Management System is simply a program that stores data into a storage space. It knows how to sort and filter the data with various parameters and often does some processing with data. It can also organise the data in an optimal structure such that its faster to sort and filter them. DBMS or RDBMS ? DBMS is generally a management program for data. RDBMS is a DBMS that organize data based on tables, data is organized as rows and columns inside a table structure....