You are on page 1of 49

ACC217 Accounting Information Systems

JAN2021 Seminar 5
REA Data Modelling
Seminar 5: Learning Outcomes

• Understanding databases

• Apply and draw REA data models of AIS database


Understanding Databases
What is a Database?

• Most business application have databases


to store data

• A database is a collection of data that is


organized so that it can be easily accessed,
managed and updated

• Data is organized into rows, columns and


tables, and it is indexed to make it easier to
find relevant information

• Data gets updated, expanded and deleted


as new information is added.
The Evolution of Databases

• 1960s: Hierarchical and networked databases

• 1980s: Object-oriented databases

• 1970s: Relational Databases / SQL

• Today: Cloud database, NoSQL…etc


What is a RDBMS?

• RDBMS = Relational Database Management System.

• An RDBMS is a particular type of DBMS that uses a relational model for


its databases. An RDBMS therefore enables you to create relational
databases.

• RDBMS is the most popular type of database system. Most RDBMS


include: Microsoft Access, SQL Server, Oracle Database, MySQL.

• A RDBMS allows related data to be stored across multiple tables, and


linked by establishing a relationship between the tables.

• This provides an efficient way to store data, as you can enter data
once, then reference it from elsewhere in the database.

• This is in contrast to a flat-file database where all data resides within a


single file with no tables.
What is a RDBMS?

The Excel table below stores the following data:

Name NRIC DOB Gender Race Religion Phone Nationality


AAA S1122330H 12/03/1980 Male Chinese Buddhism 90023355 Singaporean
BBB S1122331F 30/04/1984 Female Malay Muslim 90123349 Singaporean
CCC S1122332Y 05/06/1983 Male Chinese Christian 81265533 Malaysian
DDD S1122333W 13/02/1988 Male Chinese Christian 92632425 Singaporean
EEE S1122334A 23/06/1981 Female Indian Hindu 97663211 Indian
FFF S1122335D 03/12/1987 Female Malay Muslim 82856632 Malaysian
GGG S1122336L 24/01/1983 Male Malay Muslim 94125557 Singaporean

What are the challenges of maintaining an Excel file like this?


What is a RDBMS?

Example: A RDBMS Model for Contact Management


What is a RBDMS?

A RDBMS can be very complex!


REA & AIS
AIS

User
Application:
Database:
Interface and
Business Logic Data storage
Systems Design & Development Process

Implementa-
System Conceptual Physical Operation &
tion &
Analysis Design Design Maintenance
Conversion
Systems Design & Development Process

1. Systems Analysis
– Initial planning to determine the need for and feasibility of
developing a new system
– Judgments about the proposal’s technological and economic
feasibility
– Identify user information needs
– Define the scope of the proposed new system
– Gather information about the expected number of users and
transaction volumes to make preliminary decisions about hardware
and software requirements

2. Conceptual Design
– Developing the different schemas for the new system at the
conceptual, external, and internal levels
The System Analysis Process

3. Physical Design
– Translating the internal-level schema into the actual database
structures that will be implemented in the new system
– New applications are developed

4. Implementation and Conversion


– Includes all the activities associated with transferring data from
existing systems to the new database AIS (i.e. data migration)
– Testing the new system
– Training employees

5. Maintaining the New System


Data Modeling

• Process of defining an information system so it represents an


organizations requirements

• Occurs at two stages of the design process:


– System analysis
– Conceptual design

• Data models:
– Data flow diagrams
– Flow charts
– Entity-relationship diagrams
Entity-Relationship Diagram (ERD)

• ERD provides a conceptual view of a database


– Represent all aspects of the organization, including interactions
with the external environment.

• Components of an ERD
– Entities: corresponds to tables
– Attributes: corresponds to fields of a table
– Relationships: represents links between tables

• The REA (“Resources-Events-Agents”) Data Model is a form of ERD

Sale Customer
The REA Data Modeling Framework

