首页计算机计算机基础计算机专业英语 04-2 4.2 Structure of the Relational DatabaseI.pptx

04-2 4.2 Structure of the Relational DatabaseI.pptx

页数:25页文件大小:196.5 KB来源: 计算机专业英语ppt课件

本课件对应4.2 Structure of the Relational Database I(关系数据库结构(一))一节,讲解二维表、元组与属性的组织形式,说明主键、外键与参照完整性对数据一致性的约束。课文配中英文对照译文、生词短语表与课后练习,可用于课堂讲授与课前预习。

4.2 Structure of the Relational Database I 生词表页,收录 alphabetic、assign、dimensional 等10个专业词汇的词性与中文释义
4.2 Structure of the Relational Database I 短语表页,列出 line item、foreign key、primary key 等3个常用短语及中文释义
4.2 Structure of the Relational Database I 课文页,关系模型是任何关系数据库管理系统(RDBMS)的基础,含中英文对照译文
查看本课件的文字版(共 25 页,供检索与复制)

第1页:4.2 生词表

4.2 Structure of the Relational Database I 生词表
单词词性中文释义
alphabeticadj.字母的
assignv.分配,指派
dimensionaladj.空间的,[数]……维的
hypotheticaladj.假设的
incentiven.动机
intersectionn.[数]交集,十字路口,交叉点
queryn.查询
relationaladj.相关的
suspectv.猜想,怀疑
widgetn.装饰品,小器具

第2页:4.2 常用短语

4.2 Structure of the Relational Database I 常用短语
短语中文释义
line item排列项,项目
foreign key外键
primary key主键

第3页:关系模型

语言点分析:复合句。其中冒号后面部分为three components的同位语,collection数学中意为“集合”。4.2 Structure of the Relational Database I

The relational model is the basis for any relational database management system (RDBMS).[1]A relational model has three core components: a collection of objects or relations, operators that act on the objects or relations, and data integrity methods. Inotherwords, it has a place to store the data, away to create and retrieve the data, and away to make sure that the data is logically consistent.

关系模型是任何关系数据库管理系统(RDBMS)的基础。一个关系模型有三个核心组件:对象或关系的集合、作用于对象或关系上的操作符、以及数据完整性规则。换句话说,关系数据库有一个存储数据的地方、一种创建和检索数据的方法、以及一种确认数据的逻辑一致性的方法。

第4页:一个关系数据库使用关系或二维表来存储支持

一个关系数据库使用关系或二维表来存储支持某个事物所需的信息。让我们了解一下传统的关系数据库系统的基本组件并且学习如何设计关系数据库。一旦你对于行、列、表和关联是什么有了深刻理解,你就能够充分利用关系数据库的强大功能。

A relational database uses relations, ortwo-dimensional tables, to store the information needed to support a business. Let'sgoover the basic components of a traditional relational database system and look at how a relational database is designed. Onceyouhavea solid understanding of what rows, columns, tables, and relationships are, you'll be well on your way to leveraging the power of a relational database.

第5页:在关系数据库中

表,行和列

在关系数据库中,一个表(或者说一个关系)是一个用于保存相关信息的二维结构。一个数据库由一个或者多个相关联的表组成。

注意:不要混淆了关系和关联。一个关系实际上是一个表,而一个关联指的是一种连接、结合或联合两个表的方式。

Tables, Rows, and Columns

Atableina relational database, alternatively known as a relation, is a two-dimensional structure used to hold related information. A database consists of one or more related tables.

Note:Don't confuse a relation with relationships. Arelationis essentially a table, and a relationship is away to correlate, join, or associate two tables.

第6页:表中的一行是一种事物的集合或实例

Arowinatable is a collection or instance of one thing, such as one employee or one line item on an in voice.[2]Acolumn contains all the information of a single type, and the piece of data at the intersection ofarow and a column, afield, is the smallest piece of information that can be retrieved with the database 'squery language. Forexample, a table with information about employees might have a column called LAST_NAME that contains all of the employees ' last names. Data is retrieved from a table by filtering on both the row and the column.分析:并列句。在第二个分句中,“afield”是the piece of data at the intersection ofarow and a column的同位语。“field”在数据库中指的是“字段”,而“database’squery language”指的是数据库查询语言。

