Sie sind auf Seite 1von 75

MENGIMPLEMENTASIKAN

MODEL REA DALAM


DATABASE RELASIONAL
MODEL DATA REA
MODEL DATA REA
Sebuah model data yang digunakan untuk
mendesain database SIA yang mengandung
informasi mengenai tiga jenis entitas yang
fundamental : sumberdaya, peristiwa, agen.
DATABASE RELASIONAL
Database yang dibangun
menggunakan model data relasional.
Model data relasional mereprentasikan
skema level konseptual dan eksternal.
TUJUAN
• Mengintegrasikan diagram REA terpisah
yang dikembangkan untuk siklus bisnis
tunggal ke dalam sebuah model data
tunggal, komprehensif, dan seluruh
perusahan.
• Mengimplementasikan model hasil dalam
sebuah database relasional.
• Mendeskripsikan cara menggunakan
diagram REA untuk mengasilkan laporan
keuangan dan laporan manajemen
INTEGRATING REA DIAGRAMS ACROSS
CYCLES

Employee
(Supervisor)

Employee
Time Worked Time

Employees

Employee
Disburse Cash Cash
(Payroll Clerk)
INTEGRATING REA DIAGRAMS ACROSS
CYCLES
• The basic economic exchange:
– Get employee time and skills
Employee – Give a paycheck
(Supervisor)

Employee
Time Worked Time

Employees

Employee
Disburse Cash Cash
(Payroll Clerk)
INTEGRATING REA DIAGRAMS ACROSS
CYCLES • The time worked event must be linked
to a particular employee and
supervisor for a (1,1) cardinality.
Employee
(Supervisor)

Employee
Time Worked Time

Employees

Employee
Disburse Cash Cash
(Payroll Clerk)
INTEGRATING REA DIAGRAMS ACROSS
• However, each agent can be linked to zero or
CYCLES many time worked events. The zero minimum
allows for inclusion of a new employee or
supervisor who has not yet been involved in a
Employee time recording.
(Supervisor)

Employee
Time Worked Time

Employees

Employee
Disburse Cash Cash
(Payroll Clerk)
INTEGRATING REA DIAGRAMS ACROSS
• A similar situation exists with the disburse
CYCLES cash event. (We regard each individual
paycheck as a separate cash disbursement.)

Employee
(Supervisor)

Employee
Time Worked Time

Employees

Employee
Disburse Cash Cash
(Payroll Clerk)
• The assumption is made that employees record time worked
INTEGRATING
on a daily basis. REA DIAGRAMS ACROSS
• Time worked is therefore linked to a maximum of one cash
CYCLES
disbursement, since employees aren’t paid for half a day on
one paycheck and the other half of the day on another
check.
Employee
(Supervisor)

Employee
Time Worked Time

Employees

Employee
Disburse Cash Cash
(Payroll Clerk)
INTEGRATING REA
• DIAGRAMS ACROSS
For each cash disbursement,
however, there are one-to-many
CYCLES time worked events.
• In other words, a paycheck could
pay an employee for anywhere
Employee
from one day’s work to many.
(Supervisor)

Employee
Time Worked Time

Employees

Employee
Disburse Cash Cash
(Payroll Clerk)
INTEGRATING REA DIAGRAMS ACROSS
CYCLES
• The employee time entity requires some explanation.
• The resource being acquired by the time worked event is
the use of an employee’s skills and knowledge for a
Employee
particular period of time.
(Supervisor)

Employee
Time Worked Time

Employees

Employee
Disburse Cash Cash
(Payroll Clerk)
INTEGRATING REA DIAGRAMS ACROSS
• CYCLES
Time is different from
inventory and other
assets in that it cannot be
Employee
stored.
(Supervisor)
• There are only a few
relevant attributes about
employee time: Employee
Time Worked Time
– Hours worked
– How the time was
used
Employees

