Data Base Management System课程学习(2-1)

@Database Systems— A practical Approach to Design, Implementation, and Management

Database Systems— A practical Approach to Design, Implementation, and Management 学习记录

第二章要点

chapter 2.1 The Three-Level ANTI-SPARC Architecture

  1. concentrated on the need for an implementation-independent layer to isolate programs from underlying representational issues.
    集中在对独立实现层把软件从潜在的代表性问题中隔绝开。

  2. three levels of abstraction, that is, three distinct levels at which data items can be described
    comprising an external, a conceptual, and an internal level
    抽象的三个层次,3个独立的层次包括外部层, 概念层和内部层
    外部层对应user 内部层对应DBMS 概念层提供两者间的映射和必要的独立性

  3. 这样分的原因

  • avoid being affected by other users
  • users don’t have to deal with physical database storage details
  • DBA should be able to change the database storage structure without affecting the users’ view
  • The internal structure of the database should be unaffected by changes to the physical aspects of storage.
  • The DBA should be able to change the conceptual structure of the database without affecting all users.

2.1.1 External Level

External Level ————The users’ view of the database. This level describes that part of the database that is relevant to each user.

  1. includes only those entities, attributes, and relationships in the ‘real world’.
    就是感兴趣的提供接口,不感兴趣的封装到database中 并且不同user界面不同

2.1.2 Conceptual Level

Conceptual Level————The community view of the database. This level describes what data is stored in the database and the relationships among the data.

  1. 包含整个数据库逻辑结构
  2. represents:
  • all entities, their attributes, and their relationships;
  • the constraints on the data;
  • semantic information about the data; 数据的语义信息
  • security and integrity information.
  1. 外部view中所有的可获得数据都源于概念层
  2. 不包含储存依赖细节。

2.1.3 Internal Level

Internal Level————The physical representation of the database on the computer. This level describes how the data is stored in the database.

  1. 包含数据结构和文档管理
  • storage space allocation for data and indexes;
  • record descriptions for storage (with stored sizes for data items);
  • record placement;
  • data compression and data encryption techniques.
  1. DBMS和操作系统能相互作用

2.1.4 Schemas, Mappings, and Instances(模式映射和实例)

  1. The overall description of the database is called the database schema.
  • highest level—— external schemas (also called subschemas)
  • At the conceptual level, we have the conceptual schema(唯一)
  • At the lowest level of abstraction we have the internal schema(唯一)
  1. The conceptual schema is related to the internal schema through a conceptual/internal mapping.
  2. database schema不怎么变 但实际上database一直在变

2.1.5 Data Independence(逻辑和物理上)

Logical data independence ————Logical data independence refers to the immunity of the external schemas to changes in the conceptual schema.
Physical data independence————Physical data independence refers to the immunity of the conceptual schema to changes in the internal schema.

2.2 Database Language

  1. DDL and DML
  2. 许多DBMS嵌入子语言,大多数非嵌入

2.2.1 The Data Definition Language (DDL)

  1. DDL————A language that allows the DBA or user to describe and name the entities, attributes, and relationships required for the application, together with any associated integrity and security constraints.

  2. 定义一个或调整已有的,编译后收集于System catalog 整合了metadata。又被称为data dictionary and data directory
  3. 实际只需要提供一个DDL说明外部模式和概念模式。

2.2.2 The Data Manipulation Language (DML)

  1. DML————A language that provides a set of operations to support the basic data manipulation operations on the data held in the database.

  2. 增删改查。 底层复杂 高层简单
    查数据用query language
  3. procedural and non-procedural 区分DML的两种类型

Procedural DML————A language that allows the user to tell the system what data is needed and exactly how to retrieve the data.

Network and hierarchical DMLs are normally procedural(网状和层次数据库)

  1. Non-procedural DML————A language that allows the user to state what data is needed rather than how it is to be retrieved.
    提供相对的数据独立性
    Non-procedural languages are also called declarative languages.

  2. 非过程语言通常有 typically SQL (Structured Query Language) or QBE (Query-ByExample) 相对更加简单

2.2.3 Fourth-Generation Languages (4GLs)

  1. 快捷的语言形式(shorthand)Compared with a 3GL, which is procedural, a 4GL is non-procedural
    提高十倍效率 但减少了可处理问题的类型
  2. 包括presentation languages;speciality languages;application generators;very high-level languages that are used to generate application code
  3. 表单生成器:快速产生数据屏幕输入和输出形式的工具。
    报表生成器:生成数据库中存储数据的报表的工具。
    图形生成器: 从数据库中检索数据并以图形的形式显示数据的工具。
    应用程序生成器:能产生与数据库接口的程序的工具。

2.3 Data Models and Conceptual Modeling

Data model———— An integrated collection of concepts for describing and manipulating data, relationships between data, and constraints on the data in an organization.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值