公交管理系统的设计与实现外文翻译资料

 2022-08-07 15:04:01

Chapter 3 The Relational Model

Databases are central to information systems—they are the heart of applications. The structure of a database, called a data model (or schema, also database design), specifi es a database. One of the most important models used for modern databases is the relational model. Although it is not the only data model, it is probably the most important one. The relational model is used mainly for transactional databases—where an enterprisersquo;s data is fi rst stored—as opposed to warehouse databases, which serve as a repository for historical data. Compared to other contemporary data models, the relational model is particularly useful for transactional databases because data integrity can be declared and enforced by the model. Data integrity is the conformance of data to business rules. If your data is wrong the fi rst time it enters your enterprise, it has a negative impact on your complete business. For example, analytical systems would not help you improve your operations because of the common concept garbage in – garbage out. Another advantage to the relational model is that it is mathematically defi ned. Therefore, when modeling, you are not guided by best practices only; you can evaluate your design and fi rmly ascertain whether it is good or bad. Relational database management systems (RDBMS), including Microsoft SQL Server, store data in relational format. Although the physical implementation varies by vendor, the relational model provides a consistent user perception of the data for all RDBMS. In this chapter, Irsquo;ll introduce the main concepts of the relational model. This knowledge will help you understand later chapters when you explore advanced queries.

Introduction to the Relational Model

The relational model was conceived in the 1960s by Edgar F. Codd, who worked for IBM. It is a simple yet rigorously defi ned conceptualization of how users perceive and work with data. It addresses the three major aspects of data processing in the following way, according to An Introduction to Database Systems, 8th edition by C. J. Date (Addison-Wesley, 2003):

Structural The data is perceived by the user as tables and nothing but tables.

Manipulative Users manipulate the data with an open-ended set of relational operators. The operators constitute the relational algebra.

Integrity The tables must satisfy defi ned integrity constraints.

The structural aspect can also be expressed by the Information Principle, which states that all information in a relational database is expressed in one (and only one) way as explicit values in columns within rows of a table

In the relational model, a table is called a relation, and a row is called a tuple. In the next section, Irsquo;ll introduce relations and tuples in more detail.

Relations, Tuples and Types

A relation is the mathematical object that represents what database practitioners call a table. The elements of a particular relation, like the rows of a table, represent instances of some real-world entity, like person, place, thing, or event. The relation is the set of these elements, which are—mathematically—tuples. Irsquo;ll start by defi ning a tuple: A tuple is the set of its attributes, each of which is represented by three things: the attributersquo;s name, the attributersquo;s type, and the attributersquo;s value.

The set of attribute names and types of a tuple, taken together, are called the heading of a tuple. You can think of the heading of a tuple as a form to be fi lled out; the form has attribute names with blank spaces for values to be fi lled in. A tuple is a fi lled-in copy of a heading form. Tuple properties include the following:

■ Every attribute of a tuple contains exactly one value of the appropriate type for each of its attribute names. Again thinking of a tuple as a fi lled-in copy of a heading form, there is exactly one value in each blank space (and it is of the appropriate type for the particular attribute).

■ The attributes have no ordering (just as the elements of a set have no ordering). Consequently, every attribute must have a distinct name because you cannot refer to an attribute using its position in a tuple. In terms of forms, the way in which the attribute names are arranged on the heading form is irrelevant; only the names of the attributes matter, and, consequently, those names must be distinct.

■ A subset of a tuple is a tuple (with fewer attributes). Again using the form analogy, one section of a form, viewed by itself, is still a form, but it may have fewer items.

Although it is possible to defi ne operators from relational algebra on tuples, you do not manipulate individual tuples in a relational database. Operations are performed only on sets of tuples, that is, on relations. Tuples not only make up relations but also help defi ne them. A relation consists of a set of tuples with the same heading, and we can call the heading of these tuples the relationrsquo;s heading and vice versa. Similarly, we can think of relations as having attributes. Relations with different headings are different types of relations. The data types of attributes, as opposed to the heading types of relations, are sometimes called domains in the relational model to avoid overusing the word type.

Just as the contents of a database table might change, a relation should be able to contain different sets of tuples at different times. The relations of the relational model are actually variables—sometimes called relational variables, or relvars, and the value of a relational variable of some type is a set of tuples of that type. We wonrsquo;t always distinguish relations from relational variables of the same type, following common practice in other areas of mathematics. We often write “n is an integer” when we should more correctly write “n is an integer variable,” for example. The fac

剩余内容已隐藏,支付完成后下载完整资料


英语译文共 15 页,剩余内容已隐藏,支付完成后下载完整资料


资料编号:[259562],资料为PDF文档或Word文档,PDF文档可免费转换为Word

原文和译文剩余内容已隐藏,您需要先支付 30元 才能查看原文和译文全部内容!立即支付

以上是毕业论文外文翻译,课题毕业论文、任务书、文献综述、开题报告、程序设计、图纸设计等资料可联系客服协助查找。