Employee
Disburse Cash Cash
(Payroll Clerk)
• The time worked and
INTEGRATING
disburse cash events REA DIAGRAMS ACROSS
capture all the information
CYCLES
about employee time that
it is practical to collect
and monitor.
Employee
• Consequently, the
(Supervisor)
employee time resource
entity is almost never
Employee
implemented in an actual Time Worked Time
database, which is why it
is depicted with dotted
lines.Employees

Employee
Disburse Cash Cash
(Payroll Clerk)
• In the relationship between cash disbursement and the cash resource:
INTEGRATING REA DIAGRAMS ACROSS
– This relationship is identical to the expenditure cycle.
– CYCLES
Each check or EFT must be linked to at least one cash account (and
usually only one), leading to a (1:1) cardinality.
– Each cash account can be linked to:
Employee
• As few as zero cash disbursements (e.g., a new account).
(Supervisor)
• And up to many.
• Means a (0,N) cardinality. Employee
Time Worked Time

Employees

Employee
Disburse Cash Cash
(Payroll Clerk)
Mengintregasikan Diagram REA
Antarsiklus
1. Ddd
2. Nnn
3. Mmmm
4. Vnnnnnn
Call on Employees
Customer (Salesperson)

Suppliers Take Cust.


Customer
Order
Inventory
Order
Employees Inventory Employees
(Salesperson)

Receive
Suppliers Sales Customer
Inventory

Employees Employees
Disburse Cash Cash Receive Cash
(Cashier) (Cashier)

Employees (as Employee


Time Worked
Payees) Time

• In this integrated diagram, we see three


Employees
(Supervisor separate cycles.
)
Aturan untuk mengombinasikan Diagram
REA

 Menggabungkan entitas sumber daya


yang berulang
 Menggabungkan entitas peristiwa yang
berulang
Call on Employees
Customer (Salesperson)

Suppliers Take Cust.


Customer
Order
Inventory
Order
Employees Inventory Employees
(Salesperson)

Receive
Suppliers Sales Customer
Inventory

Employees Employees
Disburse Cash Cash Receive Cash
(Cashier) (Cashier)

Employees (as Employee


Time Worked
Payees) Time

• In this integrated diagram, we see three


Employees
(Supervisor separate cycles.
)
Call on Employees
Customer (Salesperson)

Suppliers Take Cust.


Customer
Order
Inventory
Order
Employees Inventory Employees
(Salesperson)

Receive
Suppliers Sales Customer
Inventory

Employees Employees
Disburse Cash Cash Receive Cash
(Cashier) (Cashier)

Employees (as Employee


Time Worked
Payees) Time

Employees • The revenue cycle appears in yellow.


(Supervisor
)
Call on Employees
Customer (Salesperson)

Suppliers Take Cust.


Customer
Order
Inventory
Order
Employees Inventory Employees
(Salesperson)

Receive
Suppliers Sales Customer
Inventory

Employees Employees
Disburse Cash Cash Receive Cash
(Cashier) (Cashier)

Employees (as Employee


Time Worked
Payees) Time

• The expenditure cycle appears in blue.


Employees
(Supervisor
)
Call on Employees
Customer (Salesperson)

Suppliers Take Cust.


Customer
Order
Inventory
Order
Employees Inventory Employees
(Salesperson)

Receive
Suppliers Sales Customer
Inventory

Employees Employees
Disburse Cash Cash Receive Cash
(Cashier) (Cashier)

Employees (as Employee


Time Worked
Payees) Time

Employees • The payroll cycle appears in pink.


(Supervisor)
Call on Employees
Customer (Salesperson)

Suppliers Take Cust.


Customer
Order
Inventory
Order
Employees Inventory Employees
(Salesperson)

Receive
Suppliers Sales Customer
Inventory

Employees Employees
Disburse Cash Cash Receive Cash
(Cashier) (Cashier)

Employees (as Employee


Time Worked
Payees) Time

• The integrated diagram merges multiple copies of


Employees
resource and event entities but retains multiple
(Supervisor) copies of agent entities.
Call on Employees
Customer (Salesperson)

Suppliers Take Cust.


Customer
Order
Inventory
Order
Employees Inventory Employees
(Salesperson)

