260 likes | 533 Views
Designer should represent the view of the users (not his/her view) ... Entity-relationship modeling is a popular way of graphically developing data models ...
E N D
Slide 1:E-R and REA Modeling
Accounting 5410 David Plumlee
Slide 2:Documentation vs. Modeling
Documentation involves systems that exists or that have already been designed Modeling is part of the process of creating a system
Slide 3:What is data modeling?
Representing reality with conceptual models Many details found in reality are not included Designer should represent the view of the users (not his/her view)
Slide 4:Approaches to Modeling
Entity-relationship modeling is a popular way of graphically developing data models REA modeling is a special case of E-R modeling used only in accounting applications
Slide 5:Some E-R definitions
Entities ... are “objects” found in reality Relationships ... are ways that entities relate or interact with each other Attributes describe or provide details of entities
Slide 6:Symbols in E-R modeling
Entities… analogous to nouns are represented graphically by rectangles Relationships... analogous to verbs are represented graphically by diamonds Lines connect entities and relationships, and letters and numbers above the line indicate the degree of the relationship
Slide 7:An E-R Model of Marriage
What are the entities? How are the entities “related”?
Slide 8:Marriage model
WIFE Entities... An E-R Model...
Slide 9:Can we model surgery?
Entities doctor operation patent Relationships undergoes performs
Slide 10:Patient/Surgery Relationship
Slide 11:Doctor/Surgery Relationship
Slide 12:View Integration
Patient undergoes surgery performs doctor Combining diagrams into system or subsystem E-R diagram
Slide 13:Cardinality
Specifies how many occurrences of an entity can participate in the given relationship with any one occurrence of the other entity in the relationship 1 M
Slide 14:What kinds of relationships are possible?
One-to-one an inventory item and its reliability represented by 1 One-to-many customer and invoices represented by 1 and M Many-to-many inventory items and customer sales represented by M and N
Slide 15:M-to-M Relationships
RDBMS have difficulty dealing with many-to-many relationships
Slide 16:Relationship tables
Create a relationship table use a composite primary key comprised of the primary keys of the two m-to-m tables then each of the originals has a 1-to-m relationship to the “relationship table”
Slide 17:M-to-M Example
M N
Slide 18:Relationship Table
Tbldoctor(DocName,Specialty,SurgeryType) TbleSurgery(SurgeryType,DRG,ReimburseRate) TblRelate(DocName,SurgeryType,DocSurg) M 1 1 M
Slide 19:Resources, Events and Agents (REA)
Resources similar to assets in that they provide future economic value broader because human resources can be included Events produce changes in resources Agents are people or organizations that participate in events
Slide 20:REA events
“Events” that increase or decrease a company’s resources actual exchanges using resources internally (e.g., fixed assets) Captured in “traditional” accounting systems Modeled through a “duality relationship”
Slide 21:Examples of agents
Internal agents shipping clerks A/P clerks Credit managers External agents bank vendors customers
Slide 22:An “empty” REA diagram
Resource Event Agents
Slide 23:Who are the Agents?
Inside agent Outside agent
Slide 24:What do we mean by duality?
A duality relationship is where we pair related economic events each member of the pair is a either an increment or a decrement to resources Together the pair represents an exchange event these can be separated in time, e.g., credit sale
Slide 25:The Basic REA Exchange Diagram
Resource Increment Resource Decrement
Slide 26:5 Exchanges in the
Equity Investment- cash from/to investors Asset Investment - cash for ship Employment - cash for services Inventory Purchase - silk for cash Sale - cash for silk