Sie sind auf Seite 1von 9

Systems Development Life Cycle

Classical Model

Database Design: Logical & Physical Modeling


Database Accounting Systems Actg/IDS 475
Planning Requirements Analysis Design Coding Implementation Operation

Logical Modeling Physical Modeling

MSAccess
Accounting 475

Logical Design Tools


Database Overall Schema

Logical Modeling
Database Overall Schema

Flowchart

Data Flow Diagram

Entity-Relationship Diagram

Flowchart

Data Flow Diagram

Entity-Relationship Diagram

Maps the data environment in a procedural manner

Maps the data environment in a processoriented manner

Maps the data environment in a relationshiporiented manner

Maps the data environment in a procedural manner

Maps the data environment in a processoriented manner

Maps the data environment in a relationshiporiented manner

Physical Modeling Design of relational database tables

Accounting 475

Accounting 475

Logical Modeling
Database Overall Schema

Data Flow Diagram Flowchart Comparison Manual processing DFD Flowchart

Flowchart

Data Flow Diagram

Entity-Relationship Diagram

Maps the data environment in a procedural manner

Maps the data environment in a processoriented manner

Maps the data environment in a relationshiporiented manner

Physical Modeling Design of relational database tables Coding Create database in MSAccess
Accounting 475 Accounting 475

Data Flow Diagram Flowchart Comparison Computer Processing Magnetic Tape DFD Flowchart

Data Flow Diagram Flowchart Comparison Computer Processing Magnetic Disk DFD Flowchart

Accounting 475

Accounting 475

ERD Modeling
Makes sure that the database captures and stores data about each business activity the company intends to plan, control or evaluate It produces a database that is in third normal form (3NF)

Entity Relationship Diagram


Entity - any class of objects about which data is collected.
Customer

Sale

Order

Accounting 475

Accounting 475

Entity Relationship Diagram


Attributes - properties or characteristics of an entity that are of interest
Customer Name

Entity Relationship Diagram


Relationship - the link between one or more entities describing how they are related
Received by

Invoice #

Telephone Number

Pays for

Made to

Accounting 475

Accounting 475

Entity Relationship Diagram


Cardinality - the number of occurrences of one entity that may be associated with a single occurrence of the other entity.
Maximum Cardinality Minimum Cardinality

Entity Relationship Diagram


Employee #

Unary Relationship
1 Employee Is married to

Name

Address

Telephone #
Accounting 475 Accounting 475

Entity Relationship Diagram


Binary Relationship
Invoice # Invoice #

Entity Relationship Diagram


Ternary Relationship
1 1

Employee 1
Item Sales Pays for

Is assigned to

Computer

Cash Collections

Customer Name

1
Price $ Amount

Office

Accounting 475

Accounting 475

Sample E-R Diagrams


1) Do not include attributes in ERD 2) Use only binary relationships in ERD
Players Part of Teams Part of League

Employers

Managed By

Supervisors

2 Simplifying Assumptions!!!
Customer Orders

Part of

Manages

Departments

Part of

Sales

Part of

Cash Receipts
Accounting 475

Accounting 475

Entity Relationship Diagram


Maximum Cardinality - the maximum number of occurrences of one entity that may be associated with a single occurrence of the other entity.
One to One One to Many Many to One Many to Many
Accounting 475

Entity Relationship Diagram


Maximum Cardinalities

One to One (1:1) Relationships


1
Sales Pays for

Cash Collections

e.g. Cash Sale Each instance of a sale is linked to at most one instance of a cash collections event Each instance of a cash collection is linked to at most one instance of a sales event
Accounting 475

Entity Relationship Diagram


Maximum Cardinalities

Entity Relationship Diagram


Maximum Cardinalities

One to Many (1:N) Relationships


1
Sales N Pays for Cash Collections

Many to One (N:1) Relationships


N
Sales Pays for

Cash Collections

e.g. Installment Payments Each instance of a sale is linked to many instances of a cash collection event Each instance of a cash collection is linked to at most one instance of a sales event event
Accounting 475

e.g. Paying monthly store card in full Each instance of a sale is linked to at most one instance of a cash collections event Each instance of a cash collection is linked to many instances of a sales event
Accounting 475

