database.sarang.net
UserID
Passwd
Database
ㆍDBMS
MySQL
PostgreSQL
Firebird
Oracle
Informix
Sybase
MS-SQL
DB2
Cache
CUBRID
LDAP
ALTIBASE
Tibero
DB 문서들
스터디
Community
공지사항
자유게시판
구인|구직
DSN 갤러리
도움주신분들
Admin
운영게시판
최근게시물
DBMS Columns 583 게시물 읽기
 News | Q&A | Columns | Tutorials | Devel | Files | Links
No. 583
Datamodeling and Relational Database Design (8)
작성자
정재익(advance)
작성일
2002-09-29 14:13
조회수
5,531

Relational Model

 

Overview of the Relational Model

 

The relational model was formally introduced by Dr. E. F. Codd in 1970 and has evolved since then, through a series of writings. The model provides a simple, yet rigorously defined, concept of how users perceive data. The relational model represents data in the form of two-dimension tables. Each table represents some real-world person, place, thing, or event about which information is collected. A relational database is a collection of two-dimensional tables. The organization of data into relational tables is known as the logical view of the database. That is, the form in which a relational database presents data to the user and the programmer. The way the database software physically stores the data on a computer disk system is called the internal view. The internal view differs from product to product and does not concern us here.

 

A basic understanding of the relational model is necessary to effectively use relational database software such as Oracle, Microsoft SQL Server, or even personal database systems such as Access or Fox, which are based on the relational model.

 

This document is an informal introduction to relational concepts, especially as they relate to relational database design issues. It is not a complete description of relational theory.

 

This section discusses the basic concepts—data structures, relationships, and data integrity—that are the basis of the relational model.

 

Data Structure and Terminology

Notation

Properties of Relational Tables

Relationships and Keys

Data Integrity

Relational Data Manipulation

Normalization

Advanced Normalization

 

Data Structure

 

Data Structure and Terminology

 

In the relational model, a database is a collection of relational tables. A relational table is a flat file composed of a set of named columns and an arbitrary number of unnamed rows. The columns of the tables contain information about the table. The rows of the table represent occurrences of the "thing" represented by the table. A data value is stored in the intersection of a row and column. Each named column has a domain, which is the set of values that may appear in that column. Figure 1 shows the relational tables for a simple bibliographic database that stores information about book title, authors, and publishers.

 

Figure 1

 

 

There are alternate names used to describe relational tables. Some manuals use the terms tables, fields, and records to describe relational tables, columns, and rows, respectively. The formal literature tends to use the mathematical terms, relations, attributes, and tuples. Figure 2 summarizes these naming conventions.

 

Figure 2: Terminology

In This Document              Formal Terms         Many Database Manuals 
Relational Table                Relation                  Table        
Column                            Attribute                  Field 
Row                                Tuple                      Record 

 

Notation

 

Relational tables can be expressed concisely by eliminating the sample data and showing just the table name and the column names. For example,

AUTHOR            (au_id, au_lname, au_fname, address, city, state, zip) 
TITLE                (title_id, title, type, price, pub_id)  
PUBLISHER        (pub_id, pub_name, city)  
AUTHOR_TITLE  (au_id, pub_id)  

 

Relational Tale

 

Properties of Relational Tables

 

Relational tables have six properties:

1. Values are atomic.

2. Column values are of the same kind.

3. Each row is unique.

4. The sequence of columns is insignificant.

5. The sequence of rows is insignificant.

6. Each column must have a unique name.

 

Values Are Atomic

 

This property implies that columns in a relational table are not repeating group or arrays. Such tables are referred to as being in the "first normal form" (1NF). The atomic value property of relational tables is important because it is one of the cornerstones of the relational model.

 

The key benefit of the one value property is that it simplifies data manipulation logic.

 

Column Values Are of the Same Kind

 

In relational terms this means that all values in a column come from the same domain. A domain is a set of values which a column may have. For example, a Monthly_Salary column contains only specific monthly salaries. It never contains other information such as comments, status flags, or even weekly salary.

 

This property simplifies data access because developers and users can be certain of the type of data contained in a given column. It also simplifies data validation. Because all values are from the same domain, the domain can be defined and enforced with the Data Definition Language (DDL) of the database software.

 

Each Row is Unique

 

This property ensures that no two rows in a relational table are identical; there is at least one column, or set of columns, the values of which uniquely identify each row in the table. Such columns are called primary keys and are discussed in more detail in Relationships and Keys.

 

This property guarantees that every row in a relational table is meaningful and that a specific row can be identified by specifying the primary key value.

 

The Sequence of Columns is Insignificant

 

This property states that the ordering of the columns in the relational table has no meaning. Columns can be retrieved in any order and in various sequences. The benefit of this property is that it enables many users to share the same table without concern of how the table is organized. It also permits the physical structure of the database to change without affecting the relational tables.

 

The Sequence of Rows is Insignificant

 

This property is analogous the one above but applies to rows instead of columns. The main benefit is that the rows of a relational table can be retrieved in different order and sequences. Adding information to a relational table is simplified and does not affect existing queries.

 

Each Column Has a Unique Name

 

Because the sequence of columns is insignificant, columns must be referenced by name and not by position. In general, a column name need not be unique within an entire database but only within the table to which it belongs.

[Top]
No.
제목
작성자
작성일
조회
586Datamodeling and Relational Database Design (11)
정재익
2002-09-29
7370
585Datamodeling and Relational Database Design (10)
정재익
2002-09-29
7174
584Datamodeling and Relational Database Design (9)
정재익
2002-09-29
7728
583Datamodeling and Relational Database Design (8)
정재익
2002-09-29
5531
582Datamodeling and Relational Database Design (7)
정재익
2002-09-29
5399
581Datamodeling and Relational Database Design (6)
정재익
2002-09-29
4892
580Datamodeling and Relational Database Design (5)
정재익
2002-09-29
4135
Valid XHTML 1.0!
All about the DATABASE... Copyleft 1999-2021 DSN, All rights reserved.
작업시간: 0.010초, 이곳 서비스는
	PostgreSQL v13.3으로 자료를 관리합니다