表中的一行是一种事物的集合或实例,比如一个员工或发票上的一项。表中的一列包含了一类信息;行列交叉点上的数据——字段,是能够用数据库查询语言检索到的最小信息片段。例如,一个员工信息表可能有一个“姓”列,列中就包含所有员工的姓。数据是通过对行、列进行过滤而从表中检索出来的。

第7页:主键、数据类型和外键

主键、数据类型和外键

本篇文章均以假设的斯科特·史密斯的工厂为例,此人是数据库的建立者和企业的主办人。史密斯刚开办了一个饰品公司,想要使用关系数据库的几项基本功能来管理人力资源部门。

Primary Keys, Datatypes, and Foreign Keys

The examples throughout this article will focus on the hypothetical work of Scott Smith, database developer and entrepreneur. He just started a new widget company and wants to implement a few of the basic business functions using the relational database to manage his Human Resources (HR)department.

第8页:关系:用来保存相关信息的一个二维结构

注意:大多数斯科特的雇员都是雇自斯科特之前的一个老板,他们中有些人在这个领域已经有20年的经验了。作为雇佣的鼓励,斯科特同意在新数据库中维持新进员工的最初雇佣日期。

关系:用来保存相关信息的一个二维结构(也就是表)。

Note:Most of Scott's employees were hired away from one of his previous employers, some of whom have over 20 years of experience in the field. Asahiring incentive, Scotthas agreed to keep the new employees ' original hire date in the new database.

Relation:Atwo-dimensional structure used to hold related information, also known as a table.

第9页:行:数据库表中的一组单数据或多数据元素

Row:Agroupofone or more data elements in a database table that describes a person, place, or thing.

Column:The component of a database table that contains all of the data of the same name and type across all rows.

行:数据库表中的一组单数据或多数据元素,用于描述人、地方或事物。

列:列是数据库表的组件,它包含所有行中同名和同类型的所有数据。

第10页:你会在下面章节学到如何设计数据库

You'll learn about database design in the following sections, but let's assume for the moment that the majority of the database design is completed and some tables need to be implemented. Scottcreates the EMPtabletoh old the basic employee information, and it looks something like this:

你会在下面章节学到如何设计数据库。现在让我们假设数据库大部分已经设计完成,有一些表需要填写。斯科特创建了EMP表来保存基本的员工信息,就像这样:

第11页:

第12页:部门成员佣金工资工作日期管理人工种名字员

部门成员佣金工资工作日期管理人工种名字员工编号2080017-12-807902会计史密斯736930300160020-2-817566推销员艾伦749930500125022-2-817566推销员沃德752120297502-4-817839管理人员琼斯756610500017-11-81厂长金783920300003-12-817566分析师福特7902

第13页:4.2 关系数据库结构(一) 课文要点

注意佣金列和管理人列中有一些单元格中没有值;它们是空值。一个关系数据库能够规定列中的一个单元格是否为空。

Notice that some fields in the Commission (COMM)and Manager (MGR)columns do not contain a value; they are blank. A relational database can enforce the rule that fields in a column mayor may not be empty.

第14页:非销售部门的员工拥有空白的销售提成字段是

语言点分析:简单句。其中,“makesense”意思是:讲得通,有意义。

[3]Inthiscase, it makes sense for an employee who is not in the Sales department to have a blank Commission field. Italsomakes sense for the president of the company to have a blank Manager field, since that employee doesn't report to anyone.

在这种情况下,非销售部门的员工拥有空白的销售提成字段是有意义的。公司董事长的管理人单元为空也是有意义的,因为董事长不需要向任何人汇报工作。

第15页:字段

字段:是数据库查询语言所能够检索到的最小信息片段。字段位于数据库表的行和列交叉处。

Field:The smallest piece of information that can be retrieved by the database query language. Afieldis found at the intersection ofarow and a column in a database table.

第16页:没有哪个员工的员工编号单元为空

另一方面,没有哪个员工的员工编号单元为空。公司总是希望为每个员工分配一个员工号,并且这个号码必须是每个员工都不同的。关系数据库的一个特性是能够确定该列必须有输入值且值唯一。这样,员工编号列便是这个表的主键。

Ontheotherh and, none of the fields in the Employee Number (EMPNO)column are blank. The company always wants to assign an employee number to an employee, and that number must be different for each employee. One of the features of a relational database is that it can ensure that a value is entered into this column and that it is unique. The EMPNOcolumn, in this case, is the primary key of the table.

第17页:主键:主键即

主键:主键即是表中的一列(或多列),使每一行能够区别于同一个表中的其他行。

