Table of Contents
Think about small data like phone numbers of friends, grocery items list, etc. It is easy to store these information on a piece of paper and retrieve when you need them. An individual can manage it well. Now imagine a large organization that store huge number of data year after year. They need to setup an information system that store , update it regularly, secure, reliable and people should be able to retrieve it quickly in an efficient manner. The core of such an information system is the database management system. In short, DBMS.
This database system has a single goal and it is to provide a consistent environment to store, update and efficient retrieval of data in an organized manner. Other operations of database system is to secure the data servers, and take various security measures, give concurrency control to database, which means manage access to database by multiple users at the same time, database recovery in case of crash, or failure of database servers. Its not necessary that data is always stored on a servers, because an information system can contain various types of storage hardware.
Now that you understand core function of a database management system or DBMS. Let’s talk about most important component of this system – the database.
“A database is structured collection of related data”.
I have to elaborate the definition. Here structured collection means that the data is organized in such a manner that it make storage easy, and retrieval efficient and faster.
The word related data is referring to the type of data stored which may be images, records , or database of audio/video files. The data is related because of its shared attributes or common properties that help in categorizing data in the form of a database.
Tasks Performed by a Database
You know what get stored in a database from its definition. To maintain a consistent database with updated information, it has to perform certain tasks. These are
- Add files to database that store information permanently.
- Add data to files in the form of records, relations, and various logical structures.
- Help retrieve data for users and applications including database administrators.
- Update new data.
- Delete data from files.
- Remove database files if necessary.
The tasks are called basic database operations of DBMS. Data record creation, reading data, updating data and deleting data are core functions to maintain databases.
There are other features about database management systems which I will discuss in next sections.
Features of DBMS
In modern database systems , you will find three common features listed below.
- Data Independence
- External Schema or Views
- Query Mechanism
Each of these features enable database operations , manage consistent database , efficient data retrieval and security to database systems. I will briefly discuss each of these features just enough for you to understand and later on I will elaborate on these topics in a different article.
Data Independence
The idea of data independence is very simple idea that we should able to modify database schemas or database levels without affecting the higher level schemas. A schema is structure and organization of the database at three levels.
- Physical Schemas
- Conceptual Schemas
- External Schemas
The physical schemas are related to how database stores information physically, and database indexes for quick searches. The level above physical schema is the conceptual schemas or logical schema. The external schemas are above logical schemas and it is the highest level of three level schema structure.
The ability to change the structure of physical schema without affecting higher schemas like logical schema or external schema is called physical data independence. Physical data independence is also called the internal data independence.
DBMS query is a user request to manipulate databases and these user requests are translated / executed using a Structured Query Language (SQL). Each database query must go through three process
Similarly, you can modify or change structure of conceptual schema (logical schema) without affecting the higher external schema which is knowns as logical data independence. If the logical data independence is achieved , it is also external data independence because it does not require you to change the external schemas or user views.
External Schemas or Data Views
The external schema or views are highest level of database abstraction. It simply means that you can create more views or tables from the same database different from logical schema and/or physical schema.
Users of external schema don’t have or want to do anything with how data is stored in the database. A particular external view only shows them, what they need to know. Not only that , but DBMS also allows you to create multiple views from same database.
For example, A bank account holder will see only his account details such as bank balance and transaction history etc. On the other hand, a bank manager will see overall status of accounts and customer personal information. One aspect of view is access privileges’ which decide how much and which views a user get to access. You doing Google search and search results on the page is also a external view , totally different from how Google store websites information.
External schemas can stay the same, yet when application using them or user change the data , that is reflected in the logical schema. This is external data independence.
Another advantage of external schema and its independence from conceptual schema and physical schema is data security. With limited access to information, database administrators can protect sensitive information from threats or unauthorized access.
Query Mechanism (SQL)
- Parsing or Translation
- Execution
- Query Optimization
The Query parsing is a process to check syntax error in SQL command called the syntax checking, then the parser checks for semantic errors meaning does the database and table exists, compatibility of query, etc. If the query is passed all checks, it translate the query to relational algebra or a query tree, both of which are internal representation of query for optimization.
The query optimization is to prepare the query for efficient execution by reducing time and resources to execute the queries. Finally, the query is executed and precise results are fetched.
To understand the advantages of DMBS system let us compare it with older version of database system. There were no systems to store data and earlier database applications were build using the computer file system. In other words, data were stored in files and accessed directly.
File System vs. DBMS
Like file system, DBMS also stores data in files, but it provides a system to manage it well using three tier-schemas. Then there is additional security and concurrency control.
The traditional file system has few problems with storing data which are:
- Duplicates data – sometime files or duplicated entries cause problems with application or users. Sometime users create multiple files with same name or enter duplicate entries that can cause confusion or give erroneous results. In DBMS, each record is given a unique id to prevent duplicates.
- Change in one file is not reflected in other files – Since multiple users access the files and change it continuously, sometimes they are not synced together and you may find difference in data because it is not updated on other files. With DBMS system, change in relations or views, it either Updated or terminated completely.
- Multiple file formats – With traditional file system, files are often stored in multiple formats and that will limit the data independence and increase costs of maintaining such a system.
- Database Integrity problems: Database integrity refers to consistency, accuracy and reliability of database and it is enforced using database constraints which are nothing but rules for databases. With file system, adding constraints or modifying them such as file size, user permissions, etc. With DBMS system, there are fewer constraints management and they are easy to implement.
- Atomicity : DBMS transactions to database are atomic, means they either succeed or fail , so the database is always consistent and safe. With file system, failure of database can leave the database in inconsistent state.
- Concurrent Access Problems: The traditional file system is not good at handling multiple users concurrently accessing the database, two user can access the same data and leave the wrong entry.
- Security: It is very difficult to ensure file security and security constraints in traditional file system.
DBMS Solution to all the above mentioned problems:
- Logical storage reduce space, time to access data and complexity. The logical storage also prevents duplicated and updating time.
- It has indexes to do faster searches and special data structures for faster retrieval of data.
- Simple as well as complex queries through SQL is possible.
- Database Integrity constraints are handled efficiently.
- Backup and Recovery system.
- Database security by restricting users based on roles and permissions. Only authorized users can do certain high level tasks.
- Multiple User Interfaces for different types of users. For example, menu-based, form based interfaces and GUI( graphical user interfaces). There are separate interface for database administrators.
Summary
The DBMS system stores data in organized manner and performs database operations on them such as Add, Update, Delete or Modify.
Database has three-level architectures that provides full data independence. One level need know activities of higher level schemas. Apart from that DBMS is provides database security, concurrency access and backup and recovery system.
Database queries are handled through an easy and simple query language called SQL ( Structured Query Language).
Finally, I mentioned the difference between traditional file system database and DBMS. The solution provided by DBMS is robust and efficient.

