名词
- Database (DB)
- The term DBS and DBMS are used interchangeably in the textbook
- Database application system DB + DBMS + Application programs + Users/Administers
- DBS = DB + DBMS
OS文件系统缺点
- Data redundancy and inconsistency
- Difficulty in accessing data
- Data isolation/独立性(信号量)
数据库系统目的
- Integrity/完整性 problems【语义约束】
- Atomicity/原子性 of updates
- Concurrent access/并发访问 by multiple users
- Security problems
数据模型、数据建模、数据抽象
- data models a collection of conceptual tools for describing:
- data, data relationships/联系
- data semantics/语义
- consistency/一致性 constraints
- specifications for data organization and access
- data modeling organize application data in the database, according to data model, by data abstraction
- data abstraction
- database modeling mechanism
- hide the complexity of data structures to represent data in the database from users through view-logical-physical levels of data abstraction
Levels of Abstraction
- Physical level
- describes how a record (e.g., instructor) is stored and accessed in database files
- Logical level
- Implementation/DB-oriented describes data stored in database, and the relationships among the data.
- View level
- application programs hide details of data types views can also hide information (such as an employee’s salary) for security purposes.
- described as Entity-relationship (E-R) diagrams
DDL DML
- Data Definition Language
- DML
-
procedural/过程性 DML – require a user to specify what data are needed and how to get those data [e.g. relational algebra]
-
declarative/声明性 DML – require a user to specify what data are needed without specifying how to get those data [e.g. SQL]
数据库设计阶段
从保持data independence角度出发,根据data models所定义的数据规范形式,在view、logical 、 physical三个层次,通过data abstraction,经过概念设计、逻辑设计、物理设计三个步骤,构造 面向具体应用领域的DBS的 E-R diagrams, external schema/logical schema , internal schema的集合, 得到conceptual DB 、logical DB 、physical DB设计结果