留意一下EMP表中存储的不同数据类型:数值型,字符型或字母型,以及日期型。

Primary Key:Acolumn (or columns)in a table that makes the row in the table distinguishable from every other row in the same table.

Notice the different datatypes that a restored in the EMPtable: numeric values, character or alphabetic values, and date values.

第18页:如你所想

如你所想,部门成员列保存的是员工所在部门的编号。但是如何知道哪个部门名称对应哪个部门编号呢?斯科特建立了DEPT表来具体描述EMP表中的部门编号。

Asyoumight suspect, the DEPTNOcolumn contains the department number for the employee. Buthowdoyou know what department name is associated with what number? Scottcreated the DEPTtabletoh old the descriptions for the department codes in the EMPtable.

第19页:4.2 关系数据库结构(一) 课文要点

LOCDNAME DEPTNONEW YORK ACCOUNTING 10 DALLAS RESEARCH 20 CHICAGO SALES 30 BOSTON OPERATIONS 40位置部门名称部门编号纽约会计部10达拉斯调查部20芝加哥销售部30波士顿业务部40

第20页:EMP表中的部门编号列同DEPT表中的部

EMP表中的部门编号列同DEPT表中的部门编号列有着相同的值。既然如此,EMP表中的部门编号列便被看作是与DEPT表中相同列对应的外键。

The DEPTNOcolumn in the EMPtable contains the same values as the DEPTNOcolumn in the DEPTtable. Inthiscase, the DEPTNOcolumn in the EMPtableis considered a foreign key to the same column in the DEPTtable.

第21页:外键加强了关系数据库中参考完整性的概念

Aforeignkey enforces the concept of referential integrity in a relational database. The concept of referential integrity not only prevents an invalid department number from being inserted into the EMPtable, but it also prevent sarow in the DEPTtable from being deleted if there are employees still assigned to that department.

外键加强了关系数据库中参考完整性的概念。参考完整性的概念不但可以阻止无效的部门编号被插入EMP表中,而且在某部门仍有员工的情况下,可以防止DEPT表中该部门的信息被删除。

第22页:外键:表中的一列(或多列)

外键:表中的一列(或多列),它的值来自于其他表的主键列或唯一值列。一个外键有助于保障表中数据的完整性。

参考完整性:是关系数据库用来加强表间一对多关联的一种方式。

Foreign Key:Acolumn (or columns)in a table that draws its values from a primary or unique key column in another table. Aforeignkey assists in ensuring the data integrity of a table.

Referential Integrity:A method employed by a relational database system that enforces one-to-many relationships between tables.

第23页:习题4.2 一 判断正误

习题4.2 一 判断正误:根据课文内容判断下列说法正误。

Put“true”or“false”in the brackets for the following statements according to the passage.

  1. ()A relational database uses two-dimensional tables to store the information needed to support a business.
  2. ()Arelationis the same as a relationship.
  3. ()A database consists of one or more related tables.
  4. ()Acolumnina table is a collection of one thing.
  5. ()Arowinatable contains all the information of a single type.
  6. ()Aprimarykey is a column (or columns)in a table that makes the row in this table distinguishable from every other row in every other table in the same database.
  7. ()Arelationis essentially a database, and a relationship is a table in the database.
  8. ()Afieldisthe smallest piece of information that can be retrieved by the database query language.

第24页:习题4.2 二 练习

习题4.2 二 练习:根据课文内容完成下列练习。

Fillinthe blanks according to the passage.

  1. The_______________________is the basis for any relational database management system (RDBMS).
  2. A relational model has three core components:_______,________and_________________.
  3. A_____________is away to correlate, join, or associate two tables.
  4. A relational database can enforce the rule that___________________mayor may not be empty.
  5. AFieldisthe smallest piece of information that can be retrieved by the______________.
  6. Afieldis found at the____________ofarow and a column in a database table.
  7. A relational database uses relations, or_____, to store the information needed to support a business.
  8. A____in a table is a collection or instance of one thing, such as one employee or one line item on an in voice.

第25页:习题4.2 三 翻译

习题4.2 三 翻译:将下列单词和短语译成中文。

Translate the following words and expressions into Chinese.

  1. core components
  2. two-dimensional table
  3. related table
  4. Foreign Key
  5. Primary Key
  6. numeric value
  7. Referential Integrity
  8. row
  9. column
  10. field

《计算机专业英语》课件目录

顶部目录