Oracle 11gR2 概念 第1章 Oracle 数据库简介

Previous Next

View PDF 1 Introduction to Oracle Database

Previous Next

View PDF 第1章 Oracle数据库简介

This chapter provides an overview of Oracle Database and contains the

following sections:

本章提供了Oracle数据库的概述,并包含以下各节:

?About Relational Databases

o Database Management System (DBMS)

o Relational Model

o Relational Database Management System (RDBMS)

o Brief History of Oracle Database

?Schema Objects

o Tables

o Indexes

?Data Access

o Structured Query Language (SQL)

o PL/SQL and Java

?Transaction Management

o Transactions

o Data Concurrency

o Data Consistency

?Oracle Database Architecture

o Database and Instance

o Database Storage Structures

o Database Instance Structures

o Application and Networking Architecture

?Oracle Database Documentation Roadmap

o Basic Group

o Intermediate Group

o Advanced Group ?关于关系数据库

o数据库管理系统(DBMS)

o关系模型

o关系数据库管理系统(RDBMS)

o Oracle数据库发展简史

?模式对象

o表

o索引

?数据访问

o结构化查询语言(SQL)

o PL/SQL和Java

?事务管理

o事务

o数据并发性

o数据一致性

?Oracle数据库体系结构

o数据库和实例

o数据库存储结构

o数据库实例结构

o应用程序和网络体系结构

?Oracle数据库文档路线图

o基本组

o中级组

o高级组About Relational Databases 关于关系数据库

Every organization has information that it must store and manage to meet its requirements. For example, a corporation must collect and maintain human resources records for its employees. This information must be available to those who need it. An information system is a formal

system for storing and processing information. 每个组织都有其必须存储和管理的信息,以满足其需求。例如, 公司必须收集和维护其雇员的人力资源纪录。此信息对需要它的人必须是可用的。信息系统是一个正式的系统,用于存储和处理信息。

An information system could be a set of cardboard boxes containing manila folders along with rules for how to store and retrieve the folders. However, most companies today use a database to automate their information systems. A database is an organized collection of information treated as a unit. The purpose of a database is to collect, store, and retrieve related information for use by database applications. 信息系统可能是一组文件柜, 其中包含许多文件夹,以及如何存储和检索文件夹的规则。但是,大多数公司现在使用数据库来自动化其信息系统。数据库是信息的一个有组织的集合, 被作为一个整体来看待。数据库的目的是收集、存储、和检索相关的信息, 以供数据库应用程序使用。

Database Management System (DBMS) 数据库管理系统(DBMS)

A database management system(DBMS) is software that controls the storage, organization, and retrieval of data. Typically, a DBMS has the following elements:

?Kernel code

This code manages memory and storage for the DBMS.

?Repository of metadata

This repository is usually called a data dictionary.

?Query language

This language enables applications to access the data. 数据库管理系统 (DBMS)是一种软件,用于控制对数据的存储、组织和检索。通常,一个DBMS具有以下元素:

?内核代码

此代码为DBMS管理内存和存储。

?元数据的存储库

此存储库通常称为数据字典。

?查询语言

此语言使应用程序能够访问数据

A database application is a software program that interacts with a database to access and manipulate data. 数据库应用程序是一个与数据库进行交互,以访问和操作其数据的软件程序。

The first generation of database management systems included the

following types:

第一代的数据库管理系统包括以下类型:?Hierarchical ?层次型

A hierarchical database organizes data in a tree structure. Each parent record has one or more child records, similar to the structure of a file system. 层次数据库把数据组织在树状结构中。每个父记录有一个或多个子记录,类似于文件系统的结构。

?Network ?网络型

A network database is similar to a hierarchical database, except records have a many-to-many rather than a one-to-many relationship. 网络数据库类似于层次数据库,但有一个区别,即记录之间是多对多的关系,而不是一对多的关系。

The preceding database management systems stored data in rigid, predetermined relationships. Because no data definition language existed, changing the structure of the data was difficult. Also, these systems 前面所述的数据库管理系统按照严格的、预定义的关系存储数据。由于不存在任何数据定义语言,更改数据结构是很困难的。同时,这些系统缺乏一种简单的查询语言, 则阻碍了应用程序的开发。

lacked a simple query language, which hindered application development. Relational Model 关系模型

In his seminal 1970 paper "A Relational Model of Data for Large Shared

Data Banks," E. F. Codd defined a relational model based on mathematical set theory. Today, the most widely accepted database model is the

relational model. E.F.Codd在他 1970年发表的论文《大型共享数据库数据的关系模型》中,定义了一个基于数学集合理论的关系模型。目前,最广泛接受的数据库模型就是关系模型。

A relational database is a database that conforms to the relational model. The relational model has the following major aspects:

?Structures

Well-defined objects store or access the data of a database.

?Operations

Clearly defined actions enable applications to manipulate the data and structures of a database.

?Integrity rules

Integrity rules govern operations on the data and structures of a

database. 关系数据库是一个符合关系模型的数据库。关系模型有以下主要方面:?结构

定义良好的对象, 用于存储或访问数据库的数据。

?操作

清楚定义的操作, 使应用程序可以处理数据库中的数据和结构。

?完整性规则

完整性规则用于管理在数据库中的数据和结构上的操作。

A relational database stores data in a set of simple relations. A relation is a set of tuples. A tuple is an unordered set of attribute values. 关系数据库将数据存储在一组简单的关系中。关系是一个元组的集合。一个元组是一些属性值的无序的集合。

A table is a two-dimensional representation of a relation in the form of

rows (tuples) and columns (attributes). Each row in a table has the same set of columns. A relational database is a database that stores data in relations (tables). For example, a relational database could store

information about company employees in an employee table, a

department table, and a salary table. 表是一个关系的二维表示, 关系由行(元组)和列(属性)的形式构成。表中的每一行具有相同的列集。关系数据库是一个将数据存储在关系(表)中的数据库。例如,关系数据库可以在一个雇员表、部门表和薪金表中存储有关公司雇员的信息。

See Also: 另见:

https://www.360docs.net/doc/a017165482.html,/citation.cfm?id=362685 for an https://www.360docs.net/doc/a017165482.html,/citation.cfm?id=362685 关于

abstract and link to Codd's paper Codd的论文摘要及链接Relational Database Management System (RDBMS) 关系数据库管理系统(RDBMS)

The relational model is the basis for a relational database management system (RDBMS). Essentially, an RDBMS moves data into a database, stores the data, and retrieves it so that it can be manipulated by applications. An RDBMS distinguishes between the following types of operations: 关系模型是关系数据库管理系统 (RDBMS) 的基础。实际上,RDBMS将数据移入数据库、在数据库中存储和检索数据,以便应用程序能对其进行操作。 RDBMS区分下列两种类型的操作:

?Logical operations ?逻辑操作

In this case, an application specifies what content is required. For example, an application requests an employee name or adds an employee record to a table. 在这种情况下, 由应用程序指定需要哪些内容。例如,应用程序请求一个雇员的姓名,或向表中添加一个雇员记录。

?Physical operations ?物理操作

In this case, the RDBMS determines how things should be done and carries out the operation. For example, after an application queries a table, the database may use an index to find the requested rows, read the data into memory, and perform many other steps before returning a result to the user. The RDBMS stores and retrieves data so that physical operations are transparent to database applications. 在这种情况下,由RDBMS确定如何操作,并执行该操作。例如,应用程序对表发出查询后,数据库可能会使用索引来查找请求的行、将数据读入内存,并执行许多其他步骤,最后向用户返回一个结果。由RDBMS存储和检索数据,因此物理操作对于数据库应用程序是透明的。

Oracle Database is an RDBMS. An RDBMS that implements object-oriented

features such as user-defined types, inheritance, and polymorphism is called an object-relational database management system

(ORDBMS). Oracle Database has extended the relational model to an

object-relational model, making it possible to store complex business models in a relational database. Oracle 数据库是一个RDBMS。实现了面向对象特征(比如用户定义类型、继承、和多态性)的RDBMS,被称为对象-关系数据库管理系统(ORDBMS)。 Oracle 数据库已经将关系模型扩展为对象-关系模型,使其可以在关系数据库中存储复杂的业务模型。

Brief History of Oracle Database Oracle数据库的发展简史

The current version of Oracle Database is the result of over 30 years of innovative development. Highlights in the evolution of Oracle Database include the following: Oracle数据库的当前版本是超过 30 年的创新发展的结果。 Oracle数据库发展过程中的重要事件包括:

?Founding of Oracle ?创立 Oracle公司

In 1977, Larry Ellison, Bob Miner, and Ed Oates started the consultancy Software Development Laboratories, which became Relational Software, Inc. (RSI). In 1983, RSI became Oracle Systems Corporation and then later Oracle Corporation. 1977年,拉里·埃利森、鲍勃·穆勒、和爱德·奥茨成立了“软件开发实验室”咨询公司,其后又叫做“关系软件”(RSI)公司,1983 年,RSI公司成为 Oracle 系统公司, 再后来又成为Oracle 公司。

?First commercially available RDBMS ?第一个商用RDBMS

In 1979, RSI introduced Oracle V2 (Version 2) as the first commercially available SQL-based RDBMS, a landmark event in the history of relational databases. 1979年,RSI公司发布了Oracle V2 (版本 2),这是第一个商用的基于 SQL 的RDBMS,它是关系数据库发展史中的一个里程碑事件。

?Portable version of Oracle Database ?可移植版本的 Oracle 数据库

Oracle Version 3, released in 1983, was the first relational database to run on mainframes, minicomputers, and PCs. The database was written in C, enabling the database to be ported to multiple platforms. Oracle版本 3 发布于 1983 年,是第一个可以同时在大型机、小型机、和个人电脑上运行的关系数据库。该数据库用 C语言编写,使其可以被移植到多种平台上。

?Enhancements to concurrency control, data distribution, and

scalability

?并发控制、数据分发、和可扩展性等增强功能

Version 4 introduced multiversion read consistency. Version 5,

released in 1985, supported client/server computing and distributed database systems. Version 6 brought enhancements to disk I/O,

row locking, scalability, and backup and recovery. Also, Version 6

