CH 03
CH 03
4-1
Copyright © 2012 Pearson Education
Learning Objectives
Describe the difference between database systems and file-based legacy systems.
Explain fundamental concepts of database systems such as DBMS, schemas, the data dictionary, and
DBMS languages.
Field
Attributes about
an entity
Record
Related group of
fields
File
Related group of
records
Database
Related group of
files
Master files are permanent; they exist across all periods. Individual records
within a master file, however, are frequently changed.
updating the data to reflect the effect of specific transactions.
new records may also be added to the master file and
sometimes, individual records may even be deleted.
4-7
DATABASES
Database systems were developed to address the problems associated with
the proliferation of master files.
For years, each time a new information need arose, companies created new files
and programs.
The result: a significant increase in the number of master files.
Database system
Data Sharing
With data in one place it is more easily accessed by authorized users.
Data Independence
Data is separate from the programs that access it. Changes can be made to the data
without necessitating a change in the programs and vice versa.
Cross-Functional Analysis
Relationships between data from various organizational departments can be more easily
combined.
Data Dictionary
Information about the structure of the database
Field names, descriptions, uses
Physical View
Depends on explicitly knowing:
How is the data actually arranged in a file
Where is the data stored on the computer
Logical View
A Schema separates storage of data from use of the data
Unnecessary to explicitly know how and where data is stored.
Separating the logical and the physical views of data also means that users
can change their conceptualization about relationships among data items
(their logical view of the task) without making changes in the way those data
are physically stored. Likewise, the database administrator can change the
physical storage of the data to improve performance, without affecting users
or application programs.
Table
Each row, a tuple, contains data about one instance of an entity.
This is equivalent to a record
Each column contains data about one attribute of an entity.
This is equivalent to a field
Primary Key
An attribute or combination of attributes that can be used to uniquely
identify a specific row (record) in a table. Example item id in inventory
table, customer id in customer table.etc
This rule is referred to as the entity integrity rule
Foreign Key
An attribute in one table that is a primary key in another table.
Used to link the two tables. Example item id in sales table become
primary key in inventory table.
This rule is referred to as the referential integrity rule.
Other non-key attributes. In each table store important information about that
entity. For example, in the inventory table, quantity on hand, description and list price
are non-key attributes.
4-20
Database Design Errors
1. Every column must be single valued. there shall be one and only
one value in each cell.
2. Primary keys must contain data (not null). the primary key is the
attribute or a combination of attributes that uniquely identifies a
specific row in a table. For this to be true, the primary key for any
row can't be null or blank
3. Foreign keys must contain the same data as the primary key in
another table. foreign keys are used to link rows in one table to
rows in another table. This is only possible if the values correspond
to their values in the row of the original table.
They must help ensure that adequate controls are included to safeguard
the data and assure its reliability
1. Planning Stage- involves the initial planning to determine the need for and
feasibility of developing the new system. This includes preliminary judgments
about the proposals technological and economic feasibility.
3. Design Stage- involves developing the different schemas for the new system,
at the conceptual, external, and internal levels. The requirements analysis and
design stages are the stages of data modeling.
4-29
Fig of Data modeling in the database design process .