← Back to Book Detail

Chapter 7 The Relational Data Model (4/4) -- Database Design - 2nd Edition

Browse
100%

Chapter 7 The Relational Data Model

Chapter 7 The Relational Data Model Adrienne Watt The relational data model was introduced by C. F. Codd in 1970. Currently, it is the most widely used data model. The relational model has provided the basis for: - Research on the theory of data/relationship/constraint - Numerous database design methodologies - The standard database access language called structured query language (SQL) - Almost all modern commercial database management systems The relational data model describes the world as “a collection of inter-related relations (or tables).” Fundamental Concepts in the Relational Data Model Relation A relation, also known as a table or file, is a subset of the Cartesian product of a list of domains characterized by a name. And within a table, each row represents a group of related data values. A row, or record, is also known as a tuple. The columns in a table is a field and is also referred to as an attribute. You can also think of it this way: an attribute is used to define the record and a record contains a set of attributes. The steps below outline the logic between a relation and its domains. - Given n domains are denoted by D1, D2, … Dn - And r is a relation defined on these domains - Then r ⊆ D1×D2×…×Dn Table A database is composed of multiple tables and each table holds the data. Figure 7.1 shows a database that contains three tables. Column A database stores pieces of information or facts in an organized way. Understanding how to use and get the most out of databases requires us to understand that method of organization. The principal storage units are called columns or fields or attributes. These house the basic components of data into which your content can be broken down. When deciding which fields to create, you need to think generically about your information, for example, drawing out the common components of the information that you will store in the database and avoiding the specifics that distinguish one item from another. Look at the example of an ID card in Figure 7.2 to see the relationship between fields and their data. Domain A domain is the original sets of atomic values used to model data. By atomic value, we mean that each value in the domain is indivisible as far as the relational model is concerned. For example: - The domain of Marital Status has a set of possibilities: Married, Single, Divorced. - The domain of Shift has the set of all possible days: {Mon, Tue, Wed…}. - The domain of Salary is the set of all floating-point numbers greater than 0 and less than 200,000. - The domain of First Name is the set of character strings that represents names of people. In summary, a domain is a set of acceptable values that a column is allowed to contain. This is based on various properties and the data type for the column. We will discuss data types in another chapter. Records Just as the content of any one document or item needs to be broken down into its constituent bits of data for storage in the fields, the link between
← Previous Chapter Next Chapter →