Monday, January 14, 2019

Functions of DBMS

Functions of DBMS: 

DBMS performs several important functions that guarantee the integrity and consistency of the data in the database. The most important functions of Database Management System are:
1.      Data Dictionary Management:
DBMS stores definitions of the data elements and their relationships (metadata) in a data dictionary. The DBMS uses the data dictionary to look up the required data component structures and relationships which relieves you from coding such complex relationships in each program. Additionally, any changes made in a database structure are automatically recorded in the data dictionary, thereby freeing you from having to modify all of the programs that access the changed structure.
2.      Data Storage Management:
The DBMS creates and manages the complex structures required for data storage, thus relieving you from the difficult task of defining and programming the physical data characteristics. It provides a mechanism for management of permanent storage of the data. The internal schema defines how the data should be stored by the storage management mechanism and the storage manager interfaces with the operating system to access the physical storage.
3.      Data Transformation and Presentation:
The DBMS transforms entered data in to required data structures. By using the data transformation and presentation function the DBMS can determine the difference between logical and physical data formats. That is, the DBMS formats the physically retrieved data to make it conform to the user’s logical expectations.
For example, imagine an enterprise database used by a multinational company. An end user in England would expect to enter data such as July 11, 2009, as “11/07/2009.” In contrast, the same date would be entered in the United States as “07/11/2009.” Regardless of the data presentation format, the DBMS system must manage the date in the proper format for each country.
4.      Security Management:
Security Management is another important function of the Database Management System. The DBMS creates a security system that enforces user security and data privacy. Security rules determine which users can access the database, which data items each user can access, and which data operations (read, add, delete, or modify) the user can perform. This is especially important in multiuser database systems.
5.      Multiuser Access Control:
To provide data integrity and data consistency, the DBMS uses sophisticated algorithms to ensure that multiple users can access the database concurrently without compromising the integrity of the database. Multiuser access control is a very useful tool in a DBMS, it enables multiple users to access the database simultaneously without affecting the integrity of the database.
6.      Backup and Recovery Management
The DBMS provides backup and data recovery to ensure data safety and integrity. Current DBMS systems provide special utilities that allow the DBA to perform routine and special backup and restore procedures.
Recovery management deals with the recovery of the database after a failure, such as a bad sector in the disk or a power failure. Such capability is critical to preserving the database’s integrity.
7.      Data Integrity Management
The DBMS promotes and enforces integrity rules, thus minimizing data redundancy and maximizing data consistency. The data relationships stored in the data dictionary are used to enforce data integrity. Ensuring data integrity is especially important in transaction-oriented database systems.
8.      Database Access Languages and Application Programming Interfaces:
The DBMS provides data access through a query language. A query language is a non-procedural language—one that lets the user specify what must be done without having to specify how it is to be done. Structured Query Language (SQL) is the default query language and data access standard supported by the majority of DBMS vendors.
9.      Database Communication interfaces:
This refers to how a DBMS can accept different end user requests through different network environments. For example, the DBMS might provide access to the database via the Internet through the use of Web browsers such as Mozilla Firefox or Microsoft Internet Explorer. In this environment, communications can be accomplished in several ways.


-profshardulp.patil@gmail.com

File Processing System

File Processing System:
File processing systems was an early attempt to computerize the manual filing system. A file system is a method for storing and organizing computer files and the data they contain to make it easy to find and access them. Before DBMS was invented, Information was stored using File Processing System. In this System, data is stored in permanent system files (secondary Storage). Different application programs are written to extract data from these files and to add record to these files. File systems may use a storage device such as a hard disk or CD-ROM and involve maintaining the physical location of the files.
Here is the list of some important characteristics of file processing system:
§  It is a group of files storing data of an organization.
§  Each file is independent from one another.
§  Each file is called a flat file.
§  Each file contained and processed information for one specific function, such as accounting or inventory.
§  Files are designed by using programs written in programming languages such as COBOL, C, C++.
§   The physical implementation and access procedures are written into database application; therefore, physical changes resulted in intensive rework on the part of the programmer.
§  As systems became more complex, file processing systems offered little flexibility, presented many limitations, and were difficult to maintain.