introduced the first version of the PL/SQL language, a proprietary procedural extension to SQL. 版本 4 引入了多版本读一致性。版本 5发布于 1985 年,支持客户端/服务器计算和分布式数据库系统。版本 6 增强了磁盘 I/O、行锁定、可扩展性、以及备份和恢复。并且,版本 6 推出了 PL/SQL 语言第一版,这是专门针对SQL 的过程化扩展。

?PL/SQL stored program units ?PL/SQL 存储程序单元

Oracle7, released in 1992, introduced PL/SQL stored procedures

and triggers.

Oracle7发布于1992 年,引入了PL/SQL 存储过程和触发器。

?Objects and partitioning ?对象和分区

Oracle8 was released in 1997 as the object-relational database, Oracle8发布于 1997 年, 作为一种对象-关系数据库,支持许多新的数

supporting many new data types. Additionally, Oracle8 supported

partitioning of large tables.

据类型。此外,Oracle8 支持对大型表进行分区。?Internet computing ?因特网计算

Oracle8i Database, released in 1999, provided native support for internet protocols and server-side support for Java. Oracle8i was designed for internet computing, enabling the database to be deployed in a multitier environment. Oracle8i数据库发布于 1999 年,提供了互联网协议的原生支持,和服务器端的 Java 支持。 Oracle8i 是为因特网计算而设计的, 这使得数据库可以在多层环境中部署。

?Oracle Real Application Clusters (Oracle RAC) ?Oracle真正应用集群(Oracle RAC)

Oracle9i Database introduced Oracle RAC in 2001, enabling multiple instances to access a single database simultaneously. Additionally, Oracle XML Database (Oracle XML DB) introduced the ability to store and query XML. Oracle9i数据库在 2001 年引入了 Oracle RAC, 使得多个实例可以同时访问单个数据库。此外,Oracle XML 数据库(Oracle XML DB)引入了存储和查询 XML 的能力。

?Grid computing ?网格计算

Oracle Database 10g introduced grid computing in 2003. This release enabled organizations to virtualize computing resources by building a grid infrastructure based on low-cost commodity servers.

A key goal was to make the database self-managing and self-tuning. Oracle Automatic Storage Management (Oracle ASM) helped achieve this goal by virtualizing and simplifying database storage management. Oracle数据库 10g 在 2003 年引入了网格计算。此版本使得各个公司可以通过构建基于低成本服务器的网格基础设施, 来虚拟化计算资源。一个关键的目标是使数据库可以自我管理和自我优化。Oracle 自动存储管理 (Oracle ASM) 通过虚拟化和简化数据库存储管理, 有助于实现这一目标。

?Manageability, diagnosability, and availability ?可管理性、可诊断性、和可用性

Oracle Database 11g, released in 2007, introduced a host of new features that enable administrators and developers to adapt quickly to changing business requirements. The key to adaptability is simplifying the information infrastructure by consolidating information and using automation wherever possible. Oracle数据库11g, 发布于2007 年,引入了大量的新功能,使管理员和开发人员可以快速适应不断变化的业务需求。这种适应性的关键,在于通过整合信息和尽可能使用自动化,以简化信息基础架构。

See Also: 另见:

https://www.360docs.net/doc/a017165482.html,/technology/oramag/oracle/07-https://www.360docs.net/doc/a017165482.html,/technology/oramag/oracle/07-jul/o4730.html关于Oracle

jul/o4730.html for a more detailed description of the evolution of

Oracle Database

数据库的演变的更详细说明Schema Objects 模式对象

One characteristic of an RDBMS is the independence of physical data storage from logical data structures. In Oracle Database, a database schema is a collection of logical data structures, or schema objects. A database schema is owned by a database user and has the same name as the user name. RDBMS的特点之一,是物理数据存储与逻辑数据结构的独立性。在 Oracle 数据库中,数据库模式是逻辑数据结构或模式对象的集合。数据库模式由一个数据库用户拥有,并与用户名具有相同的名称。

Schema objects are user-created structures that directly refer to the data in the database. The database supports many types of schema objects, the most important of which are tables and indexes. 模式对象是用户创建的结构,它直接引用数据库中的数据。数据库支持多种类型的模式对象,其中最重要的是表和索引

See Also: 另见:"Introduction to Schema Objects""模式对象介绍" Tables 表

A table describes an entity such as employees. You define a table with a table name, such as employees, and set of columns. In general, you give each column a name, a data type, and a width when you create the table. 表描述一个实体,例如雇员。使用一个表名(如employees)和一个列集来定义表。一般地,当你创建表时,你应该给出每一列的列名、数据类型、和列宽。

A table is a set of rows. A column identifies an attribute of the entity described by the table, whereas a row identifies an instance of the entity. For example, attributes of the employees entity correspond to columns for employee ID and last name. A row identifies a specific employee. 表是一些行的集合。列标识实体的属性,而行标识实体的实例。例如,雇员实体的属性对应雇员ID列和姓氏列。行标识一个特定的雇员。

You can optionally specify rules for each column of a table. These rules are called integrity constraints. One example is a NOT NULL integrity constraint. This constraint forces the column to contain a value in every row. 您可以选择性地为每个表列指定规则。这些规则称为完整性约束。例如,“非空”即是一个完整性约束。此约束强制每一行中的该列都包含一个值。

See Also: 另见:

?"Overview of Tables"

?Chapter 5, "Data Integrity"?"表概述"

?第5章,数据完整性

Indexes 索引

An index is an optional data structure that you can create on one or more columns of a table. Indexes can increase the performance of data retrieval. When processing a request, the database can use available indexes to locate the requested rows efficiently. Indexes are useful when applications often query a specific row or range of rows. 索引是页: 9

一个可选的数据结构,您可以在表中的一个或多个列上创建索引。索引可以提高数据检索的性能。在处理一个请求时,数据库可以使用可用索引有效地找到请求的行。当应用程序经常查询某一特定行或特定范围的行时,索引很有用。

Indexes are logically and physically independent of the data. Thus, you can drop and create indexes with no effect on the tables or other indexes. All applications continue to function after you drop an index. 索引在逻辑上和物理上都独立于数据。因此,可以删除和创建索引,而对表或其它索引没有任何影响。在删除索引后,所有应用程序可以继续运行。

See Also: 另见:

"Overview of Indexes""索引概述"

Data Access 数据访问

A general requirement for a DBMS is to adhere to accepted industry

standards for a data access language.

对DBMS 的一个一般要求,是要遵循公认的行业标准数据访问语言。Structured Query Language (SQL) 结构化查询语言(SQL)

SQL is a set-based declarative language that provides an interface to an RDBMS such as Oracle Database. In contrast to procedural languages such as C, which describe how things should be done, SQL is

nonprocedural and describes what should be done. Users specify the result that they want (for example, the names of current employees), not how to derive it. SQL is the ANSI standard language for relational databases. SQL 是一种基于集合的声明性语言,提供一个到关系数据库(如 Oracle 数据库)的接口。相对于过程化语言(如 C)描述的是怎么做,SQL 作为非过程化的语言,它描述的是应做些什么。用户可以指定他们所希望的结果(例如,最新的雇员名单),而不是如何获得它。 SQL 是关系数据库的ANSI 标准语言。

All operations on the data in an Oracle database are performed using SQL

statements. For example, you use SQL to create tables and query and modify data in tables. A SQL statement can be thought of as a very

simple, but powerful, computer program or instruction. A SQL statement is a string of SQL text such as the following: 在Oracle 数据库中对数据所作的所有操作,都使用 SQL 语句来执行。例如,您可以使用 SQL 来创建表,并查询和修改表中的数据。 SQL 语句可以认为是一种很简单、但功能强大的计算机程序或指令。 SQL 语句是一个字符串或SQL 文本,例如:

SELECT first_name, last_name FROM employees; SELECT first_name, last_name FROM employees; SQL statements enable you to perform the following tasks: SQL 语句使您可以执行以下任务:

?Query data

?Insert, update, and delete rows in a table

?Create, replace, alter, and drop objects

?Control access to the database and its objects ?Guarantee database consistency and integrity ?查询数据

?插入、更新、和删除表中的行。?创建、替换、更改、和删除对象?控制对数据库及其对象的访问

?保证数据库的一致性和完整性

SQL unifies the preceding tasks in one consistent language. Oracle SQL is an implementation of the ANSI standard. Oracle SQL supports numerous features that extend beyond standard SQL. SQL 用一种统一的语言了完成了所有上述任务。 Oracle SQL 是 ANSI 标准的一种实现。 Oracle SQL 支持许多标准 SQL 之外的扩展功能。

See Also: 另见:

Chapter 7, "SQL"第7章, "SQL"

PL/SQL and Java PL/SQL和Java

PL/SQL is a procedural extension to Oracle SQL. PL/SQL is integrated

with Oracle Database, enabling you to use all of the Oracle Database SQL statements, functions, and data types. You can use PL/SQL to control the

flow of a SQL program, use variables, and write error-handling

procedures. PL/SQL 是 Oracle SQL的过程化扩展。 PL/SQL 与Oracle 数据库集成,使您能够使用所有的 Oracle 数据库的 SQL 语句、函数、和数据类型。您可以使用 PL/SQL 来控制 SQL 程序流程、使用变量、以及编写错误处理程序。

A primary benefit of PL/SQL is the ability to store application logic in the

database itself. A procedure or function is a schema object that consists of

a set of SQL statements and other PL/SQL constructs, grouped together, stored in the database, and run as a unit to solve a specific problem or to

perform a set of related tasks. The principal benefit of server-side

programming is that built-in functionality can be deployed anywhere. PL/SQL 的主要优点,是能够将应用程序逻辑存储在数据库本身之中。过程或函数是一个模式对象,它包含一组 SQL 语句和一些其他的 PL/SQL 结构,共同组合在一起,存储在数据库中,并作为一个单元来运行,以解决特定的问题,或执行一组相关的任务。服务器端编程的主要好处,是内置功能可以在任意位置部署。

Oracle Database can also store program units written in Java. A Java stored procedure is a Java method published to SQL and stored in the database for general use. You can call existing PL/SQL programs from Java and Java programs from PL/SQL. Oracle 数据库还可以存储用Java 编写的程序单元。一个 Java 存储过程是一个发布到 SQL的 Java 方法,被存储在数据库中用于一般用途。您可以在 Java中调用PL/SQL 程序,或在PL/SQL 中调用 Java 程序。

