Skip to main content

Introduction to DBMS

Introduction to DBMS

In typical business environment, it is always essential to be able to produce the right information at the right time with minimum efforts.


The database shows a change in storage, access and management of data.


A DBMS (Database Management System) is a complex software system that is used to manage, store and manipulate data in the database.


It is utilized by a large variety of users, to retrieve and manipulate data under its control.


The users could be utilizing that database concurrently from on-line terminals and/or in a batch environment via application programs written in a high-level language.


Data and Information

Data can be defined as a representation of facts, concepts or instructions. Information is organized or classified data so that it has some meaningful values. Information is the processed data on which few decisions or actions can be taken.


The processed data must have the following characteristics:


Timely: Information should be available when required. Accuracy: Information should be accurate. Completeness: Information should be complete.


Defination of DBMS

In any organization, data is the basic resource needed to run the organization. This is required by decision makers for processing and retrieving information. Data: A data is collection of information or real fact which can be recorded and have implicit meaning. Customer_name, item-price, balance etc. can be considered as data.


Database

The database stores the information useful to an organization.


A database is shared collection of inter-related data, which is designed to fulfil the information needs.


For example Consider the name, telephone number and addresses of the people you know. This data is recorded in an indexed address book, or stored on a disk, or using a personal computer. This is a collection of related data with an implicit meaning and hence is a database.


A database uses the following implicit properties.


A database represents some aspect of the real world, sometimes called the miniworld. Changes to the miniworld are reflected in the database.


A database is a logical collection of data with some meaning. A random mixture of data cannot be termed as a database.


A database is designed, built and populated with data for a specific purpose. It has an intended group of users.


So, finally we can say that a database has some source from which data are derived, some degree of interaction with events in the real world, and an audience that is actively interested in the contents of the database.


A Database Management System (DBMS) is a software system that allows the user to define, manipulate and process the data in a database, in order to produce meaningful information.


The basic functions of DBMS are
To store data in a database. To organize the data. To control access of data. To protect data i.e. provide security.

Defining a database involves specifying the data types, structures and constraints for the data to be stored in the database.


Constructing the database means storing the data itself on some storage medium that is controlled by the DBMS.


Manipulating a database includes such functions as querying the database to retrieve specific data, updating the database to reflect changes in the miniworld, and generating reports from the data.


So in general, user can write programs or queries; while DBMS use the database stored on storage devices and gives meaningful information.


Applications of DBMS

DBMS is used for organizing, analyzing and modifying the informations stored in a database.


There are various applications available. These are listed below


Computerized Library System. Automated Teller Machines (ATMs). Airlines (flight) Reservation System. Inventory Management System. Fashion designing. Banking.


Universities - Registration, Grades. Sales - Customer, Product, Purchases. Manufacturing - Production, Inventory, Orders, Supply Chain etc.


FILE PROCESSING SYSTEM VS DBMS

In file processing system, the records are stored in file is called a flat file. To access the data from these flat files, various programs are written.


If user wants simple change in the resultant database, lot of changes are needed in the application programs. As system became more complex file processing system losses its flexibility.


A DBMS is a piece of software that is designed to make all tasks easier. By storing a data in DBMS, rather than in files, we can use the DBMS feature to manage the data in a robust and efficient manner.


The major components of DBMS are as follows

Applications

The user can write the queries or PL/SQL statements to get some results


Transaction Management

A transaction is a set of database operations in a particular order. A transaction can update a record, delete a record or modify set of records.


To save(store) these changes permanently in database, commit the changes. If you do not want to save(store) the change permanently, roll back it.


Concurrency Control

It is database activity which co-ordinates the action of database manipulation.


Recovery Management

This ensures that aborted or failed transaction does not create any unfavorable effect on the database.


Security Management

The data should be protected against unauthorized access. Security management ensures that only authenticated users should have access to the database. It provides access privileges to users.


Storage Management

DBMS provide this facility/service to store the data permanently in secondary storage device. It also interfaces with operating system to access the physical storage.


Characteristics of DBMS

Users file approach

In file processing, each user defines and implements files needed for a specific application.


Hence more storage space is required. In DBMS, a single database is maintained that is defined once and is accessed by various users.


DBMS software is not written for specific application


Self-describing nature of DBMS system

A DBMS contains database as well as a complete definition of the database, which is stored in the system catalog.


It contains information such as structure of each file, the type and storage format of each data item and various constraints of the data.


The catalog is used by DBMS software by database users who need information about database.


For example, a company databases, a banking database, a university database. In DBMS the database definition is stored in the catalog. In File Processing, data definition is part of the application programs.