Receive
Suppliers Sales Customer
Inventory

Employees Employees
Disburse Cash Cash Receive Cash
(Cashier) (Cashier)

Employees (as Employee


Time Worked
Payees) Time

• Let’s look at how to combine redundant


Employees resource and event entities.
(Supervisor)
ATURAN DALAM DIAGRAM REA
TERINTEGRASI

 Setiap peristiwa harus ditautkan


setidaknya ke satu sumber daya.
 Setiap peristiwa harus ditautkan ke

dua agen yang berpartisipasi dalam


peristiwa tersebut
 Setiap peristiwa harus melibatkan

pelepasan sumber daya yang harus


ditautkan ke sebuah peristiwa yang
melibatkan perolehan sumber daya
ATURAN DALAM DIAGRAM REA
TERINTEGRASI

 Setiap sumber daya harus ditautkan


setidaknya ke satu peristiwa yang
menaikkan sumber daya tersebut dan
setidaknya ke satu peristiwa yang
menurunkan sumber daya tersebut
ATURAN DALAM DIAGRAM REA
TERINTEGRASI

 Peristiwa A dapat ditautkan ke lebih dari


satu peristiwa lainnya, tetapi tidak dapat
ditautkan bersamaan ke seluruh peristiwa
tersebut, kemudian diagram REA harus
menunjukkan bahwa peristiwa A ditautkan
ke minimum 0 atas masing-masing dari
peristiwa lain tersebut.
ATURAN DALAM DIAGRAM REA
TERINTEGRASI

 Sebuah peristiwa dapat ditautkan ke salah


satu dari sekelompok agen, tetapi tidak
dapat ditautkan secara bersamaan ke
seluruh agen, kemudian diagram REA
harus menunjukkan bahwa peristiwa
tersebut ditautkan ke minimum 0 atas
masing-masing dari agen tersebut.
Call on Employees
Customer (Salesperson)

Suppliers Take Cust.


Customer
Order
Inventory
Order
Employees Inventory Employees
(Salesperson)

Receive
Suppliers Sales Customer
Inventory

Employees Employees
Disburse Cash Cash Receive Cash
(Cashier) (Cashier)

Employees (as Employee


Time Worked
Payees) Time

• Inventory has been shown in green here, because


it is increased by the expenditure cycle and
Employees
(Supervisor) decreased by the revenue cycle.
Call on Employees
Customer (Salesperson)

Suppliers Take Cust.


Customer
Order
Inventory
Order
Employees Inventory Employees
(Salesperson)

Receive
Suppliers Sales Customer
Inventory

Employees Employees
Disburse Cash Cash Receive Cash
(Cashier) (Cashier)

Employees (as Employee


Time Worked
Payees) Time

• Cash is increased by the revenue cycle and decreased by


Employees both the expenditure and payroll cycles.
(Supervisor)
• Our integrated diagram shows the disburse cash event
Call on Employees
(shown in purple) is linked to both receive inventory (in the
Customer (Salesperson)
expenditure cycle) and time worked (from payroll cycle).
Suppliers Take Cust.
Customer
Order
Inventory
Order
Employees Inventory Employees
(Salesperson)

Receive
Suppliers Sales Customer
Inventory

Employees Employees
Disburse Cash Cash Receive Cash
(Cashier) (Cashier)

Employees (as Employee


Time Worked
Payees) Time

Employees
(Supervisor)
Call on Employees
Customer (Salesperson)

Suppliers Take Cust.


Customer
Order
Inventory
Order
Employees Inventory Employees
(Salesperson)

Receive
Suppliers Sales Customer
Inventory

Employees Employees
Disburse Cash Cash Receive Cash
(Cashier) (Cashier)

Employees (as Employee


Time Worked
Payees) Time

• Cardinalities between inventory and each of the four events


Employees
(Supervisor)
to which it is related are the same as before.
Call on Employees
Customer (Salesperson)

Suppliers Take Cust.


Customer
Order
Inventory
Order
Employees Inventory Employees
(Salesperson)

Receive
Suppliers Sales Customer
Inventory

