Chapter 18 Implementing an REA Model in a

  • Slides: 13
Download presentation
Chapter 18 Implementing an REA Model in a Relational Database Copyright © 2012 Pearson

Chapter 18 Implementing an REA Model in a Relational Database Copyright © 2012 Pearson Education 18 -1

Learning Objectives Integrate separate REA diagrams for individual business cycles into a single, comprehensive

Learning Objectives Integrate separate REA diagrams for individual business cycles into a single, comprehensive organization-wide REA diagram. Build a set of tables to implement an REA model of an AIS in a relational database. Explain how to write queries to retrieve information from an AIS relational database built according to the REA data model. Copyright © 2012 Pearson Education 18 -2

REA Diagram—Revenue Cycle Copyright © 2012 Pearson Education 18 -3

REA Diagram—Revenue Cycle Copyright © 2012 Pearson Education 18 -3

REA Diagram—Expenditure Cycle Copyright © 2012 Pearson Education 18 -4

REA Diagram—Expenditure Cycle Copyright © 2012 Pearson Education 18 -4

REA Diagram—Payroll Cycle Copyright © 2012 Pearson Education 18 -5

REA Diagram—Payroll Cycle Copyright © 2012 Pearson Education 18 -5

REA Redundancies Separate REA for an organization will have redundant entities Resource Each resource

REA Redundancies Separate REA for an organization will have redundant entities Resource Each resource entity must be connected to: The resource entity is linked to event entities in one business cycle and to event entities in the other cycle One event that increases the resource and, One event that decreases the resource No effect on cardinality Events Alters the minimum cardinalities associated with the other events that are related to the merged event May be linked to either an event that is part of one business cycle or to an event that is part of another cycle but cannot be linked to both events The minimum cardinality associated with the other events must be 0 in the integrated REA diagram Copyright © 2012 Pearson Education 18 -6

Payroll Cycle Revenue Cycle Expenditure Cycle Integrated REA Diagram Copyright © 2012 Pearson Education

Payroll Cycle Revenue Cycle Expenditure Cycle Integrated REA Diagram Copyright © 2012 Pearson Education 18 -7

Cardinality Effect of Merging Resources Cardinalities between resource and entities remain the same. Copyright

Cardinality Effect of Merging Resources Cardinalities between resource and entities remain the same. Copyright © 2012 Pearson Education 18 -8

Cardinality Effect of Merging Events The cardinality between Disburse Cash and Supplier and Employee

Cardinality Effect of Merging Events The cardinality between Disburse Cash and Supplier and Employee (as payee) is now 0 to 1, that is, a disbursement can be made to the supplier or the employee but not both! Copyright © 2012 Pearson Education 18 -9

Rules for Creating Integrated REA Diagram 1. Every event must be linked to at

Rules for Creating Integrated REA Diagram 1. Every event must be linked to at least one resource. 2. Every event must be linked to two agents who participate in that event. 3. Every event that involves the disposition of a resource must be linked to an event that involves the acquisition of a resource. 4. Every resource must be linked to at least one event that increments that resource and to at least one event that decrements that resource. 5. If event A can be linked to more than one other event, but cannot be linked simultaneously to all of those other events, then the REA diagram should show that event A is linked to a minimum of 0 of each of those other events. Copyright © 2012 Pearson Education 18 -10

Using REA Diagram to Create Relational Database Advantage: Ensures the elimination of anomalies: Update

Using REA Diagram to Create Relational Database Advantage: Ensures the elimination of anomalies: Update Insert Delete Copyright © 2012 Pearson Education 18 -11

REA to Database Steps 1. Create a table for each distinct entity in the

REA to Database Steps 1. Create a table for each distinct entity in the diagram and for each many-to-many relationship. 2. Assign attributes to appropriate tables. Identify primary keys: Attributes that uniquely identifies each record. For M: N relationships the primary key consists of two attributes that represent the primary keys of each entity linked in that relationship. Identify remaining attributes for table. 3. Use foreign keys to implement one-to-one and one-to-many relationships. An attribute of one entity that is itself the primary key of another entity. Copyright © 2012 Pearson Education 18 -12

Retrieving Information from REA Database Journals Information contained in event tables Ledgers Information contained

Retrieving Information from REA Database Journals Information contained in event tables Ledgers Information contained in resource tables Financial statements Information contained in resources and Information on imbalances Accounts receivable Sales transactions for which customer payments have not yet been received Accounts payable Purchases from suppliers that have not yet been paid for Copyright © 2012 Pearson Education 18 -13