This article was published as a part of the Data Science Blogathon.
A Database is a collection of inter-related data, and a Database Management System is a set of programs that helps users create and maintain this data. DBMS is a computer-based data record-keeping system. DBMS provides enhanced security for storing and retrieving data and has various techniques to reduce Redundancy and Duplication of Data. But, ever wondered why DBMS? Didn’t we have alternate solutions for storing data? What makes Database a go-to option for every developer to store their data?
In this article, We will have a walkthrough of the traditional File systems, their failures, and how DBMS helps overcome them. We will also learn about Data Abstraction, schemas, instances, and different DBMS types.
A file system is a software application that keeps files on a computer device organized and updated. It controls how data is stored and retrieved in blocks of files. Traditionally, database applications were built directly with the help of file systems. Data is stored in a file, which is located in the directory. A directory can have many other files or be a part of another directory. File System follows a hierarchical approach to storing data.
The file system stores the data about the data, i.e., the Metadata. Metadata includes the name of the file, length of the file, location of the file, etc. The file system allocates memory for the files in variable block sizes. Sometimes, the file size is too large compared to the required space. This gives rise to an unused block of space called the slack space. The file system is committed to maintaining the changes to the data/files by regularly updating the metadata and the file directories. The file system provides multiple ways to handle unauthorized data access. It includes passwords stored in the metadata or permissions in the form of permission bits and access control lists.
1. Data Redundancy: duplication of data in different files.
2. Data access difficulty: A new program every time to carry out new tasks.
3. Data Isolation: Multiple files and file format makes data isolation difficult.
4. Integrity problem: Managing and updating new constraints is difficult.
5. Atomicity: Failure in the middle of an operation may lead to an inconsistent state with partial updates only.
6. Security problems: Difficult to restrict user access to all the data.
A database is a collection of data used to efficiently and optimally search, insert, and delete data. A database management system is a software application to manage the database. DBMS examples include Oracle SQL, MySQL, and MongoDB, which provide a platform to create, modify and delete databases and help store and retrieve data. The main purpose of introducing DBMS was to overcome the failures of the File systems.
Data abstraction is hiding the user from unnecessary or irrelevant data. It offers a distinct perspective and aids in achieving data independence, which enhances data security.
The 3 levels of Abstraction are:
1. Physical Level(lowest level): It describes how a record is stored
2. Logical Level(conceptual level): It describes the data and the relationship between them.
3. View Level(highest level): Application programmers hide datatype details as well as other important data from some users for security purposes.
Source: GeeksForGeeks
Schema is the logical structure of the database, while Instance is the actual content of the database at a particular point in time.
Source: educba
Traditionally, File systems were used for storing and maintaining data in an environment. The drawbacks of the File systems made it difficult for developers and users to continue with file systems. Hence, an efficient storing and retrieving technique – Database Management System was introduced to counter the drawbacks of the File systems. DBMS provides improvised data integrity, security, faster access, and the recovery and backup feature. It also reduces data inconsistencies and redundancies through various techniques. Hence, DBMS was replaced with the traditional file systems.
In this article,
Thank you for reading the article. If you like my article, feel free to connect with me on Linkedin.
The media shown in this article is not owned by Analytics Vidhya and is used at the Author’s discretion.