Information Technology Reference
In-Depth Information
the one-to-many symbol (the “crow's-foot”) shown in Figure 5.4. The ER diagram also
shows that each customer can place one-to-many orders, each order includes one-to-many
line items, and many line items can specify the same product (a many-to-one relationship).
This database can also have one-to-one relationships. For example, one order generates
one invoice.
Figure 5.4
Salesperson
An Entity-Relationship (ER)
Diagram for a Customer Order
Database
Development of ER diagrams helps
ensure that the logical structure of
application programs is consistent
with the data relationships in the
database.
Serves
Customer
Places
Includes
Specifies
Line
items
Product
Orders
Generates
Invoice
The Relational Database Model
Although there are a number of different database models, including flat files, hierarchical,
and network models, the relational model has become the most popular, and use of this
model will continue to increase. The relational model describes data using a standard tabular
format. In a database structured according to the relational model, all data elements are
placed in two-dimensional tables, called relations , which are the logical equivalent of files.
The tables in relational databases organize data in rows and columns, simplifying data access
and manipulation. It is normally easier for managers to understand the relational model
(see Figure 5.5) than other database models.
Databases based on the relational model include IBM DB2, Oracle, Sybase, Microsoft
SQL Server, Microsoft Access, and MySQL. Oracle is currently the market leader in general-
purpose databases, with over 40 percent of the $16.5 billion database market. IBM comes
in second with about 21 percent, and Microsoft third with about 19 percent. 10
In the relational model, each row (or record) of a table represents a data entity, with the
columns (or fields) of the table representing attributes. Each attribute can accept only certain
values. The allowable values for these attributes are called the domain . The domain for a
particular attribute indicates what values can be placed in each column of the relational table.
For instance, the domain for an attribute such as gender would be limited to male or female.
A domain for pay rate would not include negative numbers. In this way, defining a domain
can increase data accuracy.
relational model
A database model that describes
data in which all data elements are
placed in two-dimensional tables,
called relations, which are the logi-
cal equivalent of files.
domain
The allowable values for data
attributes.
Manipulating Data
After entering data into a relational database, users can make inquiries and analyze the data.
Basic data manipulations include selecting, projecting, and joining. Selecting involves elim-
inating rows according to certain criteria. Suppose a project table contains the project
number, description, and department number for all projects a company is performing. The
president of the company might want to find the department number for Project 226, a sales
manual project. Using selection, the president can eliminate all rows but the one for Project
226 and see that the department number for the department completing the sales manual
project is 598.
selecting
Manipulating data to eliminate rows
according to certain criteria.
 
 
Search WWH ::




Custom Search