Database concepts
Database-management system (DBMS) |
A collection of interrelated data and a set of programs to access those data |
Database-system applications |
|
File-process systems |
The typical file-processing system is supported by a conventional operating system The system stores permanent records in various files, and it needs different application programs to extract records from, and add records to, the appropriate files |
Data inconsistency (*drawback of file system) |
The various copies of the same data may no longer agree ~比如一个学生选了双学位,那么在两个学位下面都要存储他的信息,造成冗余 ~而且,如果学生的地址改变了,那么可能一处进行了修改,一处没有,造成不一致 |
Consistency constraints (*drawback of file system) |
When new constraints are added, it is difficult to change the program to enforce them
|
Data abstraction |
The need for efficiency has led designers to use complex data structures to represent data in the database Since users are stupid, developers hide the complexity from users through several levels of abstraction:c Physical level: how the data are actually stored Logical level: what data are stored in the database View level: users only need part of the database, so we need to simplify their interaction with the system |
Instance |
The collection of information stored in the database at a particular moment 实例,类比于某个时刻某个变量的值 |
Schema |
The overall design of the database 模式,类比于变量的声明 |
physical schema |
The database design at the physical level |
logical schema |
The database design at the logical level |
Physical data independence |
Although implementation of the simple structure at logical level may involve complex physical-level structures, the user of the logical level does not need to be aware of that |
Data models |
Underlying the structure of a database is the data model: a collection of conceptual tools for describing data, data relatio |