1、重庆理工 大学 2013 届本科生毕业设计 (论文 )外文文献翻译 1 原文: Structure of the Relational database Database System Concepts Part1: Relational Databases The relational model is the basis for any relational database management system (RDBMS).A relational model has three core components: a collection of objects or relations
2、, operators that act on the objects or relations, and data integrity methods. In other words, it has a place to store the data, a way to create and retrieve the data, and a way to make sure that the data is logically consistent. A relational database uses relations, or two -dimensional tables, to st
3、ore the information needed to support a business. Lets go over the basic components of a traditional relational database system and look at how a relational database is designed. Once you have a solid understanding of what rows, columns, tables, and relationships are, youll be well on your way to le
4、veraging the power of a relational database. Tables, Row, and Columns A table in a 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: Dont confuse a relation with relationsh
5、ips. A relation is essentially a table, and a relationship is a way to correlate, join, or associate two tables. A row in a table is a collection or instance of one thing, such as one employee or one line item on an invoice. A column contains all the information of a single type, and the piece of da
6、ta at the intersection of a row and a column, a field, is the smallest piece of information that can be retrieved with the databases query language. For example, a table with information about employees might have a column called 重庆理工 大学 2013 届本科生毕业设计 (论文 )外文文献翻译 2 LAST_NAME that contains all of the
7、 employees last names. Data is retrieved from a table by filtering on both the row and the column. 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 comp
8、any and wants to implement a few of the basic business functions using the relational database to manage his Human Resources (HR) department. Relation: A two-dimensional structure used to hold related information, also known as a table. Note: Most of Scotts employees were hired away from one of his
9、previous employers, some of whom have over 20 years of experience in the field. As a hiring incentive, Scott has agreed to keep the new employees original hire date in the new database. Row:A group of one or more data elements in a database table that describes a person, place, or thing. Column:The
10、component of a database table that contains all of the data of the same name and type across all rows. Youll learn about database design in the following sections, but lets assume for the moment that the majority of the database design is completed and some tables need to be implemented. Scott creat
11、es the EMP table to hold the basic employee information, and it looks something like this: 重庆理工 大学 2013 届本科生毕业设计 (论文 )外文文献翻译 3 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
12、a column may or may not be empty. In this case, it makes sense for an employee who is not in the Sales department to have a blank Commission field. It also makes sense for the president of the company to have a blank Manager field, since that employee doesnt report to anyone. Field:The smallest piec
13、e of information that can be retrieved by the database query language. A field is found at the intersection of a row and a column in a database table. On the other hand, none of the fields in the Employee Number (EMPNO) column are blank. The company always wants to assign an employee number to an em
14、ployee, 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. Th e EMPNO column, in this case, is the primary key of the table. Primary Key:A column (or columns) in a tab
15、le that makes the row in the table distinguishable from every other row in the same table. Notice the different datatypes that are stored in the EMP ta ble: numeric values, character or alphabetic values, and date values. As you might suspect, the DEPTNO column contains the department number for the employee. But how do you know what department name is associated with what number? Scott created the DEPT table to hold the descriptions for the department codes in the EMP table.