Disadvantages of File System:
1. Data Redundancy and Inconsistency:
It is possible that the same information may be duplicated in different files. This results in data redundancy and inconsistency.
Consider following two data files:
Saving account data file: Stores information about customer. {acc_no, name, social_security, addr, teleph_no};
Checking account data file: Stores information about customer. {acc_no, name, social_security, addr, teleph_no};
Fields  {name, social_security, addr, teleph_no} are same in both the files i.e. Duplication of data is there which results data redundancy.
Data Redundancy increases the cost of storing & retrieving the data. Various copies of same data may contain different values then it results in Inconstancy of data. It may create a risk of out dated values of data.
For Example: If you change customer name in saving account data file then his name should be changed in all other files related to customer.
2. Difficulty in Accessing the Data:
File processing system doesn't allow needed data to be retrieved in a convenient and efficient manner. If a user wants information in a specific manner then he requires creating a program for it.
For Example, consider a data file, Saving account data file with fields {acc_no, name, social_security, addr, balance}. Application programs to access the data are written. But if user wants to display only those records for which balance is greater than Rs:10,000 and is that program is not written, then it’s difficult to access that data.
3. Data Isolation:
Because data are scattered in various files, and files may be in different formats, it is difficult to write new application programs to retrieve the appropriate data. If you want to extract data from two file then you are required to which part of the file is needed and how they are related to each other.
4. Integrity Problems:
A collection of data is integrated if it meets certain consistency constraints. A programmer always puts these constraints in the programs by adding some codes. In File Processing System, poor data integrity often arises and it becomes very difficult to add new constraints at that time.
For Example: The maximum marks of the student can never be more than 100.
5. Atomicity problem:
Atomicity is required to save the data values, it means that information is completely entered or canceled at all. Any system may fail at any time and at that time it is desired that data should be in a consistent state. A computer system is subject failure. In many applications, it is crucial to ensure that, once a failure has occurred and has been detected, the data are stored to the consistent state that existed prior to the failure. It is difficult to ensure this property in a conventional file-processing system.
For Example: If you are buying a ticket from railway and you are in the process of money transaction. Suddenly, your internet got disconnected then you may or may not have paid for the ticket. If you have paid then your ticket will be booked and if not then you will not be charged anything. That is called consistent state, means you have paid or not.
6. Concurrent-access anomalies:
If multiple users are updating the same data simultaneously it will result in inconsistent data state. In file processing system it is very difficult to handle this using program code. This results in concurrent access anomalies.
For example, a student wants to borrow a book from the library. He searches for the book in the library file and sees that only one copy is available. At the same time another student also, wants to borrow same book and checks that one copy available. First student opt for borrow and gets the book. But it is still not updated to zero copy in the file and the second student also opt for borrow! But there are no books available. This is the problem of concurrent access in the file system.
7. Security Problems:
Poor data security is the most threatening problem in File Processing System. There is very less security in File Processing System as anyone can easily modify and change the data stored in the files. All the users must have some restriction of accessing data up to a level.
For Example: If a student can access his data in the college library then he can easily change books issued date. Also he can change his fine detains to zero.


Comparison of File Management and DBMS:

-profshardulp.patil@gmail.com

Friday, January 4, 2019

Introduction to DBMS

Database:
Definition -
“A database is a collection of information that is organized so that it can easily be accessed, managed, and updated.”
Database is actually a place where related piece of information is stored and various operations can be performed on it. Database is a collection of related data and data is a collection of facts and figures that can be processed to produce information. Mostly data represents recordable facts. Data helps in producing information, which is based on facts. For example, if we have data about marks obtained by all students, we can then conclude about toppers and average marks. Data is organized into rows, columns and tables, and it is indexed to make it easier to find relevant information. Data gets updated, expanded and deleted as new information is added. In computing, databases are sometimes classified according to their organizational approach. Computer databases typically contain aggregations of data records or files, such as sales transactions, product catalogs and inventories, and customer profiles.
The main feature of data in a database is:
1. It must be well organized
2. It is related
3. It is accessible in a logical order without any difficulty
4. It is stored only once.
Database Management System:
            A DBMS is software that allows creation, definition and manipulation of database. DBMS is actually a tool used to perform any kind of operation on data in database. DBMS also provides protection and security to database. It maintains data consistency in case of multiple users. Here are some examples of popular dbms, MySql, Oracle, Sybase, Microsoft Access and IBM DB2 etc.

Definition:
“A database management system (DBMS) refers to the technology for creating and managing databases. Basically DBMS is a software tool to organize (create, retrieve, update and manage) data in a database.”
“A database management system consists of collection of related data and refers to a set of programs for defining, creation, maintenance and manipulation of a database.”
The main aim of a DBMS is to supply a way to store up and retrieve database information that is both convenient and efficient. By data, we mean known facts that can be recorded and that have embedded meaning.
Needs of DBMS:
1. To share data of all kinds between users, between tools working on them, and usually between different computers. All should be able to work with the same data.
2. For persistent storage and storage must be reliable.
3. Provide more efficient access to large amounts of data, through indexing and other optimization.
4. A DBMS can be used for communication between different users and applications. Accurate, up-to-date information is fetched as per requirement of the user at any time.

-profshardulp.patil@gmail.com

Wednesday, January 2, 2019

Components of DBMS

Components of DBMS:
DBMS have several components, each performing very significant tasks in the database management system environment. Below is a list of components within the database and its environment.




1. Data:
Data is the most important component of the DBMS. DBMS exists to collect, store, process and access data, the most important component. The database contains both the actual or operational data and the metadata. User Data consists of table of data columns are attribute and rows are record. Metadata means description of structure of database. It means data about data.
2. Hardware:
Consists of a set of physical electronic devices such as computers, I/O devices, storage devices, etc., this provides the interface between computers and the real world systems.
3. Software:
This is the set of programs used to control and manage the overall database. This includes the DBMS software itself, the Operating System, the network software being used to share the data among users, and the application programs used to access data in the DBMS.
4. Users:
The users are the people who manage the databases and perform different operations on the databases in the database system. There are four kinds of people who play different roles in database system.
· DBA (Database Administrator)
· Database Designers
· End Users
·  Application Programmers
      5. Procedures:
Procedures refer to the instructions and rules that help to design the database and to use the DBMS. The users that operate and manage the DBMS require documented procedures on hot use or run the database management system. These may include procedure to install the new DBMS, to log on, to use to make backup copies to change the structure to generate the reports of data retrieved from database, etc.
6.  Database Access Language:
This is used to access the data to and from the database, to enter new data, update existing data, or retrieve required data from databases. The user writes a set of appropriate commands in a database access language, submits these to the DBMS, which then processes the data and generates and displays a set of results into a user readable form.

-profshardulp.patil@gmail.com