isolation between Programs and Data

DBMS access programs are written independently of any specific files. The structure of data files is stored in catalog separately from the access program (program-data independence).


In file processing, if any change in structure of file is made then, all programs that access this file have to be changed. Suppose we want to add any field in record of file (say birth_date in student file), then program has to be changed in file processing.


Multiple Views

DBMS supports multiple views of the data, which a file cannot Support. For example: one user is only interested for student mark list, other user is interested for courses attended by that student, these multi-user view are satisfied by DBMS.


Data sharing

Sharing of data is possible only in DBMS not in file processing.


Advantages of DBMS


Cost of software development is reduced. User can get proper logical organization of dataset. Centralization for multi-user is available. Centralized data reduces management problems and duplication data also. Data is independent. User can monitor database performance. Data redundancy and consistency are controllable. Program and data interdependency is decreased. Data flexibility is increased. Data integrity and its quality is maintained. Inconsistency of data is avoided. Same data can be shared by many application programs. Security to data is provided.


Comparison of File Processing System and DBMS File Processing System


File processing system

Pc based small system. Relatively cheap. Less number of files used. Single user system. Data redundancy and inconsistency occure Data access is difficult. Data is isolated. Concurrent access to a file is not possible Security problems. Little preliminary design. Example: c++, COBOL,vB. File system data sharing is not powerfullbas DBMS. Transaction concept is not used.


Database management system

Multi mainframe based large systems. Relatively expensive. More Number of files used. Multiple user system. Data is independent and non redundant. Data access is efficient. Data is integrated. Concurrent access and crash recovery possible. Better security. Vast preliminary design. Examples: Oracle, postgres. DBMS offers features of data sharing efficiently. The concept of transaction is an important aspect of DBMS.


Users of DBMS

The users of the database system can be classified on the basis of degree of expertise or mode of their interactions with DBMS.


There are 4 groups of users of DBMS Database designers. Applications programmers. Sophisticated users. End users.


Database Designers

There are two main database designers.
Database manager. Database administrator.
Database Manager
A database manager is supervising authority over the Database Administrator. A database manager manages and updates a database. The database manager has some knowledge about the database, but need not be having the same expertise as the database administrator.


Actually the database administrator takes care of the database. The database administrator can create, delete and update a database.


Database Administrator (DBA)

The DBA is an individual person or group of persons (a team) who must have a good knowledge in data processing. DBA must have sufficient technical knowledge to make decisions in the organization.


The DBA must manage the staff to ensure orderly development of the database project, to satisfy database users and to plan for future database requirements.


Responsibilities of DBA

Deciding information contents of the database i.e. decide conceptual and internal schema. The data dictionary is created by DBA, so users can query the dictionary. DBA decides the storage structures and access strategy i.e. which user can retrieve what.


Defines authorization checks and validation procedures. DBA checks validity before giving access. Define strategies for backups and recovery. Define security and integrity rules. DBA monitors the system performance.


Application Programmers

They are computer professionals. They are responsible for the development of application programs. For the development of application program, they use a general purpose programming language like C, COBOL and Pascal. By using these programs, these people handle or manipulate the databases.


Sophisticated Users

These people are also computer professional but they do not write programs. To interact with the system, they use query languages like SQL.


Specialized Users

They are sophisticated users. They write specialized database application programs. For example: Computer-aided design system, knowledge base and expert systems, etc.


End Users

End Users who unaware of the presence database system or any other system. These users are called as unsophisticated users who interact with system through already written permanent programs. They are also called as Naive users.


Data Models

DBMS allows us to store and retrieve data. Data consists of facts, which became information when they are processe.This information is conveyed to people. For example: if order and payments are the data, then balance due and the quantity in hand would be the information.


While designing a database, developer has to make decisions about the data which stored in a database. The structure and relationship of that data has to be decided.


So developer uses some methods to create a database for the user and system implementation. These methods are called Models.


A model defines the method of storing and retrieving data. A model is an abstraction process that hides the details which are not required while highlighting details required to the applications at hand.


A data model is a collection of conceptual tool for describing data, its relationship data semantics and data constraints.


A Data Model consists of: A named logical unit i.e. record type and data item.


Relationship among these logical units. Data item is logical unit of data and record type is collection of data items.


Actually, it provides abstraction of database application.


There are three types of data models available


Object Based Logical Models Record Based Logical Models Physical Data Models


Object based logical model


Entity Relationship model. Object Oriented model. Semantic data model. Functional data model.


Record based logical model