See Also: 另见:

Chapter 8, "Server-Side Programming: PL/SQL and Java" and "Client-Side Database Programming"第8章, "服务器端编程:PL/SQL和Java"和"客户端数据库编程"

Transaction Management 事务管理

Oracle Database is designed as a multiuser database. The database must ensure that multiple users can work concurrently without corrupting one another's data. Oracle 数据库被设计为多用户数据库。数据库必须确保多个用户可以同时工作,而不会损坏彼此的数据。

Transactions 事务

An RDBMS must be able to group SQL statements so that they are either all committed, which means they are applied to the database, or all rolled back, which means they are undone. A transaction is a logical, atomic unit of work that contains one or more SQL statements. RDBMS必须能够对SQL 语句进行分组,以将它们一起提交,将其应用于数据库;或者将它们全部回滚,将其全部撤消。事务是一个逻辑、原子的工作单元,包含一条或多条SQL 语句。

An illustration of the need for transactions is a funds transfer from a savings account to a checking account. The transfer consists of the following separate operations: 举一个需要使用事务的例子,将资金从一个储蓄帐户转账到一个支票帐户。这笔转账由以下几个单独的操作组成:

? 1. Decrease the savings account.

? 2. Increase the checking account.

? 3. Record the transaction in the transaction journal. ?从储蓄帐户中扣除资金。

?将资金增加到支票帐户。

?在事务日志中记录该事务。

Oracle Database guarantees that all three operations succeed or fail as a

unit. For example, if a hardware failure prevents a statement in the transaction from executing, then the other statements must be rolled

back. Oracle 数据库确保将所有三个操作作为一个单元来处理, 要么全部成功,要么全部失败。例如, 如果硬件故障阻止了事务中的某个语句的执行,那么其他语句必须回滚。

Transactions are one of the features that sets Oracle Database apart from

a file system. If you perform an atomic operation that updates several files, and if the system fails halfway through, then the files will not be

consistent. In contrast, a transaction moves an Oracle database from one

consistent state to another. The basic principle of a transaction is "all or nothing": an atomic operation succeeds or fails as a whole. 事务是Oracle数据库有别于文件系统的特征之一。如果您执行一个原子操作,更新了几个文件,但是系统在处理过程中失败,那么文件将处于不一致状态。相比之下,事务则会将Oracle 数据库从一个一致状态转移到另一个一致状态。事务的基本原则是,"要么全做,要么全都不做":一个原子操作作为一个整体,要么都成功,要么都失败。

See Also: 另见:Chapter 10, "Transactions"第10章, "事务" Data Concurrency 数据并发性

A requirement of a multiuser RDBMS is the control of concurrency, which is the simultaneous access of the same data by multiple users. Without concurrency controls, users could change data improperly, compromising

data integrity. For example, one user could update a row while a different 对多用户RDBMS的一个要求是并发控制,即多个用户同时访问同一数据。如果没有并发控制,则用户可能会不正确地更改数据,并影响数据完整性。例如,一个用户可能企图更新一行,而另一个不同的用户同时也在更新它。

user simultaneously updates it.

If multiple users access the same data, then one way of managing

concurrency is to make users wait. However, the goal of a DBMS is to

reduce wait time so it is either nonexistent or negligible. All SQL

statements that modify data must proceed with as little interference as possible. Destructive interactions, which are interactions that incorrectly

update data or alter underlying data structures, must be avoided. 如果多个用户访问相同的数据,那么管理并发的其中一种方法,就是让用户等待。而DBMS的目标却是减少等待时间,甚至于感觉不到等待的存在,或其等待时间可以少到忽略不计。所有修改数据的 SQL 语句必须尽可能做到互不干扰。那些具有破坏性的交互性操作,可能会不正确地更新数据,或不正确地更改基础数据结构,必须予以避免。

Oracle Database uses locks to control concurrent access to data. A lock is a mechanism that prevents destructive interaction between transactions accessing a shared resource. Locks help ensure data integrity while allowing maximum concurrent access to data. Oracle 数据库使用锁来控制对数据的并发访问。锁是一种机制,可以防止多个事务在访问共享资源时的相互破坏作用。锁有助于确保数据的完整性,同时允许对数据的最大并发访问。

See Also: 另见:

"Overview of the Oracle Database Locking Mechanism""Oracle数据库锁定机制概述" Data Consistency 数据一致性

In Oracle Database, each user must see a consistent view of the data,

including visible changes made by a user's own transactions and

committed transactions of other users. For example, the database must prevent dirty reads, which occur when one transaction sees uncommitted

changes made by another concurrent transaction. 在Oracle数据库中,每个用户必须看到数据的一致视图,包括用户自己的事务以及其他用户已提交的事务所做出的更改。例如,数据库必须防止脏读,若一个事务看到另一个并发事务未提交的更改,即是这种情况。

Oracle Database always enforces statement-level read consistency,

which guarantees that the data returned by a single query is committed and consistent with respect to a single point in time. Depending on the

transaction isolation level, this point is the time at which the statement

was opened or the time the transaction began. The Flashback Query feature enables you to specify this point in time explicitly. Oracle 数据库始终强制执行语句级读取的一致性,保证单个查询所返回的数据是已提交的,并与某个时间点一致。基于不同的事务隔离级别,这个时间点要么是语句被打开时,要么是事务开始时。闪回查询功能使您能够显式指定此时间点。

The database can also provide read consistency to all queries in a transaction, known as transaction-level read consistency. In this case, each statement in a transaction sees data from the same point in time, which is the time at which the transaction began. 数据库也可以为整个事务中的所有查询提供读一致性,这叫事务级读一致性。在这种情况下,事务中的每一个语句看见的都是同一个时间点的数据,这个时间点也就是事务开始之时。

See Also: 另见:

?Chapter 9, "Data Concurrency and Consistency"

?Oracle Database Advanced Application Developer's Guide to learn about Flashback Query ?第9章, "数据并发性和一致性"

?《Oracle 数据库高级应用开发者指南》了解闪回查询

Oracle Database Architecture Oracle数据库体系结构

A database server is the key to information management. In general, a server reliably manages a large amount of data in a multiuser environment so that users can concurrently access the same data. A database server also prevents unauthorized access and provides efficient solutions for failure recovery. 数据库服务器是信息管理的关键。通常,服务器可靠地管理多用户环境中的大量数据,以便使用户可以同时访问这些相同的数据。数据库服务器还可防止未经授权的访问,并为故障恢复提供有效的解决方案。

Database and Instance 数据库和实例

An Oracle database server consists of a database and at least one

database instance (commonly referred to as simply an instance). Because an instance and a database are so closely connected, the term

Oracle database is sometimes used to refer to both instance and

database. In the strictest sense the terms have the following meanings: Oracle 数据库服务器包括一个数据库和至少一个数据库实例(通常是指只有一个实例)。因为实例和数据库是如此的紧密关联,Oracle 数据库这个术语有时既指实例,也指数据库。这个术语在严格意义上具有以下含义:

?Database ?数据库

A database is a set of files, located on disk, that store data. These files can exist independently of a database instance. 数据库是一组文件,位于磁盘,用于存储数据。这些文件可以独立于数据库实例存在。

?Database instance ?数据库实例

An instance is a set of memory structures that manage database files. The instance consists of a shared memory area, called the system global area (SGA), and a set of background processes. An instance can exist independently of database files. 实例是管理数据库文件的一组内存结构。该实例包含一个叫做系统全局区(SGA)的共享内存区和一组后台进程。实例可以独立于数据库文件而存在。

Figure 1-1 shows a database and its instance. For each user connection to the instance, the application is run by a client process. Each client process is associated with its own server process. The server process has its own private session memory, known as the program global area (PGA). 图 1 显示了一个数据库和它的实例。对连接到实例的每个用户,其应用程序以一个客户端进程运行。每个客户端进程都具与它自己的服务器进程相关联。服务器进程有自己的私有会话内存区,称为程序全局区(PGA)。

Figure 1-1 Oracle Instance and Database 图 1-1 Oracle实例和数据库

Description of "Figure 1-1 Oracle Instance and Database"Description of "Figure 1-1 Oracle Instance and Database"

A database can be considered from both a physical and logical perspective. Physical data is data viewable at the operating system level. For example, operating system utilities such as the Linux ls and ps can list database files and processes. Logical data such as a table is meaningful only for the database. A SQL statement can list the tables in an Oracle database, but an operating system utility cannot. 一个数据库可以从物理和逻辑这两个角度来考察。物理数据是在操作系统级别可查看的数据。例如,使用操作系统实用程序,如 Linux ls 和 ps,可以列出数据库文件和进程。而象表这样的逻辑数据只在数据库层面有意义。 SQL 语句可以列出Oracle 数据库中的表,但操作系统实用程序却不能。

The database has physical structures and logical structures. Because the physical and logical structures are separate, the physical storage of data can be managed without affecting access to logical storage

structures. For example, renaming a physical database file does not rename the tables whose data is stored in this file. 数据库具有物理结构和逻辑结构。因为物理结构和逻辑结构是分开的,因此对物理数据存储的管理,不会影响对逻辑存储结构的访问。例如,重命名物理数据库文件并不会重命名表,尽管其数据存储在此文件中。

See Also: 另见:

Chapter 13, "Oracle Database Instance"第13章, "Oracle数据库实例" Database Storage Structures 数据库存储结构

An essential task of a relational database is data storage. This section briefly describes the physical and logical storage structures used by Oracle Database. 数据存储是关系数据库的一个重要任务。本部分简要介绍了Oracle数据库所使用的物理和逻辑存储结构。

Physical Storage Structures 物理存储结构

The physical database structures are the files that store the data. When you execute the SQL command CREATE DATABASE, the following files are created: 物理数据库结构即是那些存储数据的文件。当您执行 SQL 命令CREATE DATABASE,会创建下列文件:

?Data files ?数据文件

Every Oracle database has one or more physical data files, which contain all the database data. The data of logical database structures, such as tables and indexes, is physically stored in the data files. 每个 Oracle 数据库都有一个或多个物理数据文件,其中包含数据库的所有数据。数据库的逻辑数据结构,如表和索引,在物理上存储在这些数据文件中。

?Control files ?控制文件

