Data were treated as discrete files which were placed in folders (or directories). These folders could themselves be placed in other folders, creating a hierarchy.
Drawbacks of File system
- Data redundancy: Data redundancy refers to the duplication of data, lets say we are managing the data of a college where a student is enrolled for two courses, the same student details in such case will be stored twice, which will take more storage than needed. Data redundancy often leads to higher storage costs and poor access time.
- Data inconsistency: Data redundancy leads to data inconsistency, lets take the same example that we have taken above, a student is enrolled for two courses and we have student address stored twice, now lets say student requests to change his address, if the address is changed at one place and not on all the records then this can lead to data inconsistency.
- Data Isolation: Because data are scattered in various files, and files may be in different formats, writing new application programs to retrieve the appropriate data is difficult.
- Dependency on application programs: Changing files would lead to change in application programs.
- Atomicity issues: Atomicity of a transaction refers to “All or nothing”, which means either all the operations in a transaction executes or none.For example: Lets say Steve transfers 100$ to Negan’s account. This transaction consists multiple operations such as debit 100$ from Steve’s account, credit 100$ to Negan’s account. Like any other device, a computer system can fail lets say it fails after first operation then in that case Steve’s account would have been debited by 100$ but the amount was not credited to Negan’s account, in such case the rollback of operation should occur to maintain the atomicity of transaction. It is difficult to achieve atomicity in file processing systems.
- Data Security: Data should be secured from unauthorised access, for example a student in a college should not be able to see the payroll details of the teachers, such kind of security constraints are difficult to apply in file processing systems.
What is DBMS?
A database management system (DBMS) is a software package designed to define, manipulate, retrieve and manage data in a database. The DBMS serves as an intermediate between the user and the database. The database structure is stored as a collection of files. These data can be accessed in those files through the DBMS user interface.
Example of DBMS – MSAccess
DBMS as a software system allows access to data contained in a database. The objective of the DBMS is to provide a convenient and effective method of defining, storing and retrieving the information contained in the database.
The DBMS was able to solve many of the drawbacks with file system and provides many advantages including hiding much of the database’s internal complexity from the application programs and users. But, DBMS was not able meet many customers changing demands which lead evolution to RDBMS.
What is RDBMS?
RDBMS stands for Relational Database Management System. RDBMS data is structured in database tables, fields and records. Each RDBMS table consists of database table rows. Each database table row consists of one or more database table fields.
RDBMS store the data into collection of tables, which might be related by common fields (database table columns). RDBMS also provide relational operators to manipulate the data stored into the database tables. Most RDBMS use SQL as database query language.
Example of RDBMS – Oracle, SQL Server, DB2, MYSQL
Why RDBMS over DBMS?
Let us understand some major differences between DBMS and RDBMS.
- DBMS does not impose any constraints or security with regard to data manipulation it is user or the programmer responsibility to ensure the ACID PROPERTY of the database. But, RDBMS is more with this regard because RDBMS define the integrity constraint for the purpose of holding ACID PROPERTY.
- DBMS stores data as files and thus data redundancy is very common. You do not have relationship between data in DBMS. RDBMS stores data in the form of tables and therefore data redundancy is minimized. Also as data is stored in the form of tables, you might establish relationship to data within tables with the help of foreign keys.
- Data need to access individually in DBMS. Data in RDBMS can be easily accessed using SQL query. Multiple data elements can be accessed at the same time.
Our next chapter introduces you to RDBMS concepts.