• REA and Flowcharting are ways to model real processes

• Whereas Flowcharting looks at the process flow, objects and task


coordination, REA helps to show the data relationships

• The REA data model was developed specifically for use


in designing accounting information systems. It focuses on business
semantics underlying an organization's value chain activities. It
provides guidance for identifying the entities to be included in
a database and structuring the relationships among the entities.
REA Data Model: Entity Type

Resources Events Agents


The things that the Business People and
company owns and transactions or organizations who
have economic activities. Examples: participate in Events.
value. Examples: • Sale Examples:
• Inventory • Cash receipt • Staff
• Cash • Purchase • Customer
• Equipment • Payment • Supplier
• Property • Bank
Class Activity 5.1

Identify the Resources, Events and Agents for a customer paying cash
to the cashier for a book that he is purchasing.

Book Sale Staff

Cash Payment Customer


The REA Data Modelling Framework

Example
Relationship:
• A Sale Record is linked to only one Customer Record
• A Customer Record is linked to minimum zero or many Sale Record

• Tables: Sale and Customer

• Field: Not stated – but could be product number, customer ID, address
etc.

Sale Customer

Cardinalities
Developing a REA Diagram

Step 1:
Identify the events about which management wants to collect
information

Step 2:
Identify the resources affected by the events and the agents who
participated

Step 3:
Determine the cardinalities between the relationships
Cardinalities

• Describe the nature of relationships between entities


• How many instances of one entity can be linked to each specific
instance of another entity
• Minimum can be: 0 or 1
• Maximum can be: 1 or Many

13
Three Types of Relationships

Relationship type is based on maximum cardinality:

• One-to-One:

• One-to-Many:

• Many-to-Many:
REA Model – Revenue Cycle

Resources Events Agents


REA Model – Revenue Cycle (Cardinalities)

TakeOrder Employee

Inventory
Customer

Sale

Employee

Cash Receive Customer


Cash
Converting REA to Relational Database

• Create a table for:


– each distinct entity in the diagram
– each many-to-many relationship

• Assign attributes to appropriate tables