Entity Relationship Diagram


Maximum Cardinalities

Many to Many (N:N) Relationships


N
Sales Pays for

How do you know what the maximum cardinalities should be?


Companys General

Cash Collections

e.g. Paying monthly store card in part each month (balance forward method) Each instance of a sale is linked to many instances of a cash collections event Each instance of a cash collection is linked to many instances of a sales event
Accounting 475

business policies business knowledge

Accounting 475

ERD Methodology
Data Modeling Reading example

Resource Event Agent Model


Resource
Things of economic value to an organization that it wants to collect data about, which includes: 1) Assets - cash, inventory, supplies, stores 2) Intangibles (not on balance sheet) employee services, manufacturing techniques 3) Items not owned neighborhoods (in a real estate database), delivery routes (used by a trucking company) All organizations activities about which management wants to collect data - sales, cash collections, customer orders

1. Identify the entities for the ERD using the:

REA model
Event

Agent
Accounting 475

Types of people an organization collects data about, people who participate in events - employee, vendor, customer
Accounting 475

ERD Methodology
Data Modeling Reading example

ERD Methodology
Data Modeling Reading example

2. Draw rectangles to represent each entity and arrange event entities in chronological order on page (start with events and then add related resources and agents)
Resource Inventory Event Sales Agent Salesperson Customer Cash Cash Collections Cashier
Accounting 475

3. Add diamonds to represent important relationships


Resource Inventory
Line items

Event Sales
Pays for Party to Made to

Agent Salesperson

Customer

Cash

Increases

Cash Collections

Received from Received by

Cashier
Accounting 475

ERD Methodology
Data Modeling Reading example

ERD Methodology
Data Modeling Reading example

4. Specify maximum relationship cardinalities


Resource Inventory N
Line items

5. Specify minimum relationship cardinalities


Resource Inventory
Line items

Event N Sales N
Pays for

N N

Party to Made to

Agent 1 Salesperson 1 Customer

Event Sales
Pays for Party to Made to

Agent Salesperson

Cash

Increases

N N Received 1 Cash N from Collections N Received 1


by

Customer

Cash Cashier
Accounting 475

Increases

Cash Collections

Received from Received by

Cashier
Accounting 475

Entity Relationship Diagram


Minimum Cardinality - the minimum number of occurrences of one entity that may be associated with a single occurrence of the other entity.

How do you know what the minimum cardinalities should be?


Companys Knowledge

business policies of effective internal

controls

Accounting 475

Accounting 475

Minimum Cardinalities and Internal Control


Internal controls: 1) Safeguard the assets 2) Ensure the accuracy & reliability of the accounting data 3) Ensure efficient operations 4) Enforce managerial policies Some of these controls can be built into the structure of the database
Accounting 475

Minimum Cardinalities and Internal Control


For good Internal Control there are 3 types of minimum cardinalities: 1) Event-Resource 2) Event-Agent 3) Event-Event

Accounting 475

ERD Methodology
Data Modeling Reading example

Entity Relationship Diagram


Minimum Cardinalities

5. Specify minimum relationship cardinalities


Resource Inventory 1
Line items

Event-Resource Relationships
Inventory

Event 0 Sales
Pays for Party to Made to

Agent Salesperson

Line Item

Sales

Customer

Cash

Increases

Cash Collections

Received from Received by

Cashier
Accounting 475

Every event involves the acquisition, use or disposal of some resource, but a resource may not be involved in any event Each instance of inventory is linked to a minimum of zero sales events (ie. Unsold or slow-moving inventory - managerial control) Each instance of a sale is linked to a minimum of one inventory item (sale w/o inventory indicates a transaction error) Accounting 475

ERD Methodology
Data Modeling Reading example

Entity Relationship Diagram


Minimum Cardinalities

5. Specify minimum relationship cardinalities


Resource Inventory
Line items

Event-Agent Relationships
Sale

Event Sales
Pays for

Party to Made to

Agent 1 Salesperson

Party to

Salesperson

Customer

Cash

Increases

Cash Collections

Received from Received by

Cashier
Accounting 475