Every Oracle database has a control file. A control file contains metadata specifying the physical structure of the database, including the database name and the names and locations of the 每个 Oracle 数据库都有一个控制文件。控制文件包含指定数据库物理结构的元数据,包括数据库名称,及数据库文件的位置和名称等。

database files.

?Online redo log files ?联机重做日志文件

Every Oracle Database has an online redo log, which is a set of two

or more online redo log files. An online redo log is made up of redo entries (also called redo records), which record all changes

made to data. 每个数据库都有一个联机重做日志,它包含两个或更多联机重做日志文件。一个联机重做日志由许多重做项组成(也称为重做记录),以记录对数据所做的所有更改。

Many other files are important for the functioning of an Oracle database server. These files include parameter files and diagnostic files. Backup files and archived redo log files are offline files important for backup and recovery. 很多其他文件对Oracle 数据库服务器的正常运行也是很重要的。这些文件包括参数文件和诊断文件。备份文件和归档重做日志文件是用于备份和恢复的重要的脱机文件。

See Also: 另见:

Chapter 11, "Physical Storage Structures"第11章, "物理存储结构" Logical Storage Structures 逻辑存储结构

This section discusses logical storage structures. The following logical storage structures enable Oracle Database to have fine-grained control of disk space use: 本部分讨论逻辑存储结构。以下的逻辑存储结构使得Oracle数据库可以按更细的粒度控制磁盘空间的使用:

?Data blocks ?数据块

At the finest level of granularity, Oracle Database data is stored in data blocks. One data block corresponds to a specific number of bytes on disk. 在最细的粒度级别,Oracle 数据库将数据存储在数据块中。一个数据块对应于磁盘上的特定数目的字节。

?Extents ?扩展区

An extent is a specific number of logically contiguous data blocks, obtained in a single allocation, used to store a specific type of information. 扩展区是一定数目的逻辑上连续的数据块,在单次分配中获得,用于存储特定类型的信息。

?Segments ?段

A segment is a set of extents allocated for a user object (for example, a table or index), undo data, or temporary data. 段是为用户对象(例如一个表或索引)、回滚数据、或临时数据等分配的一组扩展区。

?Tablespaces ?表空间

A database is divided into logical storage units called tablespaces.

A tablespace is the logical container for a segment. Each tablespace contains at least one data file. 数据库由称为表空间的逻辑存储单位组成。表空间是段的逻辑容器。每个表空间至少包含一个数据文件。

See Also: 另见:

Chapter 12, "Logical Storage Structures"第12章, "逻辑存储结构" Database Instance Structures 数据库实例结构

An Oracle database uses memory structures and processes to manage and access the database. All memory structures exist in the main memory of the computers that constitute the RDBMS. Oracle 数据库使用内存结构和进程,来管理和访问数据库。所有内存结构都存在于构成关系数据库的计算机主内存中。

When applications connect to an Oracle database, they are connected to a database instance. The instance services applications by allocating other memory areas in addition to the SGA, and starting other processes in addition to background processes. 当应用程序连接到 Oracle 数据库时,他们也连接到一个数据库实例。实例为该程序服务,为其分配除SGA之外的其他内存区,并启动除后台进程之外的其他进程。

Oracle Database Processes Oracle数据库进程

A process is a mechanism in an operating system that can run a series of steps. Some operating systems use the terms job, task, or thread. For the purpose of this discussion, a thread is equivalent to a process. An Oracle database instance has the following types of processes: 进程是操作系统的一种机制,用于运行一系列步骤。有些操作系统使用工作、任务、或线程等术语。在本论述中,线程等价于进程。 Oracle 数据库实例具有以下类型的进程:

?Client processes ?客户端进程

These processes are created and maintained to run the software code of an application program or an Oracle tool. Most environments have separate computers for client processes. 这些进程被创建和维护,主要用来运行应用程序代码或 Oracle 工具。多数环境中都由单独的计算机来运行客户端进程。

?Background processes ?后台进程

These processes consolidate functions that would otherwise be

handled by multiple Oracle Database programs running for each client process. Background processes asynchronously perform I/O and monitor other Oracle Database processes to provide increased

parallelism for better performance and reliability. 这些进程整合了多种功能,以避免为每个客户端进程运行多个Oracle 数据库程序。后台进程以异步方式执行I/O操作,并监控其他数据库进程,以提供更大的并行度,达到更好的性能和可靠性

?Server processes ?服务端进程

These processes communicate with client processes and interact with Oracle Database to fulfill requests. 这些进程与客户端进程通信,并与Oracle 数据库进行交互,以完成客户端请求。

Oracle processes include server processes and background processes. In most environments, Oracle processes and client processes run on separate computers. Oracle进程包括服务器进程和后台进程。在大多数的环境中, Oracle 进程和客户端进程在不同的计算机上运行。

See Also: 另见:

Chapter 15, "Process Architecture"第15章, "进程体系结构" Instance Memory Structures 实例内存结构

Oracle Database creates and uses memory structures for purposes such as memory for program code, data shared among users, and private data areas for each connected user. The following memory structures are associated with an instance: Oracle 数据库创建和使用内存结构有几个目的,例如,用于在多个用户之间共享程序代码和数据的内存,以及用于每个已连接用户的私有数据区域。以下是与实例相关的内存结构:

?System Global Area (SGA) ?系统全局区(SGA)

The SGA is a group of shared memory structures that contain data and control information for one database instance. Examples of SGA components include cached data blocks and shared SQL areas. SGA 是一组共享的内存结构,包含一个数据库实例的数据和控制信息。例如,SGA 组件包括数据块缓存和共享 SQL 区域。

?Program Global Areas (PGA) ?程序全局区(PGA)

A PGA is a memory region that contain data and control information for a server or background process. Access to the PGA is exclusive to the process. Each server process and background process has its own PGA. PGA是一个内存区域,其中包含某个服务器进程或后台进程的数据和控制信息。 PGA只由专有的过程访问。每个服务器进程和后台进程都有其自己的PGA。

See Also: 另见:

Chapter 14, "Memory Architecture"第14章, "内存体系结构" Application and Networking Architecture 应用程序和网络体系结构

To take full advantage of a given computer system or network, Oracle Database enables processing to be split between the database server and the client programs. The computer running the RDBMS handles the

database server responsibilities while the computers running the 为了充分利用一个特定的计算机系统或网络,数据库把任务在数据库服务器和客户端程序之间分开处理。运行关系数据库的计算机负责处理数据库服务器,而运行应用程序处理的计算机负责解释和显示数据。

applications handle the interpretation and display of data.

Application Architecture 应用程序体系结构

The application architecture refers to the computing environment in which a database application connects to an Oracle database. The two most common database architectures are client/server and multitier. 应用程序体系结构是指一个数据库应用程序连接到 Oracle 数据库的计算环境。最常见的两种数据库体系结构是客户端/服务器体系结构和多层体系结构。

In a client/server architecture

, the client application initiates a request for an operation to be performed on the database server. The server runs Oracle Database software and handles the functions required for concurrent, shared data access. The server receives and processes requests that originate from clients. 在客户端/服务器体系结构中,客户端应用程序发起一个将在数据库服务器上执行操作的请求。服务器运行Oracle数据库软件,并处理并发、共享数据访问所需的功能。服务器接收并处理来自客户端的请求。

In a traditional multitier architecture, one or more application servers

perform parts of the operation. An application server contains a large

part of the application logic, provides access to the data for the client, and

performs some query processing, thus lessening the load on the database. The application server can serve as an interface between clients and

multiple databases and provide an additional level of security.在传统的多层体系结构中,由一个或多个应用程序服务器执行部分(由传统C/S服务器执行的)操作。应用程序服务器包含应用程序逻辑的很大一部分,为该客户机提供对数据的访问,并执行一些查询处理,从而减轻在数据库上的负载。应用程序服务器可以作为客户端和多个数据库之间的接口,并提供一个额外的安全级别。

Service-oriented architecture (SOA) is a multitier architecture in which application functionality is encapsulated in services. SOA services are usually implemented as Web services. Web services are accessible through HTTP and are based on XML-based standards such as Web Services Description Language (WSDL) and SOAP.面向服务的体系结构 (SOA) 是一种多层体系结构,应用程序的功能被封装在服务中。 SOA 服务通常是作为 Web 服务实现的。 Web 服务可通过HTTP 访问,并基于XML 标准,如 Web 服务描述语言 (WSDL) 和 SOAP。

Oracle Database can act as a Web service provider in a traditional multitier or SOA environment.Oracle 数据库可以在传统的多层环境或 SOA 环境中扮演一个 Web 服务提供者的角色。

See Also:另见:

?"Overview of Multitier Architecture"

?Oracle XML DB Developer's Guide for more information about using Web services with the database ?"多层体系结构概述"

?《Oracle XML DB开发人员指南》关于使用数据库Web 服务的详细信息

Networking Architecture网络体系结构

Oracle Net Services is the interface between the database and the network communication protocols that facilitate distributed processing and Oracle 网络服务是数据库与网络通信协议之间的接口, 它对分布式处理和分布式数据库很有用。通信协议定义了数据在网络上被传输和接收的方式。

distributed databases. Communication protocols define the way that data is transmitted and received on a network. Oracle Net Services supports communications on all major network protocols, including TCP/IP, HTTP, FTP, and WebDAV.Oracle 网络服务支持所有主要的网络通信协议,包括 TCP/IP、 HTTP、FTP 、和 WebDAV

Oracle Net, a component of Oracle Net Services, establishes and maintains a network session from a client application to a database server. After a network session is established, Oracle Net acts as the data courier for both the client application and the database server, exchanging messages between them. Oracle Net can perform these jobs because it is located on each computer in the network.Oracle Net是Oracle 网络服务的一个组件,用于建立和保持一个客户端应用程序到数据库服务器的网络会话。网络会话建立后,Oracle Net作为客户端应用程序和数据库之间的数据传递员,在它们之间交换消息。 Oracle Net之所以可以执行这些工作,是因为它位于网络中的每台计算机上。

An important component of Net Services is the Oracle Net Listener

(called the listener), which is a separate process that runs on the database server or elsewhere in the network. Client applications can send

connection requests to the listener, which manages the traffic of these

