You are on page 1of 22

CHAPTER 6

RELATIONAL
DATABASE AND SQL
LEARNING OBJECTIVES
• Understand the techniques used to model accounting
phenomena in an entity-relationship diagram
• Recognize the components of relational tables
• Understand the use of SQL commands
INTRODUCTION
• This chapter examines the resources, events, and agents
(REA) model as a means of specifying and designing
accounting information systems that serve the needs of all
of the users in an organization.

• The basic REA model consists of three entity types


(resources, events, and agents) and a set of associations
linking them.
Resources
• Resources are things of
economic value to the
organization and are the
objects of economic
exchanges with trading
partners.

• REA events fall into two


general groups: economic
events and support events.
Events
• Economic events are phenomena
that effect changes (increases or
decreases) in resources.

• Support events include control,


planning, and management
activities that are related to
economic events but do not
directly effect a change in
resources
Agents
• Agents are individuals within and
outside the organization who
participate in an economic event.
REA model
• The REA model is an accounting framework for modeling
an organization’s critical resources, events, and agents
and the relationships between them.

• Unlike some traditional accounting systems, REA systems


permit both accounting and non-accounting data to be
identified, captured, and stored in a centralized database
ER DIAGRAM
• An Entity Relationship (ER) Diagram is a type of flowchart
that illustrates how “entities” such as people, objects
or concepts relate to each other within a system.
DIFFERENCES BETWEEN ER AND REA
DIAGRAMS
• ER and REA diagrams differ visually in a significant way.
Entities in ER diagrams are of one class, and Their
proximity to other entities is determined by their cardinality
and by what is visually pleasing to keep the diagrams
readable.

• Entities in an REA diagram, however, are divided into


three classes (resources, events, and agents) and
organized into constellations by class on the diagram
View Integration: Creating an Enterprise-Wide REA
Model
• The view integration process involves three basic steps:

• 1. Consolidate the individual models.


• 2. Define the primary keys, foreign keys, and attributes.
• 3. Construct the physical database and produce user
views.
STEP 1. CONSOLIDATE THE INDIVIDUAL
MODELS
• Merging multiple REA models requires first a thorough
understanding of the business processes and entities
involved in the models.

• Individual models are consolidated or linked together


based on shared entities.
• For example, procurement (expenditures) and sales
(revenue) both use inventory and cash resource entities.
STEP 1. CONSOLIDATE THE INDIVIDUAL
MODELS
Step 2. Define Primary Keys, Foreign Keys, and
Attributes
• Implementation into a working relational database
requires primary keys, foreign keys and attributes in
tables.
• Primary key – uniquely identifies an instance of an entity
(i.e., each row in the table)
• Foreign key – the primary key embedded in the related
table so that the two tables can be linked
• Attribute – a characteristic of the entity to be recorded in
the table
Step 2. Define Primary Keys, Foreign Keys, and
Attributes
Step 3. Construct Physical Database and Produce
User Views
• The database designer is now ready to create the
physical relational tables using software.
• Once the tables have been constructed, some of them
must be populated with data.
• Resource and Agent tables
• Event tables must wait for business transactions to occur
before data can be entered.
• The resulting database should support the information
needs of all users.
• SQL is used to generate reports, computer screens, and
documents for users.
Step 3. Construct Physical Database and Produce
User Views
RELATIONAL DATABASE
• A relational database organizes data into tables which
can be linked—or related—based on data common to
each. This capability enables you to retrieve an entirely
new table from data in one or more tables with a single
query.
RELATIONAL DATABASE
Structured Query Language
• SQL stands for Structured Query Language. It's used
for relational databases. A SQL database is a collection of
tables that stores a specific set of structured data.

• SQL statements are used to perform tasks such as


update data on a database, or retrieve data from a
database.
Competitive Advantages of the REA Model
• Using REA can lead to more efficient operations.
• Helps managers identify non-value added activities that
can be eliminated
• Increasing productivity via elimination of non-value added
activities generates excess capacity
• Storing both financial and nonfinancial data in the same
central database reduces multiple data collection, data
storage, and maintenance.
• Using REA can lead to more efficient operations.
• Detailed financial and nonfinancial business data supports
a wider range of management decisions
• supporting multiple user views (e.g., different perspectives
on a problem)
• Provides managers with more relevant, timely, and
accurate information.
• Leading to better customer service, higher-quality
products, and flexible production processes Competitive
Advantages of the REA Model
• END OF PRESENTATION

You might also like