Ensures that all events are legitimate Each instance of a sale must be made by a minimum of one salesperson (sale w/o salesperson indicates a transaction error) Each salesperson is linked to a minimum of zero sales (ie. Person is not effective or was on vacation for the period, etc - managerial control.) Accounting 475

ERD Methodology
Data Modeling Reading example

Entity Relationship Diagram


Minimum Cardinalities

5. Specify minimum relationship cardinalities


Resource Inventory
Line items

Event-Event Relationships
Sales

Event Sales 1
Pays for Made to Party to

Agent Salesperson

Pays for

Cash Collection

Cash

Increases

0 Cash Collections

Customer

Received from Received by

Cashier
Accounting 475

Ensures that events are legitimate and occur in proper order Each instance of a sale is linked to a minimum of zero cash collections (ie. uncollected A/R, overdue accounts, etc. managerial control) Each cash collection is linked to a minimum of one previous sale (cash collection without a previous sale indicates a transaction error)
Accounting 475

ERD Methodology
Data Modeling Reading example

Summary of some ERD Rules


Agent

5. Specify minimum relationship cardinalities


Resource Inventory 1
Line items

Event 0 Sales 1
Pays for

0 0

Party to Made to

1 Salesperson 1 Customer

Relationships go through EVENTS; there are not Resource Agent relationships Only one

Cash

Increases

0 0 Received 1 Cash 0 from Collections 0 Received 1


by

Cashier
Accounting 475 Accounting 475

Physical Modeling
Once the ERD is finished you convert this diagram into relational database tables Then apply Normalization rules and make sure the database is in desired normal form

Physical Modeling
ERD Conversion General Guidelines 1) Create tables for each Entity and N:N relationship 2) Primary key for entity table is a single numeric field; Primary key for N:N relationship table are two fields 3) Link the resulting tables
For tables in a 1:1 relationship, insert a foreign key in one of the two tables. In event-event relationships, put foreign key in later event table. For tables in a 1:N relationship, put foreign key in table of entity participating many times in relationship

Accounting 475

Accounting 475

Coding
1) Create and link tables in MSAccess 2) Create forms for each event process 3) Create forms for maintenance of each agent and resource entity 4) Create queries and reports for each information process

Effects of Databases on Accounting


Mechanics of storing and retrieving accounting information change Journals and Ledgers are outputs of the system, not the core of the system Less emphasis on double-entry bookkeeping Some internal controls are built into the database structure
Accounting 475

Accounting 475

END
Database Design: Logical & Physical Modeling
Database Accounting Systems Actg/IDS 475

Review of ERD Modeling and Database Design


Database Accounting Systems Actg/IDS 475

ERD Modeling Approach


From the problem description determine what are the data elements to be captured in the database. These are fields within entities. Determine what entities those fields will be contained in.
If you only need one data element about something that is a field. If you need several data elements about something, those are attributes (fields) about an entity.

ERD Modeling Approach


Connect up entities with appropriate relationships Determine the cardinality of the relationships
The cardinality question is One record of the first entity can be associated with how many records of the second entity at minimum and maximum?

Sort the entities into types:


Events anything that happens about which we want to capture information (transaction, meeting, call, appointment, order, sale, etc.) Agents people involved in those events Resources either assets (cash, inventory, etc) or anything else of value (services, processes) that are involved in the events, and about which the organization wants to record information.

In assigning cardinalities, use the normal guidelines, but remember: what determines the cardinalities are the business rules of the particular case!

Accounting 475

Accounting 475

Database Design
In a relational database we are collecting attributes in tables. Which attributes go in which tables and how are tables linked and queried? 2 basic approaches

Database Design
Approach 1

Gather attributes from current business documents (invoices, master files, etc.) Group into tables according to most likely dependencies, add keys Use normalization rules to adjust table design to eliminate anomalies Eliminate derived attributes
Accounting 475

Accounting 475

Database Design
Approach 2

Use the Entity Relationship Diagram (REA version) to model data Convert the ERD into schema (table design) and determine all attributes and keys Check design against normalization rules Eliminate derived attributes

END
Review of ERD Modeling and Database Design
Database Accounting Systems Actg/IDS 475

Accounting 475

Das könnte Ihnen auch gefallen