Employees Employees
Disburse Cash Cash Receive Cash
(Cashier) (Cashier)

Employees (as Employee


Time Worked
Payees) Time

• Cardinality between the cash disbursement event and


Employees
(Supervisor)
other events with which it is linked are different.
Call on Employees
Customer (Salesperson)

Suppliers Take Cust.


Customer
Order
Inventory
Order
Employees Inventory Employees
(Salesperson)

Receive
Suppliers Sales Customer
Inventory

Employees Employees
Disburse Cash Cash Receive Cash
(Cashier) (Cashier)

Employees (as Employee


Time Worked
Payees) Time

• The cardinality between disburse cash and receive


inventory is now (0,N) instead of (1,N) as it was in the
Employees
(Supervisor) expenditure cycle.
Call on Employees
Customer (Salesperson)

Suppliers Take Cust.


Customer
Order
Inventory
Order
Employees Inventory Employees
(Salesperson)

Receive
Suppliers Sales Customer
Inventory

Employees Employees
Disburse Cash Cash Receive Cash
(Cashier) (Cashier)

Employees (as Employee


Time Worked
Payees) Time

• The cardinality between disburse cash and record hours


worked is now (0,N) instead of (1,N) as it was in the payroll
Employees
(Supervisor) cycle.
Mengimplementasi Diagram REA dalam
Database Relasional
1. Buatlah sebuah tabel untuk masing-masing
entitas yang berbeda dalam diagram
tersebut dan untuk setiap hubungan
banyak-ke-banyak (many-to-many)
2. Tentukan atribut tabel yang sesuai
3. Gunakan kunci asing untuk
mengimplementasikan hubungan satu-ke-
satu (one-to-one) dan satu-ke-banyak (one-
to-many)
Mengimplementasi Diagram REA dalam
Database Relasional
1. Buatlah sebuah tabel untuk
masing-masing entitas yang
berbeda dalam diagram tersebut
dan untuk setiap hubungan
banyak-ke-banyak (many-to-
many)
EXAMPLE
Below is a sample REA diagram for a very
simple revenue cycle.

Customer

Inventory Sale

Employee

Receive
Cash Customer
Cash
EXAMPLE
Our first step is to create a table for each
event, resource, agent, and many-to-many
relationship.

Customer

Inventory Sale

Employee

Receive
Cash Customer
Cash
EXAMPLE

There are two events.

Customer

Inventory Sale

Employee

Receive
Cash Customer
Cash
EXAMPLE

Table Name Primary Key Foreign Key Other Attributes


Sale
Receive Cash
EXAMPLE

There are two resources.

Customer

Inventory Sale

Employee

Receive
Cash Customer
Cash
EXAMPLE

Table Name Primary Key Foreign Key Other Attributes


Sale
Receive Cash
Inventory
Cash
EXAMPLE
There are two types of agents: customers and
employees.

Customer

Inventory Sale

Employee

Receive
Cash Customer
Cash
EXAMPLE

Table Name Primary Key Foreign Key Other Attributes


Sale
Receive Cash
Inventory
Cash
Customer
Employee
EXAMPLE

There is one many-to-many relationship.

Customer

Inventory Sale

Employee

Receive
Cash Customer
Cash
EXAMPLE

Table Name Primary Key Foreign Key Other Attributes


Sale
Receive Cash
Inventory
Cash
Customer
Employee
Sales-Inventory
Mengimplementasi Diagram REA dalam
Database Relasional
1. Tentukan atribut tabel yang sesuai
EXAMPLE

Table Name Primary Key Foreign Key Other Attributes


Sale Sale No.
Receive Cash Cash Rect. No.
Inventory Item No.
Cash Account No.
Customer Customer No.
Employee Employee No.
Sales-Inventory Sale No.-Item
No.
EXAMPLE
 The other attributes include facts the
company wishes to collect that describe
each entity.
EXAMPLE
Table Name Primary Key Foreign Key Other Attributes
Sale Sale No. Date of Sale, Time of Sale,
Total Amount of Sale