Relational model. Network model. Hierarchical model.


Physical data models

Unifying model. Frame memory model.

These model shows the implementation part. These model have three types in it.
Relational Model. Network Model. Hierarchical Model.


Relational Model

This model shows a collection of tables to represent both data and relationship. Each table consists of multiple columns and each column is recognized by a unique name.


For example: In a database, Customer table and Account table are two tables available.


The relationship between these two tables has been shown by a third table,where one field or column name from both the table is taken together. So a new table called Customer_Amt is formed.


Network Model

Data is represented by collection of records and the relationship among the data is represented by links. The records are organized as a collection of arbitrary graphs.


For example, in customer table extra field or column is considered, which consists of the address where account table information is stored. Information of each link represents the related record address.


Hierarchical Model

Data is similar to network model i.e. links or pointers used to show the relationships. Only change is that the records are organized as a collection of tree.


Physical Data Models

This model is used to describe data at the lowest level. It describes about the way of data stored in secondary storage device by representing information such as record formats, record ordering, access path etc.


It has two types of data models. Unifying model. Frame memory model.


Views of Data

A database management system is a collection of interrelated programs that allow users to access and modify these files. A main purpose of a database management system is to provide abstract view of the data.


Data abstraction means hiding the implementation details from the end users. DBMS uses the same principle. It hides the complex details of how the data is actually stored on the secondary storage device in DBMS.


There are three levels of data abstraction.

Physical Level
Physical level is the lower level of Architecture of DBMS. This level describes how the data is actually stored in a database. This level define data structure used to store the data on secondary storage device.


Conceptual Level

The conceptual level describes the structure of the whole database. The structure of each table is specified in terms of its attributes. Attribute type is specified in terms of logical structure of the database (Fig. 2.4). This level is decided by Database Administrator (DBA). This level also describes the relationships between various tables.


View Level

In multi-user system, many users do not use entire database, but read some fields of it. For security purpose DBMS allows to create different views of single table.


Because of this facility users will have separate logical structure (as shown in Fig), so original database remains as it is. This access is provided by DBA only.


At the physical level, employee record can be described as a block of consecutive storage location (For example: word or bytes).


At the conceptual level, each record is described by a type definition and in view level, different views of the database are defined.


For example, ATM machines in a bank see only that part of the database that has information on customer accounts. They cannot access information concerning salaries of employees.


Data Independance

Data independence means it is ability to change the overall logical or physical structure of the data without changing the application programs or views of data ie views created for users doesn’t have any change.


There are 2 levels of data independence

Physical Data Independence Logical Data Independance


Physical Data Independence

It is the ability to change the internal schema without having to change the conceptual or external schemas. For improving performance, we need to reorganize some physical files.


This requires to implement changes to the internal schema. In this, the conceptual schema separates the users from the changes in the physical storage of the data. Physical data independence is easier to achieve as compared to Logical Data Independence


Logical Data Independence

It is the ability to change the conceptual schema without having to change the application programs or external schemas. In this type of data independence, the users are protected from changes in the logical structure of the data.


Only the view definition and the mapping need be changed in DBMS that supports logical data independence.


Structure Of DBMS

Database Management System (DBMS) is a software that allows access to data stored in a database and provides an easy and effective method of –


Defining the information. Storing the information. Manipulating the information. Protecting the information from system crashes or data theft. Differentiating access permissions for different users.


The database system is divided into three components

Query Processor Storage Manager Disk Storage.


Query Processor

It interprets the requests (queries) received from end user via an application program into instructions. It also executes the user request which is received from the DML compiler. Query Processor contains the following components


DML Compiler

It processes the DML statements into low level instruction (machine language), so that they can be executed.


DDL Interpreter

It processes the DDL statements into a set of table containing meta data (data about data).


Embedded DML Pre-compiler

It processes DML statements embedded in an application program into procedural calls.


Query Optimizer

It executes the instruction generated by DML Compiler.

Storage Manager

Storage Manager is a program that provides an interface between the data stored in the database and the queries received. It is also known as Database Control System.


It maintains the consistency and integrity of the database by applying the constraints and executes the DCL statements. It is responsible for updating, storing, deleting, and retrieving data in the database. It contains the following components-


Authorization Manager

It ensures role-based access control, i.e,. checks whether the particular person is privileged to perform the requested operation or not.


Integrity Manager

It checks the integrity constraints when the database is modified.

Transaction Manager


A Transaction is a collection of operations that performs a single logical function in database application. Each transaction is unit of both atomicity & consistency.


