Professional Documents
Culture Documents
5-2
File Approach
• For many years, companies created new files and
programs each time an information need arose.
• This proliferation of master files created problems:
1 Often the same data was stored in two or more
separate files.
2 The specific data values stored in the different files
were not always consistent.
5-3
File-Oriented Approach
File 1
Fact A Sales
Fact B Program
Fact C
File 2
Fact B Shipping
Fact D Program
Fact E
File 3
Fact A Billing
Fact G Program
Fact E 5-4
Databases
• The database approach views data as an
organizational resource that should be used by, and
managed for, the entire organization, not just the
originating department or function.
• Its focus is data integration and data sharing.
• Integration is achieved by combining master files into
larger pools of data that can be accessed by many
application programs.
5-5
Databases
• Database management system (DBMS) is
the program that manages and controls
access to the database.
• Database system is the combination of the
database, the DBMS, and the application
program that uses the database.
• Database administrator (DBA) is the
person responsible for the database.
5-6
DATABASES
Database • The combination of
Fact A Fact B
Fact C Fact D the database, the
Fact E Fact F
DBMS, and the
application programs
Database
Management
that access the
System database is referred
to as the database
Enrollment
Program
Financial Aid
Program
Grades
Program
system.
5-7
Database Approach
Database Sales Program
Fact A
Database
Fact B Shipping
management
Program
Fact C system
Fact D
Fact E Billing
Program
5-8
Relational Databases
• Databases differ in the type of data model
they are designed with
• A data model is an abstract representation
of the contents of a database.
• The relational data model represents
everything in the database as being stored in
the form of tables.
• Technically, these tables are called relations.
5-9
Relational Databases
• Each row in a relation, called a tuple, contains
data about a specific occurrence of the type of
entity represented by that table.
5-10
IMPORTANCE AND ADVANTAGES OF DATABASE
SYSTEMS
• Database technology provides the following
benefits to organizations:
– Data integration
– Data sharing
– Reporting flexibility
– Minimal data redundancy and inconsistencies
– Data independence
– Central management of data
– Cross-functional analysis
5-11
Logical and Physical
Views of Data
• A major advantage of database systems over
file-oriented systems is that the database
systems separate the logical and physical view
of data.
• What is the logical view?
– It is how the user or programmer conceptually
organizes and understands the data.
5-12
Logical and Physical
Views of Data
• What is the physical view?
– It refers to how and where the data are physically
arranged and stored on disk, tape, CD-ROM, or other
media.
• The DBMS controls the database so that users
can access, query, or update it without reference
to how or where the data are physically stored.
• Program-data independence is the separation of
the logical and physical views of data.
5-13
Logical and Physical
Views of Data
Database
Operating
DBMS system
5-14
Schemas
• A schema describes the logical structure of a
database.
• There are three levels of schemas:
1 Conceptual-level schema
2 External-level schema
3 Internal-level schema
5-15
Schemas
The conceptual-level schema is an
organization-wide view of the entire
database.
The external-level schema consists of
a set of individual user views of
portions of the database, also referred
to as a subschema.
The internal-level schema provides a
low-level view of the database.
5-16
Schemas
Cash receipt
5-17
Schemas
Cash receipt
Mapping conceptual level facts to internal level descriptions
Inventory Record
Item number – integer (5), non-null, index =
itemx Description – character (15)
5-18
Basic Requirements of the Relational
Data Model
1. Each column in a row must be single valued.
2. Primary keys cannot be null.
3. Foreign keys, if not null, must have values that
correspond to the value of a primary key in an
other relation.
4. All non-key attributes in a table should describe a
characteristic about the object identified by the
primary key.
5-19
Approaches to Database Design
• Normalization
– Starts with the assumption that all data is initially stored in
a large non-normalized table.
– This table is then decomposed using a set of normalization
rules to create a set of tables in the Third Normal Form.
• Semantic Data Modeling
– The database designer uses his/her knowledge about the
business structure to create a set of relational tables.
5-20
Database Systems and the
Future of Accounting
• Database systems may profoundly affect the
fundamental nature of accounting:
– May lead to abandonment of double-entry
accounting, because the redundancy of the double
entry is not necessary in computer data processing.
– May also alter the nature of external reporting.
• EXAMPLE: External users could have access to the
company’s database and manipulate the data to
meet their own reporting needs.
5-21
DATABASE SYSTEMS AND THE FUTURE OF
ACCOUNTING
• The use of accounting information in decision making
will be enhanced by:
– Powerful querying capabilities that accompany
database packages.
– The ability to accommodate multiple views of the
same underlying phenomenon.
– The ability to integrate financial and operational
data.
5-22
DATABASE SYSTEMS AND THE FUTURE OF
ACCOUNTING…
• Accountants must become knowledgeable about
databases so they can participate in developing the
AIS of the future.
• They must help ensure that adequate controls are
included to safeguard the data and assure its
reliability.
5-23
Designing and Implementing a
Database System
• Six basic steps in designing and
implementing a database system:
1. Initial planning to determine the need
for and feasibility of developing a new
system (planning stage).
2. Identifying user needs (requirements
analysis stage).
3. Developing the contextual-, external-
and internal- level schemas (design
stage).
5-24
4. Translating the internal-level schema into the
actual database structures that will be
implemented in the new system (Coding, new
application development stage).
5-25
Data Modeling
• Accountants may provide the greatest value to their
organizations by taking responsibility for data
modeling.
Operation and
Planning
Maintenance
Data Requirements
Implementation
Modeling Analysis
Occurs
Here
Design Coding
5-27
Data Modeling Tools
5-28
A. ENTITY-RELATIONSHIP DIAGRAM
(E-R Diagram)
• An Entity-Relationship (E-R) diagram is a ‘Graphical
Technique’ for portraying a database schema.
Part of
Manages
Departments
5-30
• An E-R diagram not only depicts the contents of a
database, but also graphically models an organization.
5-33
THE REA DATA MODEL
• Can you identify the resources, events & agents in this
diagram?
Customer
Cash Receive
Employee
Accounts Cash
5-34
A. Resources:
Resources are those things that have economic value
to the organization.
5-35
B. Events:
Events are the various business activities about which
management wants to collect information for planning or control
purposes.
Most of the events in an REA data model fall into one of two
categories:
Economic exchanges (the sales event decreases the quantity
of inventory and the Cash receipt event increases the
amount of cash)
Commitments (Customer orders are commitments that lead
to future sales)
5-37
Developing an REA Diagram
• Developing an REA diagram for a specific transaction
cycle consists of four steps:
Resource A GET
Inflow Participant Internal Agent
Resource A
Economic
Duality
GIVE
Resource B Outflow Participant Internal Agent
Resource B
5-39
SAMPLE REA DIAGRAM
Participant
Economic
Customer
Duality
Participant
Cash
Cash Stock-flow Participant Cashier
Receipts
5-40
Step-1: Identify Economic Exchange Events
5-41
Step-2: Identify Resources and Agents
5-42
Step-3: Include Commitment Events
5-43
Decomposing Sales into Orders and
Sales
Customer
Inventory- (1,N) (1,1) Participant (0,N) Customer
Orders
Orders
(0,N) (1,1)
(0,1) Participant
(0,N)
Inventory- Leads to
Inventory (0,N) Salesperson
Sales (0,N)
(0,1)
(1,N)
Participant
(1,1)
Sales
5-44
Step-4: Determine Cardinalities
5-45
• Cardinalities indicate how many instances of one
entity can be linked to one specific instance of another
entity.
(0, M)
Sales Made to Customer
5-48
• The maximum cardinality of M in the (0, M)
cardinality pair to the left of the customer entity in
the customer-sales relationship indicates that a given
customer may be linked to many sales events.
(0, M)
Sales Made to Customer
5-49
• The minimum cardinality of 1 in the (1, 1) cardinality
pair to the right of the sales entity in the customer-
sales relationship indicates that a new sales
transaction can only be added if it is linked to a
customer.
(1,1) (0, M)
Sales Made to Customer
5-50
• The maximum cardinality of 1 in the (1, 1) cardinality
pair to the right of the sales entity in the customer-
sales relationship indicates that a given sales
transaction can only be linked to one customer.
(1,1) (0, M)
Sales Made to Customer
5-51
Entity Association
5-52
Relationships
between Entities
• Three basic types of relationships between
entities are possible, depending on the
maximum cardinality associated with each
entity. They are:
1. A one-to-one relationship (1:1)
2. A one-to-many relationship (1:M)
3. A many-to-many relationship (M:M)
5-53
Implementing an REA Diagram in a
Relational Database
5-54
end
5-55