数据记载的发展历程
hand-writing -> file写入 -> Datebase(数据库)
The disadvantage of file-writing
- Data redundancy and inconsistency(数据的冗余和不协调)
冗余:同样的数据存了多份 - Difficulty in accessing data
- Data isolation
- Integrity problem(数据完整性问题)
- Atomic of update
- Concurrent(并行) access by multiple users
- Security problems
Data Abstraction
物理层(physical-level)—逻辑层(logical-level)—视图层(view-level)
最底层为物理层,其上是逻辑层,最上面是视图层,视图层存在多个。
Instance and Schema(模式) in database JUST LIKE Instance and Class in C++
Data Models
Data
Data relationships(同表数据、不同表、表与程序)
Data semantics(语义)
Data constrains(约束)
数据:增、删、改、查
DDL(data-definition-language 数据定义语言) & DML(data-manipulation-language 数据操作语言)
定义的完整性
1 Domain-Constraint(范围约束)
2 Referential-Integrity(指意完整)
3 Assertion(断言)
4 Authorization(授权)
SQL
Language(过程式(C) and 申明式(SQL))
- SQL is the most widely used commercial language
- SQL is not a Turing machine equivalent language(非图灵机语言)
- To be able to compute complex functions SQL is usually embedded in some higher-level language
Database Design
Logical Design
- business design
- computer-science design
网友评论