requests to the database server. When a connection is established, the client and database communicate directly.网络服务的一个重要组成部分是Oracle 网络监听器(简称监听器),它是一个单独的进程,运行在数据库服务器上,或在网络中的其它地方。客户端应用程序可以发送连接请求到监听器,而监听器管理这些发送到数据库服务器的请求的流量。当一个连接建立之后,客户端和数据库进行直接通信(,而不再需要监听器的参与)。

The most common ways to configure an Oracle database to service client

requests are:

为服务客户端请求,最常见的两种配置 Oracle 数据库的方式是:?Dedicated server architecture ?专用服务器体系结构

Each client process connects to a dedicated server process. The server process is not shared by any other client for the duration of the client's session. Each new session is assigned a dedicated server process.每个客户端进程连接到一个专用的服务器进程。在与客户端的会话期间,服务器进程不可以被任何其他客户端共享。 Oracle会为每个新会话分配一个专用的服务器进程

?Shared server architecture ?共享服务器体系结构

The database uses a pool of shared processes for multiple sessions.

A client process communicates with a dispatcher, which is a process that enables many clients to connect to the same database instance without the need for a dedicated server process for each client.数据库使用一个用于多个会话的共享进程池。客户端进程与一个调度器通信,调度器是一个进程,它使大量的客户端能够连接到同一数据库实例,而无需为每个客户端建立一个专用的服务器进程。

See Also:另见:

数据库系统概论复习题及答案

第一学期期末考试试卷和答案 试卷代码:03115 授课课时:96 课程名称:数据库系统原理A 适用对象:本科选课班 一、选择题(从下列各题四个答案中选出一个正确答案,每小题1分,共10分) 1、在数据库技术发展的几个阶段中,数据独立性最高的是__A___阶段。 A、数据库系统 B、文件系统 C、人工管理 D、数据项管理 2、在SQL的SELECT语句中,与选择运算对应的命令动词是__C___。 A、SELECT B、FROM C、WHERE D、ORDER BY 3、在数据库中,下列说法_A__是不正确的 A、数据库避免了一切数据的重复 B、若系统是完全可以控制的,则系统可确保更新是的一致性 C、数据可以共享 D、数据库减少了冗余 4、在数据库系统中,模式/外模式映像用于解决数据的_C__ A、结构独立性 B、物理独立性 C、逻辑独立性 D、分布独立性 5、关系代数的5种基本运算是__D_。 A、并、差、选择、投影、自然连接 B、并、差、交、选择、投影 C、并、差、交、选择、笛卡尔积 D、并、差、选择、投影、笛卡尔积 6、在SQL语句中,谓词“EXISTS”的含义是_B___。 A、全称量词 B、存在量词 C、自然连接--在连接条件中使用等于(=)运算符比较被连接列的列值,但它使用选择列表指出查询结果集合中所包括的列,并删除连接表中的重复列 D、等值连接--在连接条件中使用等于号(=)运算符比较被连接列的列值,其查询结果中列出被连接表中的所有列,包括其中的重复列 7、规范化过程主要为克服数据库逻辑结构中的插入异常、删除异常、更新异常以及_C__的缺陷 A、数据不一致性 B、结构不合理 C、冗余度大 D、数据丢失 8、数据库数据的正确性和相容性是数据库的__B____。 A、安全性 B、可维护性 C、完整性 D、并发控制 9、数据库三级模式体系结构主要的目标是确保数据库的_B__。 A、数据安全性 B、数据独立性

数据库系统概念(各章节练习简答题答案)

数据库系统概念(章节练习简答题答案) 1 .试述sQL 语言的特点。 (l)综合统一。sQL 语言集数据定义语言DDL 、数据操纵语言DML、数据控制语言DCL 的功能于一体。(2)高度非过程化。用sQL 语言进行数据操作,只要提出“做什么”,而无需指明“怎么做”,因此无需了解存取路径,存取路径的选择以及sQL 语句的操作过程由系统自动完成。 (3)面向集合的操作方式。sQL 语言采用集合操作方式,不仅操作对象、查找结果可以是元组的集合,而且一次插入、删除、更新操作的对象也可以是元组的集合。 (4)以同一种语法结构提供两种使用方式。sQL 语言既是自含式语言,又是嵌入式语言。作为自含式语言,它能够独立地用于联机交互的使用方式;作为嵌入式语言,它能够嵌入到高级语言程序中,供程序员设计程序时使用。(5)语言简捷,易学易用。 2 .试述sQL 的定义功能。 sQL 的数据定义功能包括定义表、定义视图和定义索引。SQL 语言使用cREATE TABLE 语句建立基本表,ALTER TABLE 语句修改基本表定义,DROP TABLE 语句删除基本表;使用CREATE INDEX 语句建立索引,DROP INDEX 语句删除索引;使用CREA TE VIEW 语句建立视图,DROP VIEW 语句删除视图。 3 .什么是基本表?什么是视图?两者的区别和联系是什么? 基本表是本身独立存在的表,在sQL 中一个关系就对应一个表。视图是从一个或几个基本表导出的表。视图本身不独立存储在数据库中,是一个虚表。即数据库中只存放视图的定义而不存放视图对应的数据,这些数据仍存放在导出视图的基本表中。视图在概念上与基本表等同,用户可以如同基本表那样使用视图,可以在视图上再定义视图。 4.试述视图的优点。 ( l )视图能够简化用户的操作;( 2 )视图使用户能以多种角度看待同一数据;( 3 )视图对重构数据库提供了一定程度的逻辑独立性;( 4 )视图能够对机密数据提供安全保护。 5 .所有的视图是否都可以更新?为什么? 不是。视图是不实际存储数据的虚表,因此对视图的更新,最终要转换为对基本表的更新。因为有些视图的更新不能惟一有意义地转换成对相应基本表的更新,所以,并不是所有的视图都是可更新的. 6 .哪类视图可以更新的?哪类视图不可以更新的?各举一例说明。 基本表的行列子集视图一般是可更新的。若视图的属性来自集函数、表达式,则该视图肯定是不可以更新的。(举例在书上有) 7 .什么是数据库的安全性? 数据库的安全性是指保护数据库以防止不合法的使用所造成的数据泄露、更改或破坏。 8 .数据库安全性和计算机系统的安全性有什么关系? 安全性问题不是数据库系统所独有的,所有计算机系统都有这个问题。只是在数据库系统中大量数据集中存放,而且为许多最终用户直接共享,从而使安全性问题更为突出。 系统安全保护措施是否有效是数据库系统的主要指标之一。 数据库的安全性和计算机系统的安全性,包括操作系统、网络系统的安全性是紧密联系、相互支持的。 9 .什么是数据库中的自主存取控制方法和强制存取控制方法? 自主存取控制方法:定义各个用户对不同数据对象的存取权限。当用户对数据库访问时首先检查用户的存取权限。防止不合法用户对数据库的存取。 强制存取控制方法:每一个数据对象被(强制地)标以一定的密级,每一个用户也被(强制地)授予某一个级别的许可证。系统规定只有具有某一许可证级别的用户才能存取某一个密级的数据对象。 10. 为什么强制存取控制提供了更高级别的数据库安全性? 强制存取控制(MAC )是对数据本身进行密级标记,无论数据如何复制,标记与数据是一个不可分的整体,只有符合密级标记要求的用户才可以操纵数据,从而提供了更高级别的安全性。

数据库系统概论各章复习试题及答案

数据库系统概论复习资料: 第一章: 一、选择题: 1.在数据管理技术的发展过程中,经历了人工管理阶段、文件系统阶段和数据库系统阶段。在这几个阶段中,数据独立性最高的是 A 阶段。 A.数据库系统 B.文件系统 C.人工管理 D.数据项管理 2.数据库的概念模型独立于 A 。 A.具体的机器和DBMS B.E-R图 C.信息世界 D.现实世界 3.数据库的基本特点是 B 。 A.(1)数据可以共享(或数据结构化) (2)数据独立性 (3)数据冗余大,易移植 (4)统一管理和控制 B.(1)数据可以共享(或数据结构化) (2)数据独立性 (3)数据冗余小,易扩充 (4)统一管理和控制 C.(1)数据可以共享(或数据结构化) (2)数据互换性 (3)数据冗余小,易扩充 (4)统一管理和控制 D.(1)数据非结构化 (2)数据独立性 (3)数据冗余小,易扩充 (4)统一管理和控制 4. B 是存储在计算机内有结构的数据的集合。 A.数据库系统B.数据库 C.数据库管理系统 D.数据结构 5.数据库中存储的是 C 。 A.数据 B.数据模型C.数据以及数据之间的联系 D.信息 6. 数据库中,数据的物理独立性是指 C 。 A.数据库与数据库管理系统的相互独立 B.用户程序与DBMS的相互独立 C.用户的应用程序与存储在磁盘上数据库中的数据是相互独立的 D.应用程序与数据库中数据的逻辑结构相互独立 7. 数据库的特点之一是数据的共享,严格地讲,这里的数据共享是指 D 。 A.同一个应用中的多个程序共享一个数据集合 B.多个用户、同一种语言共享数据 C.多个用户共享一个数据文件 D.多种应用、多种语言、多个用户相互覆盖地使用数据集合 8.数据库系统的核心是 B 。 A.数据库 B.数据库管理系统 C.数据模型 D.软件工具 9. 下述关于数据库系统的正确叙述是 A 。 A.数据库系统减少了数据冗余 B.数据库系统避免了一切冗余 C.数据库系统中数据的一致性是指数据类型一致 D.数据库系统比文件系统能管理更多的数据 10. 数将数据库的结构划分成多个层次,是为了提高数据库的①和②。 ①A.数据独立性 B.逻辑独立性 C.管理规范性 D.数据的共享 ②A.数据独立性 B.物理独立性 C.逻辑独立性 D.管理规范性 【答案:】①B ②B 11. 数据库(DB)、数据库系统(DBS)和数据库管理系统(DBMS)三者之间的关系是 A 。 A.DBS包括DB和DBMS B.DDMS包括DB和DBS C.DB包括DBS和DBMS D.DBS就是DB,也就是DBMS

数据库系统概论试题及答案整理版