Thus we require that transactions dont violet any database consistency constraints. That is database is consistent when transaction started,the database must be consistent when the transaction succesfully terminates.


It controls concurrent access by performing the operations in a scheduled way that it receives the transaction. Thus, it ensures that the database remains in the consistent state before and after the execution of a transaction.


File Manager


It manages the file space and the data structure used to represent information in the database.


Buffer Manager


It is responsible for cache memory and the transfer of data between the secondary storage and main memory.


Disk Storage


It contains the following components –


Data Files –

It stores the data.


Data Dictionary –


It contains the information about the structure of any database object. It is the repository of information that governs the metadata.


Indices –


It provides faster retrieval of data item.

Comments

Trending⚡

Happy birthday Hardik Pandya | In C programming

  Happy birthday Hardik Pandya . Now you are  28 years old. Great achievement you have. Let's we want to talk more about Hardik pandya. He is great cricketer. Pandya is awesome. In this Blog Post we are going to wish pandya " Happy birthday using C program". Let's tune with us till end. Now we have to wish pandya, so we are going to use printf () function printing message to pandya as " Happy birthday Hardik pandya Now you are 28 years old". Hardik pandya was born on 11 October in 1993. Now we are going to declare a variable called as current_age = 2021 - 1993. It calculate current age Of Hardik pandya. See the "Happy birthday pandya" using c programming. If you liked this Blog Post then don't forget to share with your computer science learning friends. Once again " Happy birthday Hardik Pandya sir". Read also Happy Rakshabandhan wish using C program Friendship day 2021 greetings in C

What is programming explained in simple words

Hi my dear friends today in this blog post we are going to know what programming is? In simple words I will explain to you programming. Nowadays we are watching real life use of programming. How computers learn to speak, talk and do the specified complex task for us. We are all keen to know what is exactly programming? Programming is the process of creating instructions that a computer can understand and execute. These instructions, also known as code, are written in a programming language that is specific to the task at hand. The history of programming can be traced back to the mid-20th century, with the development of the first electronic computers. The first programming languages were known as machine languages, which were specific to a particular type of computer. As computers became more sophisticated, high-level programming languages were developed, such as FORTRAN and COBOL, which were easier for humans to read and write. These languages allow programmers to write code t

check number is prime or odd or even using c program

Here is the c program to check if the user entered number is prime ,even and odd. These few lines of code solve three problems. In the above program we used integer type num variable for storing user entered numbers. Then we used the IF condition statement. That's all. IF condition for even number In the First IF statement we have a logic. If the number is divided by two then the reminder should be 0 then the number is an even number else not an even number. That simple logic is implemented in the first if statement. IF condition for odd number In the second IF statement we Implemented odd number logic. We identify odd numbers just by making little change in even number logic. If the number is divided by two then the reminder should not be a zero. Then the number is odd. That's simple logic used to identify whether a number is odd or not an odd number. IF condition for prime number In the third IF condition we implemented the logic of the prime number. In this IF

Graph Data Structure

Graph A graph can be defined as a group of vertices and edges that are used to connect these vertices. A graph can be seen as a cyclic tree, where the vertices (Nodes) maintain any complex relationship among them instead of having parent child relationship. A graph G can be defined as an ordered set G(V, E) where V(G) represents the set of vertices and E(G) represents the set of edges which are used to connect these vertices. A Graph G(V, E) with 5 vertices (A, B, C, D, E) and six edges ((A,B), (B,C), (C,E), (E,D), (D,B), (D,A)) is shown in the following figure. Directed and undirected graph Graph terminology Graph Representation Directed Graph Adjancency Matrix Graph Traversal Depth first search algorithm Directed and undirected graph A graph can be directed or undirected. However, in an undirected graph, edges are not associated with the directions with them. An undirected graph does not have any edges in directions. If an edge exists between ver

How to write programs in Bhai language

Bhai Language Bhai language is fun Programming language , with this language you can makes jokes in hindi. Bhai language written in typescript. It's very funny , easy and amazing language. Keywords of this language written in Hindi . Starting and ending of the program Start program with keyword " hi bhai " and end with " bye bhai ". It's compulsory to add this keyword before starting and end on the program. You write your programming logic inside this hi bhai and bye bhai . How to declare variables in Bhai language We use " bhai ye hai variable_name" keyword for declaring variables. In javascript we use var keyword for declaring variables but here you have to use " bhai ye hai " keyword. If you are declaring string then use " " double quotes. You can use Boolean variable like sahi and galat for true and false . How to print output in Bhai language You have to use " bol bhai " keyword for