The early
database management all adopted the file system. In the file system, data is composed of several named files according to its content, structure and purpose. Files are generally owned by a certain user or user group, but can be shared by other users. Users can open, read, write, and close files through the operating system.
The file system has obvious disadvantages:
(1). It is inconvenient to write applications.
The application designer must have a clear understanding of the logical and physical structure of the files used. The operating system can only open, close, read, write and other low-level file operation commands, and the modification of the file must be handled in the application. Applications also inevitably have duplication in functionality. Writing applications on the file system is not efficient.
(2). File design is difficult to meet the different requirements of multiple applications, and data redundancy is often inevitable.
In order to take into account the requirements of various applications, when designing the file system, it is often necessary to add redundant data. Data redundancy not only wastes space, but also brings data inconsistency. There is no monitoring mechanism for maintaining data consistency in the file system, and the user is responsible for maintaining data consistency. It can barely handle it in a simple system, but it is almost impossible in a large and complex system.
(3). The modification of the file structure will lead to the modification of the application program, and the maintenance amount of the application program will be very large.
(4). The file system does not support concurrent access to files.
(5). Data lacks unified management, and it is not easy to standardize and standardize data structure, coding, presentation format, naming, and output format; it is also difficult to adopt effective measures for data security and confidentiality.
Aiming at the shortcomings of the file system, people have developed a database system with unified management and shared data as the main feature. In a database system, data is no longer just serving a certain program or user, but as a shared resource of a unit, managed by a software called a database management system (DBMS). Due to the unified management of the DBMS, applications do not need to directly intervene in low-level operations such as opening, closing, reading and writing files, but are handled by the DBMS. Users also do not need relational data storage and other implementation details, and can observe and access data at a higher level of abstraction. Some modifications of the file structure can also be shielded by the DBMS, so that users cannot see these modifications, thereby reducing the workload of application maintenance and improving data independence. Because of the unified management of data, people can focus on the whole unit, organize data rationally, and reduce data redundancy; it can also better implement standardization and standardization, which is conducive to data transfer and wider sharing. Since the DBMS is not for a certain application, but for the entire unit, it is acceptable to make the DBMS more complicated. Many kinetic energy that is difficult to realize in the file system has been realized in the DBMS one by one.
For example: a variety of user interfaces suitable for different types of users, concurrent control to ensure data consistency during concurrent access, access control to enhance data security, and to ensure data in the event of a failure Consistent recovery (recovery) function, integrity constraints (integrity constraints) check function to ensure semantic consistency of data, etc. With the development of computer applications, the function of DBMS is getting stronger and stronger, the scale is getting bigger and bigger, and the complexity and cost also increase. At present, in some simple application systems with very clear functions and no data sharing, in order to reduce overhead and improve performance, sometimes file systems are still used; however, database systems are basically used in data-intensive application systems.
7 functions that a modern
database management system should possess:
1. Provide advanced user interface
2. Query processing and optimization
The query here generally refers to the user's access requirements for the database, which not only includes data retrieval, but also includes modification\definition of new data, etc.
3. Data catalog management
4. Concurrency control
5. Recovery function
6. Integrity constraint check
7. Access control
Four differences between file system and database management system:
(1) The file system uses files to store data in external storage for a long time, and the database system uses a database to store data uniformly;
(2) The program and data in the file system have a certain connection, and the program and data in the database system are separated;
(3) The file system uses the access method in the operating system to manage the data, and the database system uses the DBMS to uniformly manage and control the data;
(4) The file system realizes data sharing based on files, and the database system realizes data sharing based on records and fields.