Receive Cash Cash Rect. No. Receipt Date, Receipt


Time, Total Amount of
Receipt
Inventory Item No. Description, List Price
Cash Account No. Bank, Type of Account
Customer Customer No. Customer Name, Customer
Address, Customer Phone

Employee Employee No. Employee Name, Employee


Address, Employee Phone,
Job Title

Sales-Inventory Sale No.-Item Quantity Sold, Actual Price


No.
Mengimplementasi Diagram REA dalam
Database Relasional
1. Gunakan kunci asing untuk
mengimplementasikan hubungan
satu-ke-satu (one-to-one) dan satu-
ke-banyak (one-to-many)
 The relationship between customer and
sales is a 1:N relationship. We make the
primary key for the entity that occurs only
once (customer) serve as a foreign key in
the entity that can occur many times
(sale).
Customer

Inventory Sale

Employee

Receive
Cash Customer
Cash
EXAMPLE
Table Name Primary Key Foreign Key Other Attributes
Sale Sale No. Customer No. Date of Sale, Time of Sale,
Total Amount of Sale
Receive Cash Cash Rect. No. Receipt Date, Receipt Time,
Total Amount of Receipt

Inventory Item No. Description, List Price


Cash Account No. Bank, Type of Account
Customer Customer No. Customer Name, Customer
Address, Customer Phone
Employee Employee No. Employee Name, Employee
Address, Employee Phone,
Job Title
Sales-Inventory Sale No.-Item Quantity Sold, Actual Price
No.
EXAMPLE
 Likewise, the primary key for employee
should be a foreign key in the sales
table.
Customer

Inventory Sale

Employee

Receive
Cash Customer
Cash
EXAMPLE
Table Name Primary Key Foreign Key Other Attributes
Sale Sale No. Customer No., Employee No. Date of Sale, Time of Sale,
Total Amount of Sale
Receive Cash Cash Rect. No. Receipt Date, Receipt Time,
Total Amount of Receipt

Inventory Item No. Description, List Price


Cash Account No. Bank, Type of Account
Customer Customer No. Customer Name, Customer
Address, Customer Phone
Employee Employee No. Employee Name, Employee
Address, Employee Phone,
Job Title
Sales-Inventory Sale No.-Item Quantity Sold, Actual Price
No.
EXAMPLE
 The primary key for employee should
also be a foreign key in the receive cash
table.
Customer

Inventory Sale

Employee

Receive
Cash Customer
Cash
EXAMPLE
Table Name Primary Key Foreign Key Other Attributes
Sale Sale No. Customer No., Employee No. Date of Sale, Time of Sale,
Total Amount of Sale
Receive Cash Cash Rect. No. Employee No. Receipt Date, Receipt Time,
Total Amount of Receipt

Inventory Item No. Description, List Price


Cash Account No. Bank, Type of Account
Customer Customer No. Customer Name, Customer
Address, Customer Phone
Employee Employee No. Employee Name, Employee
Address, Employee Phone,
Job Title
Sales-Inventory Sale No.-Item Quantity Sold, Actual Price
No.
EXAMPLE
 The primary key for customer should
also be a foreign key in the receive cash
table.
Customer

Inventory Sale

Employee

Receive
Cash Customer
Cash
EXAMPLE
Table Name Primary Key Foreign Key Other Attributes
Sale Sale No. Customer No., Employee No. Date of Sale, Time of Sale,
Total Amount of Sale
Receive Cash Cash Rect. No. Employee No., Customer No. Receipt Date, Receipt Time,
Total Amount of Receipt

Inventory Item No. Description, List Price


Cash Account No. Bank, Type of Account
Customer Customer No. Customer Name, Customer
Address, Customer Phone
Employee Employee No. Employee Name, Employee
Address, Employee Phone,
Job Title
Sales-Inventory Sale No.-Item Quantity Sold, Actual Price
No.
 The relationship between sales and receive
cash is 1:1. Two guidelines will produce the same
result.
 Put the primary key of the event with the minimum of
