Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
HAPTER 15
Romney/Steinbart
1 of 138
INTRODUCTION
Questions to be addressed in this chapter include:
What steps are followed to design and implement a database system? How is the REA data model used to design an AIS database? How is an entity-relationship REA diagram of an AIS database drawn? How are REA diagrams read, and what do they reveal about the business activities and policies of the organization being modeled?
2008 Prentice Hall Business Publishing Accounting Information Systems, 11/e Romney/Steinbart 2 of 138
Data Modeling
Data modeling is the process of defining a database so that it faithfully represents all aspects of the organization, including its interactions with the external environment.
Two important tools to facilitate data modeling:
Entity-relationship diagramming REA data model
Romney/Steinbart
3 of 138
ENTITY-RELATIONSHIP DIAGRAMS
An entity is anything about which the organization wants to collect and store information.
Example: Your university collects and stores information about students, courses, enrollment activity, etc.
In a relational database, separate tables would be created to store information about each distinct entity. In an object-oriented database, separate classes would be created for each distinct entity.
2008 Prentice Hall Business Publishing Accounting Information Systems, 11/e Romney/Steinbart 4 of 138
ENTITY-RELATIONSHIP DIAGRAMS
In an E-R diagram, entities are depicted as rectangles. But there are no industry standards for other aspects of these diagrams.
Enrollment
Students
Romney/Steinbart
5 of 138
ENTITY-RELATIONSHIP DIAGRAMS
Some data modelers, tools, and authors use diamonds to depict relationships.
Enrollment
Line Items
Students
Romney/Steinbart
6 of 138
ENTITY-RELATIONSHIP DIAGRAMS
In this book, we will create E-R diagrams with a large number of entities and relationships. To reduce clutter and improve readability list attributes in a separate table.
Enrollment
Students
Entity Name
Enrollment Student
Attributes
Enrollment No., Enrollment Date, Enrollment Time Student ID No., Student Name, Student Address
Accounting Information Systems, 11/e Romney/Steinbart 7 of 138
Romney/Steinbart
8 of 138
Romney/Steinbart
9 of 138
Inventory
Sales
Employee
Customer
Cash Accounts
2008 Prentice Hall Business Publishing
Receive Cash
Accounting Information Systems, 11/e
Employee
Romney/Steinbart 10 of 138
Romney/Steinbart
11 of 138
The get event is that you receive inventory. The give event is that you pay cash.
Relationships that affect the quantity of a resource are sometimes referred to as stockflow relationships.
Romney/Steinbart
12 of 138
Romney/Steinbart
13 of 138
Romney/Steinbart
14 of 138
Romney/Steinbart
15 of 138
Romney/Steinbart
16 of 138
Romney/Steinbart
18 of 138
Romney/Steinbart
19 of 138
Romney/Steinbart
20 of 138
Sale
Receive Cash
Romney/Steinbart
21 of 138
Romney/Steinbart
23 of 138
Employee
Cash Accounts
Receive Cash
Customer
Romney/Steinbart
24 of 138
Romney/Steinbart
26 of 138
Cardinalities
Minimum Cardinality
Indicates whether a specific instance of the entity next to the cardinality must be linked to at least one instance of the entity on the opposite side of the relationship. Can be either 0 or 1 0 represents an optional relationship 1 represents a mandatory relationship
Romney/Steinbart
27 of 138
Cardinalities
Maximum Cardinality
Indicates whether one instance of the same entity can be linked to more than one instance of the other entity participating in that relationship. Can be either 1 or N.
Romney/Steinbart
28 of 138
Romney/Steinbart
29 of 138
Sale
Customer
There is typically a minimum and maximum cardinality for each entity participating in a relationship.
Romney/Steinbart
30 of 138
Sale
Customer
Minimum Relationships Can I have a sales record that is not related to a customer? Can I have a customer in the customer table that is not related to a sale? Yes = No =
Romney/Steinbart
31 of 138
Romney/Steinbart
32 of 138
3 TYPES OF RELATIONSHIPS
There are 3 basic types of relationships between entities (depending on the maximum cardinality on each side of a relationship.
A one-to-one relationship (1:1) exists when the maximum cardinality for each entity in the relationship is 1.
Romney/Steinbart
33 of 138
3 TYPES OF RELATIONSHIPS
A one-to-many (1:N) relationship exists when the maximum cardinality on one side is 1 and the maximum on the other side is many. A many-to-many (M:N) relationship exists when the maximum on both sides is many.
Romney/Steinbart
34 of 138
Romney/Steinbart
35 of 138
Romney/Steinbart
36 of 138
Romney/Steinbart
37 of 138