数据库系统概论复习资料 第一章绪论 一、选择题 1.在数据管理技术的发展过程中,经历了人工管理阶段、文件系统阶段和数据库系统阶段。在这几个 阶段中,数据独立性最高的是 A 阶段。 A.数据库系B.文件系统C.人工管理D.数据项管理 2.数据库的概念模型独立于 A 。 A.具体的机器和DBMS B.E-R图C.信息世界D.现实世界 3.数据库的基本特点是 B 。 A.(1)数据结构化(2)数据独立性 (3)数据共享性高,冗余大,易移植 (4)统一管理和控制 B.(1)数据结构化(2)数据独立性 (3)数据共享性高,冗余小,易扩充 (4)统一管理和控制 C.(1)数据结构化(2)数据互换性 (3)数据共享性高,冗余小,易扩充 (4)统一管理和控制 D.(1)数据非结构化 (2)数据独立性 (3)数据共享性高,冗余小,易扩充 (4)统一管理和控制 4. B 是存储在计算机内有结构的数据的集合。 A.数据库系统B.数据库C.数据库管理系统D.数据结构 5.数据库中存储的是 C 。 A. 数据 B. 数据模型 C.数据及数据间的联系 D. 信息 6.数据库中,数据的物理独立性是指 C 。 A.数据库与数据库管理系统的相互独立 B.用户程序与DBMS的相互独立 C.用户的应用程序与存储在磁盘上数据库中的数据是相互独立的 D.应用程序与数据库中数据的逻辑结构相互独立 7.数据库的特点之一是数据的共享,严格地讲,这里的数据共享是指 D 。 A.同一个应用中的多个程序共享一个数据集合 B.多个用户、同一种语言共享数据 C.多个用户共享一个数据文件 D.多种应用、多种语言、多个用户相互覆盖地使用数据集合

(完整版)数据库系统概论试题及答案3

试题三 一、单项选择题 (本大题共20小题,每小题1.5分,共30分) 在每小题列出的四个备选项中只有一个是符合题目要 求的,请将其代码填写在题后的括号内。错选、多选或 未选均无分。 1. 数据库系统与文件系统的主要区别是() A.数据库系统复杂,而文件系统简单 B.文件系统不能解决数据冗余和数据独立性问题,而数据库系统可以解决C.文件系统只能管理程序文件,而数据库系统能够管理各种类型的文件D.文件系统管理的数据量较少,而数据库系统可以管理庞大的数据量 2.数据库管理系统能实现对数据库中数据的查询、插入、修改和删除等操作的 数据库语言称为() A.数据定义语言(DDL)B.数据管理语言 C.数据操纵语言(DML)D.数据控制语言 3.数据库的网状模型应满足的条件是() A.允许一个以上结点无双亲,也允许一个结点有多个双亲 B.必须有两个以上的结点 C.有且仅有一个结点无双亲,其余结点都只有一个双亲 D.每个结点有且仅有一个双亲 4.数据的逻辑独立性是指() A.内模式改变,模式不变 B.模式改变,内模式不变 C.模式改变,外模式和应用程序不变 D.内模式改变,外模式和应用程序不变 5.设有关系模式EMP(职工号,姓名,年龄,技能)。假设职工号唯一,每个职工有多项技能,则EMP表的主码是() A.职工号B.姓名,技能 C.技能D.职工号,技能 6.在关系代数中,对一个关系做投影操作后,新关系的元组个数()原来 关系的元组个数。

A.小于B.小于或等于C.等于D.大于 7.设关系R和S的属性个数分别是2和3,那么R S等价于() 1<2 A.σ1<2(R?S)B.σ1<4(R?S) C.σ1<2(R S)D.σ1<4(R S) 8.学校数据库中有学生和宿舍两个关系: 学生(学号,姓名)和宿舍(楼名,房间号,床位号,学号) 假设有的学生不住宿,床位也可能空闲。如果要列出所有学生住宿和宿舍分配的情况,包括没有住宿的学生和空闲的床位,则应执行() A. 全外联接 B. 左外联接 C. 右外联接 D. 自然联接 9.用下面的T-SQL语句建立一个基本表: CREATE TABLE Student(Sno CHAR (4) NOT NULL, Sname CHAR (8) NOT NULL, Sex CHAR (2), Age SMALLINT) 可以插入到表中的元组是() A. '5021','刘祥',男,21 B.NULL,'刘祥',NULL,21 C. '5021',NULL,男,21 D. '5021','刘祥',NULL,NULL 10. 把对关系SC的属性GRADE的修改权授予用户ZHAO的T-SQL语句是 () A. GRANT GRADE ON SC TO ZHAO B. GRANT UPDA TE ON SC TO ZHAO C. GRANT UPDA TE (GRADE) ON SC TO ZHAO D. GRANT UPDA TE ON SC (GRADE) TO ZHAO 11.图1中()是关系完备的系统 A B C D 图1 12.给定关系模式SCP(Sno,Cno,P),其中Sno表示学号,Cno表示课程号,P 表示名次。若每一名学生每门课程有一定的名次,每门课程每一名次只有一名学生,则以下叙述中错误的是()

CT的基本概念和术语

CT的基本概念和术语 2.2.1体素与像素(Voxel and Pixel) 体素是体积单位。在CT扫描中,根据断层设置的厚度、矩阵的大小,能被CT扫描的最小体积单位。体素作为体积单位,它有三要素,即长、宽、高。通常CT中体素的长和宽都为1mm,高度或深度则根据层厚可分别为10、5、3、2、1mm等。像素又称像元,是构成CT图像最小的单位。它与体素相对应,体素的大小在CT图像上的表现,即为像素。 2.2.2采集矩阵与显示矩阵(Scaning and Displaying Matrix) 矩阵是像素以二维方式排列的阵列,它与重建后图像的质量有关。在相同大小的采样野中,矩阵越大像素也就越多,重建后图像质量越高。目前常用的采集矩阵大小基本为:512′512,另外还有256′256和1024′1024。CT图像重建后用于显示的矩阵称为显示矩阵,通常为保证图像显示的质量,显示矩阵往往是等于或大于采集矩阵。通常采集矩阵为512′512的CT,显示矩阵常为1024′1024。 2.2.3原始数据(Raw Data) 原始数据是CT扫描后由探测器接收到的信号,经模数转换后传送给计算机,其间已转换成数字信号经预处理后,尚未重建成横断面图像的这部分数据被称为原始数据。 2.2.4重建与重组(Reconstruction and Reformation)

原始扫描数据经计算机采用特定的算法处理,最后得到能用于诊断的一幅横断面图像,该处理方法或过程被称为重建或图像的重建。重组是不涉及原始数据处理的一种图像处理方法。如多平面图像重组、三维图像处理等。在以往英文文献中,有关图像的重建的概念也有些混淆,三维图像处理有时也采用重建(reconstruction)一词,实际上,目前CT的三维图像处理基本都是在横断面图像的基础上,重新组合或构筑形成三维影像。由于重组是使用已形成的横断面图像,因此重组图像的质量与已形成的横断面图像有密切的关系,尤其是层厚的大小和数目。一般,扫描的层厚越薄、图像的数目越多,重组的效果就越好。 2.2.5算法、重建函数核与滤波函数(Algorithm, Kernel) 算法是针对特定输入和输出的一组规则。算法的主要特征是不能有任何模糊的含义,所以算法规则描述的步骤必须是简单、易操作并且概念明确,而且能够由机器实施。另外,算法只能执行限定数量的步骤。重建函数核或称重建滤波器、滤波函数。CT的扫描通常需包含一些必要的参数,有的参数可由操作人员选择,有的则不能。重建函数核是一项重要的内容,它是一种算法函数,并决定和影响了图像的分辨力、噪声等等。·在CT临床检查中,可供CT图像处理选择的滤波函数一般可有高分辨力、标准和软组织三种模式,有的CT机除这三种模式外,还外加超高分辨力和精细模式等。·高分辨力模式实际上是一种强化边缘、轮廓的函数,它能提高分辨力,但同时图像的噪声也相应增加。软组织模式是一种平滑、柔和的函数,采用软组织模式处理后,图像的对比度下降,噪声减少,密度分辨力提高。而标准模式则是没有任何强化和柔和作用的一种运算处理方法。

数据库系统概念(database system concepts)英文第六版 课后练习题 答案 第23章

C H A P T E R23 XML Practice Exercises 23.1Give an alternative representation of university information contain- ing the same data as in Figure23.1,but using attributes instead of subelements.Also give the DTD or XML S chema for this representation. Answer: a.The XML representation of data using attributes is shown in Figure 23.100. b.The DTD for the bank is shown in Figure23.101. 1

2Chapter23XML Figure23.100XML representation. 23.2Give the DTD or XML S chema for an XML representation of the following nested-relational schema: Emp=(ename,ChildrenSet setof(Children),SkillsSet setof(Skills)) Children=(name,Birthday) Birthday=(day,month,year) Skills=(type,ExamsSet setof(Exams)) Exams=(year,city)

数据库系统概论课后练习答案4