one (sales) as a foreign key in the event with the
minimum of zero (receive cash); or
 Put the primary key of the event that occurs first (sales)
as a foreign key in the event that occurs second (receive
cash).
Customer

Inventory Sale

Employee

Receive
Cash Customer
Cash
EXAMPLE
Table Name Primary Key Foreign Key Other Attributes
Sale Sale No. Customer No., Employee No. Date of Sale, Time of Sale,
Total Amount of Sale
Receive Cash Cash Rect. No. Employee No., Customer No., Receipt Date, Receipt Time,
Sale No. Total Amount of Receipt
Inventory Item No. Description, List Price
Cash Account No. Bank, Type of Account
Customer Customer No. Customer Name, Customer
Address, Customer Phone
Employee Employee No. Employee Name, Employee
Address, Employee Phone,
Job Title
Sales-Inventory Sale No.-Item Quantity Sold, Actual Price
No.
EXAMPLE
 The relationship between sales and inventory is
a many-to-many relationship and was already
implemented by the creation of a separate table.

Customer

Inventory Sale

Employee

Receive
Cash Customer
Cash
EXAMPLE
 In the relationship between cash and receive cash, the
primary key for the event that occurs once (cash) should be
a foreign key in the event that occurs many times (receive
cash).

Customer

Inventory Sale

Employee

Receive
Cash Customer
Cash
EXAMPLE
Table Name Primary Key Foreign Key Other Attributes
Sale Sale No. Customer No., Employee No. Date of Sale, Time of Sale,
Total Amount of Sale
Receive Cash Cash Rect. No. Employee No., Customer No., Receipt Date, Receipt Time,
Sale No., Account No. Total Amount of Receipt
Inventory Item No. Description, List Price
Cash Account No. Bank, Type of Account
Customer Customer No. Customer Name, Customer
Address, Customer Phone
Employee Employee No. Employee Name, Employee
Address, Employee Phone,
Job Title
Sales-Inventory Sale No.-Item Quantity Sold, Actual Price
No.
Menggunakan Diagram REA untuk
memuat infromasi dari sebuah
database
Membuat Jurnal dan Buku Besar
Menghasilkan Laporan Keuangan
Membuat laporan manajerial
LATIHAN
Berapa banyak tabel yang dibutuhkan untuk
mengimplementasikan sebuah model data REA
yang memiliki tujuh entitas berbeda, tiga
hubungan M:N dan lima hubungan 1:N dalam
sebuah database relasional ?
a. 7
b. 10

c. 12
d. 15
LATIHAN
Pengombinasian dua diagram REA
biasanya TIDAK jenis entitas apa ?
a. Sumber Daya

b. Peristiwa

c. Agen
d. Semuanya
LATIHAN
Manakah pernyataan berikut yang benar mengenai
sebuah model data REA terintegrasi ?
a. Setiap peristiwa harus dihubungkan setidaknya ke

dua agen.
b. Setiap peristiwa kenaikan (mendapatkan) harus
dihubungkan setidaknya ke satu peristiwa
penurunan (memberi)
c. Setiap sumber daya harus dihubungkan setidaknya
ke satu peristiwa kenaikan dan setidaknya satu
peristiwa penurunan
d. Setiap sumber daya harus dihubungkan setidaknya

ke satu agen
TUGAS KELOMPOK
Buatlah tabel database dari REA yang
telah anda buat sebelumnya !
TUGAS FINAL SIA 2-6
Bagaimana tampilan dari SIA yang
anda download ?
Laporan apa sajakah yang terdapat
pada SIA yang anda pilih. (minimal 10
laporan)
Jelaskan manfaat dari laporan tersebut
!
TUGAS INDIVIDU
Mengapa diperlukan waktu untuk
mengembangkan diagram REA
terpisah untuk setiap siklus bisnis jika
tujuan utamanya adalah untuk
mengombinasikannya ke dalam satu
model data keseluruhan perusahaan
yang terntegrasi ? Mengapa tidak
berfokus saja pada model terintegrasi
dari awal ?

Das könnte Ihnen auch gefallen