书城外语计算机英语
27082000000025

第25章 Database System(4)

Structured query language (SQL) is a query language for manipulating data in a relational database. It is nonprocedural or declarative, in that the user need only specify an English-like description that specifies the operation and the described record or combination of records. A query optimizer translates the description into a procedure to perform the database manipulation.

Relational database do not have to be application specific. They can solve most of the problems mentioned earlier when developing new applications by providing data independence, the ability of the database to exist independently of specific applications. For example, once an employee table is developed, many applications can use it.

Because of the flexibility and simplicity of the model, commercial relational database systems are standard software available on a wide range of computer systems from personal computers to mainframes.

Network Model

The network model creates relationships among data through a linked-list structure in which subordinate records can be linked to more than one parent record. This approach combines records with links, which are called pointers. The pointers are addresses that indicate the location of a record. With the network approach, a subordinate record can be linked to a key record and at the same time itself be a key record linked to other sets of subordinate records. The network mode historically has had a performance advantage over other database models. Today, such performance characteristics are only important in high-volume, high-speed transaction processing such as automatic teller machine networks or airline reservation system.

Both hierarchical and network databases are application specific. If a new application is developed, maintaining the consistency of databases in different applications can be very difficult. For example, suppose a new pension application is developed. The new application needs to access employee data, which is also accessed by the older payroll application. The data are the same, but a new database must be created.

Object Model

The newest approach to database management uses an object model, in which records are represented by entities called objects that can both store data and provide methods or procedures to perform specific tasks.

The query language used for the object model is the same object oriented programming language used to develop the database application. This can create problems because there is no ******, uniform query language such as SQL. The object model is relatively new, and only a few examples of object-oriented database exist. It has attracted attention because developers who choose an object oriented programming language want a database based on an object-oriented model.

【Vocabulary】

structural

adj. 结构的,建筑的

model

n. 模型,原型

hierarchical

adj. 分等级的

manipulative

adj. 操作的,控制的

organization

n. 组织,机构,团体

beneath

prep. 在……之下

procedural

adj. 程序上的

subassembly

n. 组件,部件

cockpit

n. 驾驶员座舱,战场

available

n. 可用到的,有用的

pension

n. 养老金,退休金

fuselage

n.(空)机身

navigate

vi. 航行,航海,航空

spreadsheet

n. 电子数据表

payroll

n. 薪水册

mainframe

n. 主机,大型机

uniform

adj. 统一的,一致的,均衡的

query

n. 质问,询问,怀疑

object

vi. 反对,拒绝,抗议

oriented

adj. 导向的

SQL

结构化查询语言

【参考译文】

数据库模型

一个数据库模型描述了构成和操作数据库中数据的方法。模型的结构部分详细规定了数据如何被描述(例如,树,表,等等)。模型的操作部分详细说明了数据的添加,显示,维护,打印,查找,选择,分类和升级等操作。

分层模型

第一个数据库的管理系统使用的是分层模型,换句话说,它们用树形结构排列数据记录。一些记录是根记录,其他的具有独特的父记录。树形结构原计划是反映数据被应用的顺序,处于树根位置的记录首先被访问,接下来才是下面的记录,等等。

开发分层模型的原因是分层关系在商业应用中的普遍存在,众所周知,一个组织结构图表常常描述一个分层关系,高管理层在最高层,中层管理者在较低的层次,操作员工在最底层。注意,在一个严格的层级中,每层的管理者都有一些雇员或者多个层次的雇员,但是每个雇员只有一个管理人员。分层数据的特点在于数据间的关系是一对多。

以一个简化的飞机部件数据库作为另一个例子。类似于大多数系统,一架飞机由一系列部件组成,而这些部件又由子部件组成,等等。使用分层方法,字段和记录之间的关系确定如下:第一层或最高层包括重要的部件,例如,机翼,机身和座舱等。第二层包括各个主要部件的组成部分,更低级的层次将包括某一特定零件的数量和零件信息。

使用这种方法将非常便于回答用户关于零件和其可用性的查询。但是,这种方法不利于查询某种零件适用于何种飞机。在得到特定零件和飞机包含的信息之前,必须要检索每个主要部件,然后必须通过分层结构的多个层次才能得到零件的信息。

在分层方法中,每一个关系在数据库建立时必须被明确定义。数据库分层结构中每一个数据只能包含一个关键字域,任意两个字域之间只能有一种关系。这样就可能出现一些问题,原因是数据并不能总是遵守这种严格的分层关系。

关系模型

在1970年,数据库研究取得了巨大的突破,E. F. Codd提出使用表作为数据结构,这是一种截然不同的数据库管理方法,称之为关系模型。一个表,像电子表格一样,由行和列组成。每一行代表一个记录,每列代表一个字段。

结构化查询语言(SQL)是一种在关系型数据库中处理数据的查询语言。它是一种非过程化的语言,也就是描述性的,用户只需要指定一种类似于英语的描述,用来确定操作、记录或描述记录组合。查询优化器把这种描述翻译为一个执行数据库操作的过程。

关系型数据库并非专门为某一个特定应用程序而设计的,通过数据独立性,即数据库脱离特定程序独立存在的能力,它可以解决前面所提到的程序开发过程中的大部分问题。例如,一旦建立了一个雇员表,其他的应用程序都可以应用它了。

鉴于模型的简洁性和灵活性,商用关系型数据库成为标准软件,能够运行于从个人计算机到大型计算主机的各种计算机系统。

网络模型

网络模型在数据之间通过链接表结构创建关系,子记录可以链接到多个父记录上。把记录和链接捆绑到一起的方法叫做指针,它是指向一个记录存储位置的存储地址。使用网络方法,一个子记录可以链接到一个关键记录,同时它本身也可以作为一个关键记录。链接到其他一系列子记录。在早期,网络模型比其他模型更有性能的优势,但是在当今,这种性能优势的特点只有在自动柜员机网络、航空预定系统等大容量和高速处理过程中才是最重要的。

分层和网络数据库都是专用应用程序,如果开发一个新的应用程序,那么在不同的应用程序中保持数据库的一致性是非常困难的。比如开发一个退休金程序,需要访问雇员数据,这一个数据同时也被工资单程序访问。虽然数据是相同的,但是也必须建立新的数据库。

对象模型

最新的数据库管理方法是使用对象模型,记录被称作对象实体来描述,可以在对象中存储数据,同时提供方法或程序执行特定的任务。

对象模型使用的查询语言与开发数据库程序所使用的面向对象的程序设计语言是相同的,因为没有像SQL这样简单统一的查询语言,所以将会产生一些问题。对象模型相对较新,仅有少数几个面向对象的数据库实例。它引起了人们的关注,因为选择面向对象程序设计语言的开发人员希望有一个在对象模型基础上的数据库。

【Reading Material】

Object-Oriented Data Structure