第4章数据库安全性 1 .什么是数据库的安全性? 答:数据库的安全性是指保护数据库以防止不合法的使用所造成的数据泄露、更改或破坏。 2 .数据库安全性和计算机系统的安全性有什么关系? 答:安全性问题不是数据库系统所独有的,所有计算机系统都有这个问题。只是在数据库系统中大量数据集中存放,而且为许多最终用户直接共享,从而使安全性问题更为突出。 系统安全保护措施是否有效是数据库系统的主要指标之一。 数据库的安全性和计算机系统的安全性,包括操作系统、网络系统的安全性是紧密联系、相互支持的。 3 .试述可信计算机系统评测标准的情况,试述TDI / TCSEC 标准的基本内容。 答:各个国家在计算机安全技术方面都建立了一套可信标准。目前各国引用或制定的一系列安全标准中,最重要的是美国国防部(DoD )正式颁布的《 DoD 可信计算机系统评估准则》。CC通用准则V2.1版于1999年被ISO纳为国际标准,2001年我国采用其为国家标准。目前CC已经基本取代了TCSEC,成为评估信息产品安全性的主要标准。 TDI / TCSEC 标准是将TcsEc 扩展到数据库管理系统,即《可信计算机系统评估标准关于可信数据库系统的解释》(Tmsted Database Interpretation 简称TDI , 又称紫皮书)。在TDI 中定义了数据库管理系统的设计与实现中需满足和用以进行安全性级别评估的标准。 TDI 与TcsEc 一样,从安全策略、责任、保证和文档四个方面来描述安全性级别划分的指标。每个方面又细分为若干项。 CC提出目前国际公认的表述信息技术安全性的结构,即把对信息产品的安全要求分为安全功能要求和安全保证要求。 安全功能要求用以规范产品和系统的安全行为,安全保证要求解决如何正确、有效地实施这些功能。 4 .试述TcsEC ( TDI )将系统安全级别划分为4 组7 个等级的基本内容。 答:根据计算机系统对安全性各项指标的支持情况,TCSEC ( TDI )将系统划分为四组(division )7 个等级,依次是 D 、C ( CI , CZ )、B ( BI , BZ , B3 )、A ( AI ) ,按系统可靠或可信程度逐渐增高。 这些安全级别之间具有一种偏序向下兼容的关系,即较高安全性级别提供的安全保护包含较低级别的所有保护要求,同时提供更多或更完善的保护能力。各个等级的基本内容为: ● D 级D 级是最低级别。一切不符合更高标准的系统,统统归于D 组。 ●Cl级只提供了非常初级的自主安全保护。能够实现对用户和数据的分离,进行自主存取控制 (DAC ) ,保护或限制用户权限的传播。 ●C2 级实际是安全产品的最低档次,提供受控的存取保护,即将Cl 级的DAC 进一步细化,以个 人身份注册负责,并实施审计和资源隔离。 ●Bl 级标记安全保护。对系统的数据加以标记,并对标记的主体和客体实施强制存取控制(MAC ) 以及审计等安全机制。

《机械安全_基本概念与设计通则_第1部分:基本术语和方法》GB

机械安全基本概念与设计通则第1部分:基本术语和方法 GB/T15706.1-2007 机械安全基本概念与设计通则第1部分:基本术语和方法 Safety of machinery-Basic concepts,general principles for design-Part1:Basic terminology, methodology 目次 前言 引言 1 范围 2 规范性引用文件 3 术语和定义 4 设计机械时需要考虑的危险 5 减小风险的策略 附录A(资料性附录) 机器的图解表示 用于GB/T 15706的专用术语和表述的英中文对照索引 参考文献 前言 GB/T 15706《机械安全基本概念与设计通则》由两部分组成: ——第1部分:基本术语和方法; ——第2部分:技术原则。 本部分为GB/T 15706的第l部分。 本部分等同采用国际标准ISO12100-1:2003《机械安全基本概念与设计通则第1部分:基本术语和方法》(英文版),并按照我国标准的编写规则GB/T 1.1-2000做了编辑性修改。 本部分与ISO12100-1:2003的不同为:将标准正文后面的英法德三种文字对照的索引改为英中两种文字对照的索引。 本部分代替GB/T 15706.1-1995《机械安全基本概念与设计通则第1部分:基本术语、方法学》。 本部分由全国机械安全标准化技术委员会(SAC/TC 208)提出并归口。 本部分负责起草单位:机械科学研究总院中机生产力促进中心。 本部分参加起草单位:长春试验机研究所、南京食品包装机械研究所、吉林安全科学技术研究院、中国食品和包装机械总公司、中联认证中心、广东金方圆安全技术检测有限公司。 本部分主要起草人:聂北刚、李勤、王学智、居荣华、肖建民、宁燕、王国扣、隰永才、张晓飞、富锐、程红兵、孟宪卫、赵茂程。 本部分所代替标准的历次版本发布情况为: ——GB/T 15706.1-1995。 引言 GB/T 15706的首要目的是为设计者提供总体框架和指南,使其能够设计出在预定使用范围内具备安全性的机器。同时亦为标准制定者提供标准制定的策略。 机械安全的概念是指在风险已经被充分减小的机器的寿命周期内,机器执行其预定功能的能力。 本部分是机械安全系列标准的基础标准。该系列标准的结构为: ——A类标准(基础安全标准),给出适用于所有机械的基本概念、设计原则和一般特征。 ——B类标准(通用安全标准),涉及机械的一种安全特征或使用范围较宽的一类安全防护装置:

《数据库系统概论》课后习题及参考答案

课后作业习题 《数据库系统概论》课程部分习题及参考答案 第一章绪论(教材 41页) 1.试述数据、数据库、数据库系统、数据库管理系统的概念。 数据: 描述事物的符号记录称为数据。数据的种类有文字、图形、图象、声音、正文等等。数据与其语义是不可分的。 数据库: 数据库是长期储存在计算机内、有组织的、可共享的数据集合。数据库中的数据按一定的数据模型组织、描述和储存,具有较小的冗余度、较高的数据独立性和易扩展性,并可为各种用户共享。 数据库系统: 数据库系统( DBS)是指在计算机系统中引入数据库后的系统构成。数据库系统由数据库、数据库管理系统(及其开发工具)、应用系统、数据库管理员构成。 数据库管理系统: 数据库管理系统 (DBMS)是位于用户与操作系统之间的一层数据管理软件。用于科学地组织和存储数据、高效地获取和维护数据。DBMS主要功能包括数据定义功能、数据操纵功能、数据库的运行管理功能、数据库的建立和维护功能。 2.使用数据库系统有什么好处? 使用数据库系统的好处是由数据库管理系统的特点或优点决定的。 使用数据库系统的好处很多,例如可以大大提高应用开发的效率,方便用户的使用,减轻数据库系统管理人员维护的负担等。 为什么有这些好处,可以结合第 5题来回答。

使用数据库系统可以大大提高应用开发的效率。因为在数据库系统中应用程序不必考虑数据的定义、存储和数据存取的具体路径,这些工作都由 DBMS来完成。 此外,当应用逻辑改变,数据的逻辑结构需要改变时,由于数据库系统提供了数据与程序之间的独立性。数据逻辑结构的改变是 DBA的责任,开发人员不必修改应用程序,或者只需要修改很少的应用程序。从而既简化了应用程序的编制,又大大减少了应用程序的维护和修改。 使用数据库系统可以减轻数据库系统管理人员维护系统的负担。因为 DBMS在数据库建立、运用和维护时对数据库进行统一的管理和控制,包括数据的完整性、安全性,多用户并发控制,故障恢复等等都由DBMS执行。 总之,使用数据库系统的优点是很多的,既便于数据的集中管理,控制数据冗余,可以提高数据的利用率和一致性,又有利于应用程序的开发和维护。 3.试述文件系统与数据库系统的区别和联系。 文件系统与数据库系统的区别: 文件系统面向某一应用程序,共享性差、冗余度大,独立性差,纪录内有结构、整体无结构,应用程序自己控制。 数据库系统面向现实世界,共享性高、冗余度小,具有高度的物理独立性和一定的逻辑独立性,整体结构化,用数据模型描述,由数据库管理系统提供数据安全性、完整性、并发控制和恢复能力。 文件系统与数据库系统的联系是: 文件系统与数据库系统都是计算机系统中管理数据的软件。 5.试述数据库系统的特点。 数据库系统的主要特点有: 一、数据结构化 数据库系统实现整体数据的结构化,这是数据库的主要特征之一,也是数据库系统与文件系统的本质区别。 二、数据的共享性高,冗余度低,易扩充

数据库系统概念第六版课后习题部分答案2s

C H A P T E R2 Introduction to the Relational Model Practice Exercises 2.1Consider the relational database of Figure??.What are the appropriate primary keys? Answer:The answer is shown in Figure2.1,with primary keys under- lined. 2.2Consider the foreign key constraint from the dept name attribute of in- structor to the department relation.Give examples of inserts and deletes to these relations,which can cause a violation of the foreign key constraint. Answer: ?Inserting a tuple: (10111,Ostrom,Economics,110,000) into the instructor table,where the department table does not have the department Economics,would violate the foreign key constraint. ?Deleting the tuple: (Biology,Watson,90000) from the department table,where at least one student or instructor tuple has dept name as Biology,would violate the foreign key con- straint. employee(person name,street,city) works(person name company name,salary) company(company name,city) Figure2.1Relational database for Practice Exercise2.1. 1

数据库系统概论试题及答案

试题二 一、单项选择题 在每小题列出的四个备选项中只有一个是符合题目 要求的,请将其代码填写在题后的括号内。错选、 多选或未选均无分。 1. 下列四项中,不属于数据库系统的主要特点的是()。 A.数据结构化B.数据的冗余度小 C.较高的数据独立性 D.程序的标准化 2. 数据的逻辑独立性是指() A.内模式改变,模式不变 B.模式改变,内模式不变 C.模式改变,外模式和应用程序不变 D.内模式改变,外模式和应用程序不变 3. 在数据库的三级模式结构中,描述数据库中全体数据的全局逻辑结构和特征 的是()。 A.外模式 B.内模式 C.存储模式 D.模式 4. 相对于非关系模型,关系数据模型的缺点之一是()。 A.存取路径对用户透明,需查询优化 B.数据结构简单 C.数据独立性高D.有严格的数学基础 5. 现有关系表:学生(宿舍编号,宿舍地址,学号,姓名,性别,专业,出生 日期)的主码是()。 A.宿舍编号 B.学号 C.宿舍地址,姓名 D.宿舍编号,学号 6.自然连接是构成新关系的有效方法。一般情况下,当对关系R和S使用自然 连接时,要求R和S含有一个或多个共有的()。 A.元组 B.行 C.记录 D.属性 7.下列关系运算中,()运算不属于专门的关系运算。 A.选择B.连接 C.广义笛卡尔积D.投影 8. SQL语言具有()的功能。

A.关系规范化、数据操纵、数据控制 B.数据定义、数据操纵、数据控制 C.数据定义、关系规范化、数据控制 D.数据定义、关系规范化、数据操纵 9.从E-R模型关系向关系模型转换时,一个M:N联系转换为关系模式时,该关系模式的关键字是()。 A.M端实体的关键字B.N端实体的关键字 C.M端实体关键字与N端实体关键字组合 D.重新选取其他属性 10. SQL语言中,删除一个表的命令是() A. DELETE B. DROP C. CLEAR D. REMOVE 11. 图1中()是关系完备的系统 A B C D 图1 12.有关系模式A(S,C,M),其中各属性的含义是:S:学生;C :课程;M:名次,其语义是:每一个学生选修每门课程的成绩有一定的名次,每门课程中每一名次只有一个学生(即没有并列名次),则关系模式A最高达到()A.1NF B.2NF C.3NF D.BCNF 13.关系规范化中的删除异常是指 ( ) A.不该删除的数据被删除B.不该插入的数据被插入C.应该删除的数据未被删除D.应该插入的数据未被插入 14.在数据库设计中, E-R图产生于() A.需求分析阶段B.物理设计阶段 C.逻辑设计阶段D.概念设计阶段 15.有一个关系:学生(学号,姓名,系别),规定学号的值域是8个数字组成的字符串,这一规则属于()。 A.实体完整性约束 B.参照完整性约束 C.用户自定义完整性约束 D.关键字完整性约束

