第一章 概述
考试范围: 1.1-1.10
考试内容: 章节后的Review Terms(名词基本都在课文中)
考试题型: 综合题
Review Terms
-
Database-management system (DBMS) :A collection of interrelated data and a set of programs to access those data.
数据库管理系统(DBMS):一组相关数据和一组访问这些数据的程序。
-
Database-system applications:A database application is a computer program whose primary purpose is entering and retrieving information from a computerized database.
数据库系统应用程序:数据库应用程序是一种计算机程序,其主要目的是从计算机化数据库中输入和检索信息。
-
Online transaction processing:A large number of users use the database, with each user retrieving relatively small amounts of data, and performing small updates. This is the primary mode of use for the vast majority of users of database applications such as those that we outlined earlier.
在线事务处理:大量用户使用数据库,每个用户检索相对少量的数据,并执行少量更新。这是绝大多数数据库应用程序用户的主要使用模式,如我们前面概述的。
-
Data analytics:the processing of data to draw conclusions, and infer rules or decision procedures, which are then used to drive business decisions.
数据分析:对数据进行处理以得出结论,并推断规则或决策程序,然后用于推动业务决策。
-
File-processing systems:In computing, a file system or file-processing system controls how data is stored and retrieved.
文件处理系统:在计算中,文件系统或文件处理系统控制数据的存储和检索方式。
-
Data inconsistency:Data inconsistency is a condition that occurs between files when similar data is kept in different formats in two different files, or when matching of data must be done between files.
数据不一致:当相似数据以不同格式保存在两个不同的文件中时,或者当必须在文件之间进行数据匹配时,文件之间会出现数据不一致的情况。
-
Consistency constraints:Consistency in database systems refers to the requirement that any given database transaction must change affected data only in allowed ways. Any data written to the database must be valid according to all defined rules, including constraints, cascades, triggers, and any combination thereof.
一致性约束:数据库系统中的一致性是指任何给定的数据库事务必须以允许的方式更改受影响的数据。根据所有定义的规则,写入数据库的任何数据都必须有效,包括约束、级联、触发器及其任何组合。
-
Data abstraction:Data abstraction enforces a clear separation between the abstract properties of a data type and the concrete details of its implementation.
数据抽象:数据抽象在数据类型的抽象属性与其实现的具体细节之间实现了明确的分离。
-
Physical level:The lowest level of abstraction describes how the data are actually stored. The physical level describes complex low-level data structures in detail.
物理级别:最低抽象级别描述了数据的实际存储方式。物理层详细描述了复杂的低级数据结构。
-
Logical level:The next-higher level of abstraction describes what data are stored in the database, and what relationships exist among those data. The logical level thus describes the entire database in terms of a small number of relatively simple structures.
逻辑级别:下一个更高级别的抽象描述了数据库中存储的数据以及这些数据之间存在的关系。因此,逻辑层以少量相对简单的结构来描述整个数据库。
-
View level:The highest level of abstraction describes only part of the entire database. Even though the logical level uses simpler structures, complexity remains because of the variety of information stored in a large database. Many users of the database system do not need al this information; instead, they need to access only a part of the database. The view level of abstraction exists to simplify their interaction with the system. The system may provide many views for the same database.
视图级别:最高抽象级别仅描述整个数据库的一部分。尽管逻辑层使用更简单的结构,但由于存储在大型数据库中的信息种类繁多,复杂性仍然存在。数据库系统的许多用户不需要所有这些信息;相反,他们只需要访问数据库的一部分。抽象的视图级别是为了简化它们与系统的交互。该系统可以为同一数据库提供许多视图。
-
Instance:The collection of information stored in the database at a particular moment.
实例:特定时刻存储在数据库中的信息集合。
-
Schema:The overall design of the database.
架构:数据库的总体设计。
-
Physical schema:The physical schema describes tl he database design at the physical level. physical schema is a term used in data management to describe how data is to be represented and stored (files, indices) in secondary storage using a particular database management system (DBMS).
物理模式:物理模式描述了物理级别的数据库设计。物理模式是数据管理中使用的术语,用于描述如何使用特定的数据库管理系统(DBMS)在辅助存储中表示和存储数据(文件、索引)。
-
Logical schema:logical schema is a data model of a specific problem domain expressed independently of a particular database management product or storage technology (physical data model) but in terms of data structures such as relational tables and columns, object-oriented classes, or XML tags.
逻辑模式:逻辑模式是一个特定问题领域的数据模型,独立于特定的数据库管理产品或存储技术(物理数据模型),但以关系表和列、面向对象类或XML标记等数据结构表示。
Subschema:A database may also have several schemas at the view level sometimes called subschemas, that describe different views of the database.
子模式:数据库在视图级别也可能有多个模式,有时称为子模式,用于描述数据库的不同视图。
Physical data independence:: The ability to change the physical schema without changing the logical schema is called physical data independence.
物理数据独立性::在不改变逻辑模式的情况下改变物理模式的能力称为物理数据独立。
Data models:A database model is a type of data model that determines the logical structure of a database and fundamentally determines in which manner data can be stored, organized, and manipulated.
数据模型:数据库模型是一种数据模型,它决定了数据库的逻辑结构,并从根本上决定了数据的存储、组织和操作方式。
Entity-relationship model:The entity-relationship(ER) data model uses a collection of basic objects, called entities, and relationships among these objects. An entity is a “thing” or “object” in the real world that is distinguishable from other objects. The entity-relationship model is widely used in database design. Chapter6 explores it in detail.
实体关系模型:实体关系(ER)数据模型使用称为实体的基本对象以及这些对象之间的关系的集合。实体是现实世界中可与其他对象区分的“事物”或“对象”。实体关系模型在数据库设计中得到了广泛的应用。第六章对其进行了详细探讨。
Relational data model:The relational model uses a collection of tables to represent both data and the relationships among those data. Each table has multiple columns, and each column has a unique name. Tables are also known as relations. The relational model is an example of a record-based model Record-based models are so named because the database is structured in fixed-format records of several types. Each table contains records of a particular type. Each record type defines a fixed number of fields, or attributes. The columns of the table correspond to the attributes of the record type. The relational data model is the most widely used data model, and a vast majority of current database systems are based on the relational model. Chapter 2 and Chapter 7 cover the relational model in detail.
关系数据模型:关系模型使用一组表来表示数据和这些数据之间的关系。每个表有多个列,每个列都有一个唯一的名称。表也称为关系。关系模型是基于记录的模型的一个示例。基于记录的模式之所以如此命名,是因为数据库是以几种类型的固定格式记录构成的。每个表都包含特定类型的记录。每个记录类型定义固定数量的字段或属性。表的列与记录类型的属性相对应。关系数据模型是使用最广泛的数据模型,当前绝大多数数据库系统都基于关系模型。第2章和第7章详细介绍了关系模型。
Semi-structured data model:The semi-structured data model permits the specification of data where individual data items of the same type may have different sets of attributes. This is in contrast to the data models mentioned earlier, where every data item of a particular type must have the same set of attributes. JSON and Extensible Markup Language(XML) are widely used semi-structured data representations. Semi-structured data models are explored in detail in Chapter 8.
半结构化数据模型:半结构化数据模式允许指定相同类型的单个数据项可能具有不同属性集的数据。这与前面提到的数据模型不同,其中特定类型的每个数据项都必须具有相同的属性集。JSON和可扩展标记语言(XML)是广泛使用的半结构化数据表示。第8章详细探讨了半结构化数据模型。
Object-based data model:Object-oriented programming (especially in Java, C++, or C#) has become the dominant software-development methodology. This led initially to the development o of a distinct object oriented data model,but today the concept of objects is well integrated into relational databases. Standards exist to store objects in relational tables. Database systems allow procedures to be stored in the database system and executed by the database system. This can be seen as extending the relational model with notions of encapsulation, methods, and object identity. Object-based data models are summarized in Chapter 8.
基于对象的数据模型:面向对象编程(特别是在Java、C++或C#中)已成为主导的软件开发方法。这最初导致了一个独特的面向对象数据模型的开发,但今天对象的概念已经很好地集成到关系数据库中。存在将对象存储在关系表中的标准。数据库系统允许过程存储在数据库系统中并由数据库系统执行。这可以看作是用封装、方法和对象身份的概念来扩展关系模型。第8章总结了基于对象的数据模型。
Database languages:Database languages are special-purpose languages, which allow one or more of the following tasks, sometimes distinguished as sublanguage.
数据库语言:数据库语言是一种特殊用途的语言,允许执行以下一项或多项任务,有时也称为子语言。
Data-definition language:defines data types such as creating, altering, or dropping and the relationships among them.
数据定义语言:定义数据类型,如创建、更改或删除以及它们之间的关系。
Data-manipulation language:performs tasks such as inserting, updating, or deleting data occurrences.
数据操作语言:执行插入、更新或删除数据引用等任务。
Procedural DML:require a user to specify what data are needed and how to get those data.
过程DML:要求用户指定需要哪些数据以及如何获取这些数据。
Declarative DML:require a user to specify what data are needed without specifying how to get those data.
声明性DML:要求用户指定需要哪些数据,而不指定如何获取这些数据。
nonprocedural DML:require a user to specify what data are needed without specifying how to get those data.
非过程DML:要求用户指定需要哪些数据,而不指定如何获取这些数据。
Query language:A query is a statement requesting the retrieval of information. The portion of a DML that involves information retrieval is called a query language. Although technically incorrect, it is common practice to use the terms query language and data-manipulation language synonymously.
查询语言:查询是请求检索信息的语句。DML中涉及信息检索的部分称为查询语言。虽然技术上不正确,但通常使用术语查询语言和数据操作语言同义。
Data-definition language:A database system provides a data-definition language (DDL) to specify the database schema and a data-manipulation language (DML) to express database queries and updates. In practice, the data-definition a and data-manipulation languages are not two separate languages; instead they simply form parts of a single database language, such as the SQL language. Almost all relational database systems employ the SQL language, which we cover in great detail in Chapter 3,Chapter 4, and Chapter 5.
数据定义语言:数据库系统提供数据定义语言(DDL)来指定数据库模式,提供数据操作语言(DML)来表示数据库查询和更新。在实践中,数据定义a和数据操作语言不是两种独立的语言;相反,它们只是构成单个数据库语言(如SQL语言)的一部分。几乎所有的关系数据库系统都使用SQL语言,我们将在第3章、第4章和第5章中对此进行详细介绍。
Domain Constraints:A domain of possible values must be associated with every attribute (for example, integer types, character types, date/time types). Declaring an attribute to be of a particular domain acts as a constraint on the values that it can take. Domain constraints are the most elementary form of integrity constraint. database. They are tested easily by the system whenever a new data item is entered into the database.
域约束:可能值的域必须与每个属性相关联(例如,整数类型、字符类型、日期/时间类型)。将属性声明为某个特定域的属性将对其可以接受的值起到约束作用。域约束是完整性约束的最基本形式。数据库每当将新数据项输入数据库时,系统都可以轻松地对其进行测试。
Referential Integrity:There are cases where we wish to ensure that a value that appears in one relation for a given set of attributes also appears in a certain set of attributes in another relation (referential integrity). For example, the department listed for each course must be one that actually exists in the university. More precisely, the dept name value in a course record must appear in the dept name attribute of some record of the department relation. Database modifications can cause violations of referential integrity. When a referential-integrity constraint is violated, the normal procedure is to reject the action that caused the violation.
引用完整性:在某些情况下,我们希望确保出现在给定属性集的一个关系中的值也出现在另一个关系(引用完整性)中的特定属性集中。例如,为每门课程列出的系必须是大学中实际存在的系。更准确地说,课程记录中的部门名称值必须出现在部门关系的某些记录的部门名称属性中。数据库修改可能会导致违反引用完整性。当引用完整性约束被违反时,通常的过程是拒绝导致违反的操作。
Authorization:We may want to differentiate among the users as far as the type of access they are permitted on various data values in the database. These differentiations are expressed in terms of authorization, the most common being
授权:我们可能希望在用户之间区分他们对数据库中各种数据值允许的访问类型。这些区别以授权的方式表示,最常见的是
Read authorization:which allows reading, but not modification, of data
读取授权:允许读取但不允许修改数据
Insert authorization:which allows insertion of new data, but not modification of existing data
插入授权:允许插入新数据,但不能修改现有数据
Update authorization:which allows modification, but not deletion, of data
更新授权:允许修改但不能删除数据
Delete authorization:which allows deletion of data. We may assign the user all, none, or a combination of these types of authorization.
删除授权:允许删除数据。我们可以向用户分配全部、无或这些类型的授权的组合。
Metadata:Metadata is “data that provides information about other data”.
元数据:元数据是“提供有关其他数据的信息的数据”。
Application program:Application programs are programs that are used to interact with the database in this fashion.
应用程序:应用程序是用于以这种方式与数据库交互的程序。
Database design:Database design mainly involves the design of the database schema. The design of a complete database ap plication environment that meets the needs of the enterprise being modeled requires attention to a broader set of issues. In this text, we focus on the writing of database queries and the design of database schemas, but discuss application design later, in Chapter9.
数据库设计:数据库设计主要涉及数据库模式的设计。设计一个完整的数据库应用环境以满足被建模企业的需求,需要关注更广泛的问题。在本文中,我们重点关注数据库查询的编写和数据库模式的设计,但稍后将在第9章中讨论应用程序设计。
Conceptual design:Next, the designer chooses a data model, and by applying the concepts of the chosen data model, translates these requirements into a conceptual schema of the database. The schema developed at this conceptual-design phase provides a detailed overview of the enterprise. The designer reviews the schema to confirm that all data requirements are indeed satisfied and are not in conflict with one another. The designer can also examine the design to remove any redundant features. The focus at this point is on describing the data and their relationships, rather than on specifying physical storage details.
概念设计:接下来,设计师选择一个数据模型,通过应用所选数据模型的概念,将这些需求转化为数据库的概念模式。在概念设计阶段开发的模式提供了企业的详细概述。设计者审查模式以确认所有数据需求确实得到满足,并且彼此之间没有冲突。设计师还可以检查设计以删除任何冗余功能。此时的重点是描述数据及其关系,而不是指定物理存储细节。
Normalization:In terms of the relational model the conceptual-design process involves decisions on what attributes we want to capture in the database and how to group these attributes to form the various tables. The “what” part is basically a business decision and we shall not discuss it further in this text. The “how” part is mainly a computer-science problem. There are principally two ways to tackle the problem. The first one is to use the entity-relationship model(Chapter 6); the other is to employ a set of algorithms(collectively known as normalization that takes as input the set of all attributes and generates a set of tables (Chapter 7).
规范化:就关系模型而言,概念设计过程涉及到决定我们要在数据库中捕获哪些属性,以及如何将这些属性分组以形成各种表。“什么”部分基本上是一个商业决策,我们不会在本文中进一步讨论。“如何”部分主要是一个计算机科学问题。解决这个问题主要有两种方法。第一种是使用实体关系模型(第6章);另一种是使用一组算法(统称为标准化,将所有属性的集合作为输入并生成一组表(第7章)。
Specification of functional requirements:A fully developed conceptual schema indicates the functional requirements of the enterprise. In a specification of functional requirements, users describe the kinds of operations (or transactions)that will be performed on the data. Example operations include modifying or updating data, searching for and retrieving specific data, and deleting data. At this stage of conceptual design, the designer can review the schema to ensure it meets functional requirements.
功能需求规范:完全开发的概念模式表示企业的功能需求。在功能需求规范中,用户描述了将对数据执行的操作(或事务)的类型。示例操作包括修改或更新数据、搜索和检索特定数据以及删除数据。在概念设计的这个阶段,设计师可以审查模式,以确保它满足功能需求。
Physical-design phase:The designer uses the resulting system-specific database schema in the subsequent physical-design phase, in which the physical features of the database are specified. These features include the form of file organization and the internal storage structures; they are discussed in Chapter 13.
物理设计阶段:设计者在随后的物理设计阶段使用生成的特定于系统的数据库模式,其中指定了数据库的物理特性。这些特征包括文件组织形式和内部存储结构;它们将在第13章中讨论。
Database Engine:A database system is partitioned into modules that deal with each of the responsibilities of the overall system.
数据库引擎:数据库系统被划分为处理整个系统的每个职责的模块。
Storage manager:The storage manager is the component of a database system that provides the interface between the low-level data stored in the database and the application programs and queries submitted to the system. The storage manager is responsible for the interaction with the file manager. The raw data are stored on the disk using the file system provided by the operating system. The storage manager translates the various DML statements into low-level file-system commands. Thus, the storage manager is responsible for storing, retrieving, and updating data in the database.
存储管理器:存储管理器是数据库系统的组件,它提供数据库中存储的低级数据与提交给系统的应用程序和查询之间的接口。存储管理器负责与文件管理器的交互。原始数据使用操作系统提供的文件系统存储在磁盘上。存储管理器将各种DML语句转换为低级文件系统命令。因此,存储管理器负责存储、检索和更新数据库中的数据。
Authorization and integrity manager:which tests for the satisfaction of integrity constraints and checks the authority of users to access data.
授权和完整性管理器:测试完整性约束的满足程度,并检查用户访问数据的权限。
Transaction manager:which ensures that the database remains in a consistent (correct) state despite system failures, and that concurrent transaction executions proceed without conflicts.
事务管理器:它确保数据库在系统故障的情况下保持一致(正确)状态,并且并发事务执行不会发生冲突。
File manager: which manages the allocation of space on disk storage and the data structures used to represent information stored on disk.
文件管理器:它管理磁盘存储空间的分配以及用于表示存储在磁盘上的信息的数据结构。
Buffer manager:which is responsible for fetching data from disk storage into main memory, and deciding what data to cache in main memory.The buffer manager is a critical part of the database system, since it enables the database to handle data sizes that are much larger than the size of main memory.
缓冲区管理器:负责将磁盘存储中的数据提取到主内存中,并决定在主内存中缓存哪些数据。缓冲区管理程序是数据库系统的关键部分,因为它使数据库能够处理比主内存大得多的数据大小。
Data files:which store the database itself.
数据文件:存储数据库本身。
Data dictionary:which stores metadata about the structure of the database, in particular the schema of the database.
数据字典:存储关于数据库结构的元数据,特别是数据库的模式。
Indices:which can provide fast access to data items. Like the index in this textbook,a database index provides pointers to those data items that hold a particular value For example, we could use an index to find the instructor record with a particular ID, or all instructor records with a particular name.
索引:可以快速访问数据项。与本教科书中的索引一样,数据库索引提供指向保存特定值的数据项的指针。例如,我们可以使用索引查找具有特定ID的讲师记录,或具有特定名称的所有讲师记录。
Query processor:A database system is partitioned into modules that deal with each of the responsibilities of the overall system. The functional components of a database system can be broadly divided into the storage r manager, the query processor components, and the transaction management component.
查询处理器:数据库系统被划分为处理整个系统的每个职责的模块。数据库系统的功能组件可以大致分为存储管理器、查询处理器组件和事务管理组件。
DDL interpreter:which interprets DDL statements and records the definitions in the data dictionary.
DDL解释器:解释DDL语句并将定义记录在数据字典中。
DML compiler:which translates DML statements in a query language into an evaluation plan consisting of low-level instructions that the query-evaluation engine understands.
DML编译器:它将查询语言中的DML语句翻译成由查询评估引擎理解的低级指令组成的评估计划。
Query optimization:A query can usually be translated into any of a number of alternative evaluation plans that all give the same result. The DML compiler also performs query optimization; that is, it picks the lowest cost evaluation plan from among the alter natives.
查询优化:通常可以将查询转换为多个备选评估计划中的任何一个,这些计划都会给出相同的结果。DML编译器还执行查询优化;也就是说,它从本地人中选择成本最低的评估计划。
Query evaluation engine:which executes low-level instructions generated by the DML compiler.
查询求值引擎:执行DML编译器生成的低级指令。
Transactions:A transaction symbolizes a unit of work performed within a database management system (or similar system) against a database, and treated in a coherent and reliable way independent of other transactions. A transaction generally represents any change in a database.
事务:事务表示在数据库管理系统(或类似系统)内针对数据库执行的一个工作单元,并以独立于其他事务的连贯可靠的方式进行处理。事务通常表示数据库中的任何更改。
Atomicity:the funds transfer must happen in its entirety or not at all. This all-or-none requirement is called atomicity.
原子性:资金转移必须全部发生或根本不发生。这种全有或无的要求称为原子性。
Consistency:it is essential that the execution of the funds transfer preserves the consistency of the database. That is the value of the sum of the balances of A and B must be preserved. This correctness requirement is called consistency.
一致性:资金转移的执行必须保持数据库的一致性。这就是必须保留A和B的余额之和的值。这种正确性要求称为一致性。
Durability:Finally, after the successful execution of a funds transfer the new values of the balances of accounts A and B must persist despite the possibility of system failure. This persistence requirement is called durability.
持久性:最后,在成功执行资金转移后,尽管系统可能出现故障,账户a和B余额的新值仍必须保持不变。这种持久性要求称为耐久性。
Recovery manager:Ensuring the atomicity and durability properties is the responsibility of the database system itself-specifically, of the recovery manager.
恢复管理器:确保原子性和持久性属性是数据库系统本身的责任,特别是恢复管理器的责任。
Failure recovery:Thus the database must be restored to the state in which it was before the transaction in question started executing. The database system must therefore perform failure recovery, that is, it must detect system failures and restore the database to the state that existed prior to the occurrence of the failure.
故障恢复:因此,数据库必须恢复到所讨论事务开始执行之前的状态。因此,数据库系统必须执行故障恢复,也就是说,它必须检测系统故障并将数据库恢复到故障发生之前的状态。
Concurrency-control manager:It is the responsibility of the concurrency-control manager to control the inter action among the concurrent transactions to ensure the consistency of the database.
并发控制管理器:并发控制管理者负责控制并发事务之间的交互操作,以确保数据库的一致性。
Database Architecture:书中并未涉及具体内容
数据库体系结构
Centralized:The centralized architecture shown in Figure 1.3 is applicable to shared-memory server architectures, which have multiple CPUs and exploit parallel processing, but all the CPUs access a comm on shared memory.
集中式:图1.3所示的集中式架构适用于共享内存服务器架构,它具有多个CPU并利用并行处理,但所有CPU都访问共享内存上的通信。
Parallel:To scale up t to even larger data volumes and even higher processing speeds, parallel databases are d designed to run on a cluster consisting of multiple machines.
并行:为了扩展到更大的数据量和更高的处理速度,并行数据库被设计为在由多台机器组成的集群上运行。
Distributed:Further, distributed databases allow data storage and query processing across multiple geographically separated machines.
分布式:此外,分布式数据库允许跨多个地理位置分离的机器进行数据存储和查询处理。
Database Application Architecture:书中并未涉及具体内容
数据库应用程序体系结构
Two-tier:Earlier-generation database applications used a two-tier architecture, where the application resides at the client machine, and invokes database system functionality at the server machine through query language statements.
两层:早期的数据库应用程序使用两层架构,其中应用程序驻留在客户机上,并通过查询语言语句调用服务器上的数据库系统功能。
Three-tier:In contrast, modern database applications use a three-tier architecture where the client machine acts as merely a front end and does not contain any direct database calls; web browsers and mobile applications are the most commonly used application clients today. The front end communicates with an application server. The application server in turn, communicates with a database system to access data. The business logic of the application, which says what actions to carry out under what conditions is embedded in the application server, instead of being distributed across multiple clients.
三层:相比之下,现代数据库应用程序使用三层架构,其中客户机仅充当前端,不包含任何直接的数据库调用;web浏览器和移动应用程序是当今最常用的应用程序客户端。前端与应用服务器通信。应用服务器进而与数据库系统通信以访问数据。应用程序的业务逻辑,它表示在什么条件下执行什么操作,嵌入到应用程序服务器中,而不是分布在多个客户端上。
Application server:The application server in turn, communicates with a database system to access data.
应用服务器:应用服务器依次与数据库系统通信以访问数据。
Database administrator(DBA):Database administrators (DBAs) use specialized software to store and organize data. The role may include capacity planning, installation, configuration, database design, migration, performance monitoring, security, troubleshooting, as well as backup and data recovery.
Database administrator(DBA):Database administrators (DBAs) use specialized software to store and organize data. The role may include capacity planning, installation, configuration, database design, migration, performance monitoring, security, troubleshooting, as well as backup and data recovery.
数据库管理员(DBA):数据库管理员(DBA)使用专门的软件来存储和组织数据。该角色可能包括容量规划、安装、配置、数据库设计、迁移、性能监控、安全性、故障排除以及备份和数据恢复。