– primary key – uniquely identifies a record (e.g. Order#)
– other attributes (e.g. OrderDate)

• Use foreign keys to implement one-to-one and one-to-many


relationships
– foreign key – field in a table that is a primary key in another table
– used to link tables (e.g. Cust#)
Converting REA to Relational Database
Converting REA to Relational Database

Table Primary Key Foreign Key Attributes


Inventory InventoryID Material description, weight, price

Quotation QuotationID EmployeeID, Quotation date, RFQ no from


NewCustID, customer, total quotation amount
CustID, EmpID

Order OrderID QuotationID, CustID, Order Date, PO no from


EmpID customer, Total order amount

Employee EmpID Employee-name, Employee job title

Potential NewCustID Customer-Name, contact number


Customer
Existing Customer CustID Customer-Name, Delivery
address, terms of payment
Inventory- InventoryID, InventoryID, Quantity, delivery date
Quotation QuotationID QuotationID
Inventory-Order InventoryID, InventoryID, OrderID Quantity, delivery date
OrderID
Importance of REA Models

• To take full advantage of REA models to produce the desired outputs,


it is necessary to have both:

• Knowledge about the structure of financial statements and the


meanings of individual accounts; and

• An understanding of the REA data model, especially the meaning of


various cardinalities.
Class Activities
Class Activity 5.2: Cardinalities & Business Rule

1. For the diagram below, (a) what is the Resource, Event and Agent, and
(b) describe the business rule:

Submits Sales
Machine Customer
Order
Class Activity 5.2: Cardinalities & Business Rule

2. For the diagram below, (a) what is the Resource, Event and Agent, and
(b) describe the business rule:

Issues Tax Walk-in


Cash
Invoice Customer
Class Activity 5.2: Cardinalities & Business Rule

3. For the diagram below, (a) what is the Resource, Event and Agent, and
(b) describe the business rule:

Pay Supplier
Cheque Supplier
Invoice

Purchasing
Officer
Class Activity 5.2: Cardinalities & Business Rule

4. For the diagram below, (a) what is the Resource, Event and Agent, and
(b) describe the business rule:

Spare Parts Order Entry Customer

Sales Person
Class Activity 5.2: Cardinalities & Business Rule

5. For the diagram below, (a) what is the Resource, Event and Agent, and
(b) describe the business rule:

Return of
Inventory Defective Customer
Inventory

Performs stock
Storekeeper
count
Class Activity 5.3: Case Study

Prepare an REA diagram for the expenditure cycle below:


Expenditure Cycle for Fred's Train Shop
• Fred sells toy trains and train accessories. He maintains some inventory to sell.
Fred deals with more than one supplier and often places orders for multiple items
at the same time. Fred takes inventory and places orders every Monday.
• Fred's suppliers strive to provide outstanding service. Therefore, they never
consolidate multiple orders into one shipment, but always ship merchandise the
day after receiving an order.
• Usually, Fred's suppliers can fill his entire order in one shipment.
• Occasionally, however, a supplier may be temporarily out of stock of a particular
item. In such cases. the supplier ships as much of the order as possible and then
ships the out-of-stock item separately as soon as it becomes available.
• Fred pays for each order in full at one time; that is, he does not make partial
payments on orders received.
• Some suppliers offer discount terms for early payments; Fred always takes
advantage of such offers, paying individual invoices, in full, on the appropriate
date.
• Suppliers who do not offer such discounts send Fred monthly statements listing
all orders placed the prior month. Fred pays the entire balance indicated on the
statement in one check by the specified due date.
Recap

• Understand what is REA

• Be competent in applying REA modelling to business processes

• Understand how REA is related to database design for AIS/ERP


Quiz
Quiz

1. A(n) diagram graphically depicts a database's contents


by showing entities and relationships.

a) Data flow

b) Flowchart

c) Entity-relationship

d) REA
Quiz

2. Which of the following statements about REA modelling and REA


diagrams is false?

a) REA data modelling does not include traditional accounting elements


such as ledgers, chart of accounts, debits and credits.

b) REA is an acronym for Resources, Entities, and Agents.

c) REA data modelling could be referred to as an events-based model.

d) REA diagrams must include at least two activities, which together


represent a give-get economic exchange.
Quiz

3. An REA diagram must link every event to at least one and


two .

a) resource; agents

b) agent; resources

c) transaction; entities

d) resource; relationships.
Quiz

4. Which of the following is not one of the rules in creating an REA data
model?

a) Each event is linked to at least one resource that it affects.

b) Each event is linked to at least one other event.

c) Each event is linked to at least two participating agents.

d) All of the above are important rules.


Quiz

5. The minimum cardinality of a relationship in an REA diagram can be


either

a) 0 or 1

b) 0 or N

c) 1 or N

d) none of the above.


Quiz

6. The maximum cardinality of a relationship in an REA diagram can be


either

a) zero or one

b) one or many

c) zero or many

d) none of the above.


Quiz

7. What is the standard cardinality pattern for a relationship between an


event and an agent?

a) 1:1

b) 0:1

c) 0:N

d) 1:N
Quiz

8. The "give" event represents an activity which

a) includes a promise to engage in future economic exchanges

b) increases the organisation's stock of an economic resource

c) reduces the organisation's stock of a resource that has economic value

d) none of the above.


Quiz

9. The "get" event represents an activity which

a) includes a promise to engage in future economic exchanges

b) increases the organisation's stock of an economic resource

c) reduces the organisation's stock of a resource that has economic value

d) none of the above.


Quiz

10. Developing an REA diagram for a specific transaction cycle begins by


identifying

a) relevant events

b) agents involved

c) resources affected

d) relationship cardinalities.
End of Seminar 5

You might also like