数据库系统概念(database system concepts)英文第六版 课后练习题 答案 第11章

2Chapter11Indexing and Hashing b. c. 11.4Answer: ?With structure11.3.a: Insert9: 10: Insert

Exercises3 Delete23: Delete 19: ?With structure11.3.b: Insert 9: Insert

4Chapter 11Indexing and Hashing Delete 23: Delete 19: ? With structure 11.3.c: Insert 9: Insert 10: Insert 8: Delete 23: Delete 19:

Exercises 5 11.5Answer:If there are K search-key values and m ?1siblings are involved in the redistribution,the expected height of the tree is:log ?(m ?1)n /m ?(K )11.6Answer:Extendable hash structure 000 001 010 011 100101 110 111 11.7Answer: a.Delete 11:From the answer to Exercise 11.6,change the third bucket to: At this stage,it is possible to coalesce the second and third buckets. Then it is enough if the bucket address table has just four entries instead of eight.For the purpose of this answer,we do not do the coalescing. b.Delete 31:From the answer to 11.6,change the last bucket to:

数据库系统概论知识点

第一章:绪论 数据库(DB):长期存储在计算机内、有组织、可共享的大量数据的集合。数据库中的数据按照一定的数据模型组织、描述和存储,具有娇小的冗余度、交稿的数据独立性和易扩展性,并可为各种用户共享。 数据库管理系统(DBMS):位于用户和操作系统间的数据管理系统的一层数据管理软件。用途:科学地组织和存储数据,高效地获取和维护数据。包括数据定义功能,数据组织、存储和管理,数据操纵功能,数据库的事物管理和运行管理,数据库的建立和维护功能,其他功能。 数据库系统(DBS):在计算机系统中引入数据库后的系统,一般由数据库。数据库管理系统(及其开发工具)、应用系统、数据库管理员构成。目的:存储信息并支持用户检索和更新所需的信息。 数据库系统的特点:数据结构化;数据的共享性高,冗余度低,易扩充;数据独立性高;数据由DBMS统一管理和控制。 概念模型实体,客观存在并可相互区别的事物称为实体。 属性,实体所具有的某一特性称为属性。 码,唯一标识实体的属性集称为码。 域,是一组具有相同数据类型的值的集合。 实体型,具有相同属性的实体必然具有的共同的特征和性质。 实体集,同一类型实体的集合称为实体集。 联系 两个实体型之间的联系一对一联系;一对多联系;多对多联系 关系模型关系,元组,属性,码,域,分量,关系模型 关系数据模型的操纵与完整性约束关系数据模型的操作主要包括查询,插入,删除和更新数据。这些操作必须满足关系完整性约束条件。关系的完整性约束条件包括三大类:实体完整性,参照完整性和用户定义的完整性。 数据库系统三级模式结构外模式,模式,内模式 模式:(逻辑模式)数据库中全体数据的逻辑结构和特征的描述,是所有用户的公共数据视图。一个数据库只有一个模式。

数据库系统概论第一章课后答案

第01章绪论 1 .试述数据、数据库、数据库系统、数据库管理系统的概念。 答: ( l )数据(Data ) :描述事物的符号记录称为数据。数据的种类有数字、文字、图形、图像、声音、正文等。数据与其语义是不可分的。解析在现代计算机系统中数据的概念是广义的。早期的计算机系统主要用于科学计算,处理的数据是整数、实数、浮点数等传统数学中的数据。现代计算机能存储和处理的对象十分广泛,表示这些对象的数据也越来越复杂。数据与其语义是不可分的。500 这个数字可以表示一件物品的价格是500 元,也可以表示一个学术会议参加的人数有500 人,还可以表示一袋奶粉重500 克。 ( 2 )数据库(DataBase ,简称DB ) :数据库是长期储存在计算机内的、有组织的、可共享的数据集合。数据库中的数据按一定的数据模型组织、描述和储存,具有较小的冗余度、较高的数据独立性和易扩展性,并可为各种用户共享。 ( 3 )数据库系统(DataBas 。Sytem ,简称DBS ) :数据库系统是指在计算机系统中引入数据库后的系统构成,一般由数据库、数据库管理系统(及其开发工具)、应用系统、数据库管理员构成。解析数据库系统和数据库是两个概念。数据库系统是一个人一机系统,数据库是数据库系统的一个组成部分。但是在日常工作中人们常常把数据库系统简称为数据库。希望读者能够从人们讲话或文章的上下文中区分“数据库系统”和“数据库”,不要引起混淆。 ( 4 )数据库管理系统(DataBase Management sytem ,简称DBMs ) :数据库管理系统是位于用户与操作系统之间的一层数据管理软件,用于科学地组织和存储数据、高效地获取和维护数据。DBMS 的主要功能包括数据定义功能、数据操纵功能、数据库的运行管理功能、数据库的建立和维护功能。解析DBMS 是一个大型的复杂的软件系统,是计算机中的基础软件。目前,专门研制DBMS 的厂商及其研制的DBMS 产品很多。著名的有美国IBM 公司的DBZ 关系数据库管理系统和IMS 层次数据库管理系统、美国Oracle 公司的orade 关系数据库管理系统、s 油ase 公司的s 油ase 关系数据库管理系统、美国微软公司的SQL Serve ,关系数据库管理系统等。

数据库系统概念答案(第五版)

C H A P T E R2 Exercises 2.4Describe the differences in meaning between the terms relation and relation schema. Answer:A relation schema is a type de?nition,and a relation is an instance of that schema.For example,student(ss#,name)is a relation schema and is a relation based on that schema. 2.5Consider the relational database of Figure2.35,where the primary keys are un- derlined.Give an expression in the relational algebra to express each of the fol-lowing queries: a.Find the names of all employees who work for First Bank Corporation. b.Find the names and cities of residence of all employees who work for First Bank Corporation. c.Find the names,street address,and cities of residence of all employees who work for First Bank Corporation and earn more than$10,000per annum. d.Find the names of all employees in this database who live in the same city as the company for which they work. e.Assume the companies may be located in several cities.Find all companies located in every city in which Small Bank Corporation is located. Answer: a.Πperson-name(σcompany-name=“First Bank Corporation”(works)) 7

数据库系统概论课后答案{王珊版}

2 .使用数据库系统有什么好处? 答: 使用数据库系统的好处是由数据库管理系统的特点或优点决定的。使用数据库系统的好处很多,例如,可以大大提高应用开发的效率,方便用户的使用,减轻数据库系统管理人员维护的负担,等等。使用数据库系统可以大大提高应用开发的效率。因为在数据库系统中应用程序不必考虑数据的定义、存储和数据存取的具体路径,这些工作都由DBMS 来完成。用一个通俗的比喻,使用了DBMS 就如有了一个好参谋、好助手,许多具体的技术工作都由这个助手来完成。开发人员就可以专注于应用逻辑的设计,而不必为数据管理的许许多多复杂的细节操心。还有,当应用逻辑改变,数据的逻辑结构也需要改变时,由于数据库系统提供了数据与程序之间的独立性,数据逻辑结构的改变是DBA 的责任,开发人员不必修改应用程序,或者只需要修改很少的应用程序,从而既简化了应用程序的编制,又大大减少了应用程序的维护和修改。使用数据库系统可以减轻数据库系统管理人员维护系统的负担。因为DBMS 在数据库建立、运用和维护时对数据库进行统一的管理和控制,包括数据的完整性、安全性、多用户并发控制、故障恢复等,都由DBMS 执行。总之,使用数据库系统的优点是很多的,既便于数据的集中管理,控制数据冗余,提高数据的利用率和一致性,又有利于应用程序的开发和维护。读者可以在自己今后的工作中结合具体应用,认真加以体会和总结。 3 .试述文件系统与数据库系统的区别和联系。 答: 文件系统与数据库系统的区别是:文件系统面向某一应用程序,共享性差,冗余度大,数据独立性差,记录内有结构,整体无结构,由应用程序自己控制。数据库系统面向现实世界,共享性高,冗余度小,具有较高的物理独立性和一定的逻辑独立性,整体结构化,用数据模型描述,由数据库管理系统提供数据的安全性、完整性、并发控制和恢复能力。 文件系统与数据库系统的联系是:文件系统与数据库系统都是计算机系统中管理数据的软件。解析文件系统是操作系统的重要组成部分;而DBMS 是独立于操作系统的软件。但是DBMS 是在操作系统的基础上实现的;数据库中数据的组织和存储是通过操作系统中的文件系统来实现的。 4 .举出适合用文件系统而不是数据库系统的例子;再举出适合用数据库系统的应用例子。答: ( l )适用于文件系统而不是数据库系统的应用例子数据的备份、软件或应用程序使用过程中的临时数据存储一般使用文件比较合适。早期功能比较简单、比较固定的应用系统也适合用文件系统。 ( 2 )适用于数据库系统而非文件系统的应用例子目前,几乎所有企业或部门的信息系统都以数据库系统为基础,都使用数据库。例如,一个工厂的管理信息系统(其中会包括许多子系统,如库存管理系统、物资采购系统、作业调度系统、设备管理系统、人事管理系统等),学校的学生管理系统,人事管理系统,图书馆的图书管理系统,等等,都适合用数据库系统。希望读者能举出自己了解的应用例子。 5 .试述数据库系统的特点。 答: 数据库系统的主要特点有: ( l )数据结构化数据库系统实现整体数据的结构化,这是数据库的主要特征之一,也是数据库系统与文件系统的本质区别。解析注意这里的“整体’夕两个字。在数据库系统中,数

相关文档
最新文档