Copyright © 2012 Pearson Education, Inc. publishing as Prentice Hall 18-1 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, Inc. publishing as Prentice Hall 182 REA Diagram – Revenue Cycle Redundant Redundant Copyright 2012 © Pearson Education, Inc. publishing as Prentice Hall 18-3 REA Diagram – Expenditure Cycle Redundant Redundant Copyright 2012 Pearson Education, Inc. publishing as Prentice Hall 18-4 REA Diagram – Payroll Cycle First, REA is in mirror form, Agent, Event, Resource Get/Give Give/Get Time Worked/Disburse Cash Time Used/Bill Client Each Event should be related to one Resource But Time Worked is usually NOT Redundant Copyright 2012 Pearson Education, Inc. publishing as Prentice Hall Redundant 18-5 Time can NOT be increased/decreased Attributes stored in Time Event Hours Worked Time Used REA Redundancies Separate REA for an organization will have redundant Entities Redundant Resource Entities Eliminate Redundant Resources (no duplicates): Link Resources 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 Redundant Event Entities Eliminate (Merge) the Redundant Event Entities alters the minimum cardinalities associated with the other events that are related to the merged event if: 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 May alter minimum cardinality between Event and Agent if: Minimum becomes 0 (optional) if agents are different in different transaction cycles Copyright 2012 Pearson Education, Inc. publishing as Prentice Hall 18-6 REA Redundancies Agents If Duplicate Agents exist across transaction cycles Do NOT eliminate them, keep them for legibility of the model Copyright 2012 © Pearson Education, Inc. publishing as Prentice Hall 18-7 Payroll Cycle Revenue Cycle Expenditure Cycle Integrated REA Diagram Copyright 2012 © Pearson Education, Inc. publishing as Prentice Hall 18-8 Cardinality Effect of Merging Resources Cardinalities Between Resource and Entities Remain the Same. Copyright 2012 Pearson Education, Inc. publishing as Prentice Hall 18-9 Cardinality Effect of Merging Events The Cardinality Between Disburse Cash and Receive Inventory and Disburse Cash and Time Worked is now 0 Copyright 2012 Pearson Education, Inc. publishing as Prentice Hall 1810 The Cardinality between Disburse Cash and Supplier & Employee (as payee) is now 0 to 1, that is a disbursement can be made to the supplier OR the employee but not BOTH! 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 (give event) must be linked to an event that involves the acquisition of a resource (get event). 4. Every resource must be linked to at least one event that increments that resource (Get) and to at least one event that decrements that resource (Give). 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. 6. If event A can be linked to more than one other agent, but cannot be linked simultaneously to all of those other agents, then the REA diagram should show that event A is linked to a minimum of 0 of each of those other agents. Copyright 2012 Pearson Education, Inc. publishing as Prentice Hall 1811 Using REA Diagram to Create Relational Database Advantage: Ensures the elimination of Anomalies: Update Insert Delete Copyright 2012 © Pearson Education, Inc. publishing as Prentice Hall 1812 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 3. Attribute(s) 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. 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. 1:1 If events are sequential, the Primary Key of the 1st event should be used as the Foreign Key of the 2nd event If not sequential, either entities primary key can become the foreign key of the other table 1:N Primary Key of the Entity Linked to the Many Entity MUST be used as the Foreign Key in the Many Entity Copyright 2012 © Pearson Education, Inc. publishing as Prentice Hall 1813 Event Tables Step 1 •Create Tables for each Entity Resource Tables •Create Table for each M:N Maximum Cardinality 12 tables from Entities 5 tables from M:M cardinalities Copyright 2012 © Pearson Education, Inc. publishing as Prentice Hall 1814 Step 3 Copyright 2012 © Pearson Education, Inc. publishing as Prentice Hall 1815 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, Inc. publishing as Prentice Hall 1816
© Copyright 2026 Paperzz