100

Click here to load reader

Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Embed Size (px)

Citation preview

Page 1: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 316 Acct 316 Acct 316 Acct 316 Acct 316 Acct 316

Acct 3

16 A

cct 3

16 A

cct 3

16

Relational Databases4

UAA – ACCT 316Accounting Information

SystemsDr. Fred Barbee

Ch

ap

ter

Page 2: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 316 Acct 316 Acct 316 Acct 316 Acct 316 Acct 316

Acct 3

16 A

cct 3

16 A

cct 3

16

Creating a database can be like creating a universe, only more complicated. At least when the universe was created, there was no one around to complain.

Michael J. Hernandez Database Design for Mere Mortals

Addison Wesley, Boston, 1997

Page 3: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 316 Acct 316 Acct 316 Acct 316 Acct 316 Acct 316

Acct 3

16 A

cct 3

16 A

cct 3

16

An Out-of-the-Text Experience!

Page 4: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 316 Acct 316 Acct 316 Acct 316 Acct 316 Acct 316

Acct 3

16 A

cct 3

16 A

cct 3

16

Types of Databases

4

Chap

ter

Page 5: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 3

16 A

cct 3

16 A

cct 3

16

Types of Databases

Operational Database

Used whenever there is a need to collect, maintain, and modify data.

Stores dynamic data (i.e., the data changes constantly and reflects up-to-the-minute information).

Page 6: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 3

16 A

cct 3

16 A

cct 3

16

Types of Databases

Analytical Database

Used to store and track historical and time-dependent data..

Stores static data that is never (or rarely) modified. Information is applicable to a specific point in time.

Page 7: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 316 Acct 316 Acct 316 Acct 316 Acct 316 Acct 316

Acct 3

16 A

cct 3

16 A

cct 3

16

Early Database Models

4

Chap

ter

Page 8: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 3

16 A

cct 3

16 A

cct 3

16

Hierarchical Database Model

Data is structured hierarchically.

Visualize as an inverted tree.

A single table acts as the “root” of the tree.

Other tables act as branches flowing from the root.

Page 9: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Hierarchical Database Model

Hierarchical Database Model

AgentsAgents

EntertainersEntertainers ClientsClients

ScheduleSchedule PaymentsPaymentsEngagementsEngagements

Page 10: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 3

16 A

cct 3

16 A

cct 3

16

Network Database Model

Visualize as an inverted tree.

Several inverted trees may share branches,

All of which are part of the same database structure.

Page 11: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

The Network Database ModelThe Network Database Model

AgentsAgents

ClientsClients EntertainersEntertainers

PaymentsPayments Musical Styles

Musical StylesEngagementsEngagements

Represent Manage

Schedule Perform PlayMake

Page 12: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

A Basic Set StructureA Basic Set Structure

Rela

tion

sh

ip

Owner Table

Member Table

AgentsAgents

ClientsClients

Set Structure

Rep

resen

t

Page 13: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 3

16 A

cct 3

16 A

cct 3

16

Enter . . . The Relational Database Model

Relational Database

Rela

tional D

ata

base

s

Rela

tional D

ata

bases

Page 14: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 3

16 A

cct 3

16 A

cct 3

16

Relational Database Model

Data is stored in relations, which are perceived by the user as tables.

Each relation is composed of tuples (records) and attributes (fields).

Page 15: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Fundamental Data Storage Concepts and Definitions

Accounts Receivable File

2 Entities 2 Records

Attributes

Customer Customer Credit number name Address limit Balance

Data values

301 ABC Co. Box 5 1,000 400 555 XYZ Co. Box 96,000 2,000

Individual fields

Page 16: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 3

16 A

cct 3

16 A

cct 3

16

Relational Database Model

The physical order of the records of fields in a table is completely immaterial.

Each record in the table is identified by a field that contains a unique value.

Page 17: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

A Relational Database ModelA Relational Database Model

AgentsAgents

ClientsClients EntertainersEntertainersMusical Styles

Musical Styles

Entertainer Styles

Entertainer StylesEngagementsEngagements

Page 18: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Agent ID First Name Last Name Hire Date Phone

100 Mike Hernandez 05/16/02 333-4444

101 Greg Piercy 10/15/02 444-3333

Client ID Agent ID First Name Last Name …..

9001 100 Stewart Jamison …..

9002 101 Shannon McClain …..

Agents

Clients

Ent ID Agent ID First Name Last Name …..

3000 100 John Slade …..

3001 101 Mark Weiser …..

Client ID Ent ID Eng. Date Time …..

9001 3001 04/01/02 1-3 PM …..

9002 3002 04/12/02 7-9 PM …..

Entertainers

Engagements

Page 19: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 316 Acct 316 Acct 316 Acct 316 Acct 316 Acct 316

Acct 3

16 A

cct 3

16 A

cct 3

16

Now, Back to the Text

Page 20: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 316 Acct 316 Acct 316 Acct 316 Acct 316 Acct 316

Acct 3

16 A

cct 3

16 A

cct 3

16

Double-Entry Vs. Database Accounting

Page 21: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 3

16 A

cct 3

16 A

cct 3

16

Double-Entry Versus Database Accounting

Luca Pacioli and double-entry accounting.

Captures and stores key attributes of transactions in a highly aggregated form.

Page 22: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 3

16 A

cct 3

16 A

cct 3

16

Double-Entry Versus Database Accounting

The beloved debit/credit convention provided an important internal control feature in manual systems.

Enter computerized accounting.

Page 23: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 3

16 A

cct 3

16 A

cct 3

16

Double-Entry Versus Database Accounting

The ability to quickly capture lots of data quickly . . .

Date and time of purchase

Identity of item purchased

Store location

Checkout station number

Cashier number

Page 24: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 3

16 A

cct 3

16 A

cct 3

16

Double-Entry Versus Database Accounting

Consider a simple transaction:

On November 18, 2002 we made a sale to Jones Enterprises for $10,000 on credit.

Terms 2/10, n/30

Page 25: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 316 Acct 316 Acct 316 Acct 316 Acct 316 Acct 316

Acct 3

16 A

cct 3

16 A

cct 3

16

How would we handle this transaction in a double-entry system?

Page 26: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 316 Acct 316 Acct 316 Acct 316 Acct 316 Acct 316

Acct 3

16 A

cct 3

16 A

cct 3

16

Files Vs. Databases

4

Chap

ter

Page 27: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter
Page 28: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Fundamental Data Storage Concepts and Definitions

Accounts Receivable File

2 Entities 2 Records

Attributes

Customer Customer Credit number name Address limit Balance

Data values

301 ABC Co. Box 5 1,000 400 555 XYZ Co. Box 96,000 2,000

Individual fields

Page 29: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 3

16 A

cct 3

16 A

cct 3

16

Basic File Types

The master file, which is conceptually similar to a ledger in a manual system.

The transaction file, which is conceptually similar to a journal in a manual system.

Page 30: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

File-Oriented Approach

Applicationprogram #1

File # 1

Item A Item B Item C

Applicationprogram #2

File # 2

Item B Item D Item E

Page 31: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 316 Acct 316 Acct 316 Acct 316 Acct 316 Acct 316

Acct 3

16 A

cct 3

16 A

cct 3

16

How would we handle this transaction in a relational database system.

Page 32: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 3

16 A

cct 3

16 A

cct 3

16

Databases

The database approach views data as an organizational resource that should be . . .

used by, and

managed for,

the entire organization

Page 33: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 3

16 A

cct 3

16 A

cct 3

16

Databases

A database is a set of interrelated, centrally coordinated files.

Focus is on

Data integration

Data sharing

Page 34: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Database Approach

Applicationprogram #3

Applicationprogram #2

Databasemanagement

system

Applicationprogram #1

Item A Item B Item C Item D Item E

Database

Page 35: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Database System

Applicationprogram #3

Applicationprogram #2

Databasemanagement

system

Applicationprogram #1

Item A Item B Item C Item D Item E

Database

DBMS refers to programs that control the data and interfaces between the

data and the application programs.

The Data Base Administrator (DBA) is

responsible for the database.

Page 36: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

A Database Accounting System

Page 37: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 316 Acct 316 Acct 316 Acct 316 Acct 316 Acct 316

Acct 3

16 A

cct 3

16 A

cct 3

16

Advantages & Disadvantages of Relational Database Systems

Page 38: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter
Page 39: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 3

16 A

cct 3

16 A

cct 3

16

Advantages

Reduce data storage costs

Eliminate data redundancy

Eliminate data inconsistencies

Avoid duplicate processing

Page 40: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 3

16 A

cct 3

16 A

cct 3

16

Advantages

Ease add, delete, and update data maintenance tasks

Make data independent of applications

Centralize data management

Centralize data security

Page 41: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 3

16 A

cct 3

16 A

cct 3

16

Advantages

Ease report modifications and updats

Provide ad hoc query capabilities

Facilitate cross-functional data analysis

Page 42: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 3

16 A

cct 3

16 A

cct 3

16

Advantages

Permit multiple users simultaneous data access.

Page 43: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 3

16 A

cct 3

16 A

cct 3

16

Disadvantages

Greater hardware requirements

The database software itself

Employing a database administrator.

Page 44: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 3

16 A

cct 3

16 A

cct 3

16

Disadvantages

Centralization of data . . .

System operation becomes critical

Incorrect data entry corrupts many users’ work

Territorial disputes over data ownership may arise

Page 45: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 3

16 A

cct 3

16 A

cct 3

16

One Last Disadvantage

Page 46: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 316 Acct 316 Acct 316 Acct 316 Acct 316 Acct 316

Acct 3

16 A

cct 3

16 A

cct 3

16

It’s Your Turn!

Discussion Question 4.3 p. 99

Page 47: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

The text explained how database technology may eliminate the need for double-entry accounting. This creates three possibilities:

The double-entry model will be abandoned,

The double-entry model will not be used directly, but an external-level schema based on the double-entry model will be defined for accountant’s use; or

The double entry model will be retained in database systems.

Which alternative do you think is most likely to occur? Why?

Page 48: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 316 Acct 316 Acct 316 Acct 316 Acct 316 Acct 316

Acct 3

16 A

cct 3

16 A

cct 3

16

Logical View

Vs.Physical

View

Page 49: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 3

16 A

cct 3

16 A

cct 3

16

Physical View

Page 50: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 3

16 A

cct 3

16 A

cct 3

16

Physical View

The physical view refers to how and where the data are physically arranged and stored on disk, tape, CD-ROM, or other media.

Page 51: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 3

16 A

cct 3

16 A

cct 3

16

Logical View

The logical view is how the user or programmer conceptually organizes and understands the data.

Page 52: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter
Page 53: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Logical View Vs. Physical View

Credit Report

Customer NumberCredit Limit

Balance

Monthly Statement

Customer NameAddressBalance

Customer NumberCustomer Name

AddressCredit Limit

Balance

How data are stored

on disk.

Logical View Data Physical View

Page 54: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 316 Acct 316 Acct 316 Acct 316 Acct 316 Acct 316

Acct 3

16 A

cct 3

16 A

cct 3

16

Schemas

4

Chap

ter

Page 55: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 3

16 A

cct 3

16 A

cct 3

16

Schemas

A schema describes the logical structure of a database.There are three levels:

Conceptual-LevelExternal-LevelInternal-level

Page 56: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Conceptual-Level Schema

An organization-wide view of the entire database.

Page 57: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

External-Level Schema

Consists of a set of individual user views of portions of the database, also referred to as a subschema.

Page 58: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Internal-Level Schema

The internal-level schema provides a low-level view of the database.

Page 59: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Database Management System

Page 60: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter
Page 61: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 316 Acct 316 Acct 316 Acct 316 Acct 316 Acct 316

Acct 3

16 A

cct 3

16 A

cct 3

16

DBMS Languages

4

Chap

ter

Page 62: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 3

16 A

cct 3

16 A

cct 3

16

DBMS Languages

Every DBMS must provide a means of performing the three basic functions:

Creating the database

Changing the database

Querying the database

Page 63: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 3

16 A

cct 3

16 A

cct 3

16

Data Definition Language (DDL)

Build the data dictionary.

Initialize or create the database.

Describe the logical views for each individual user or programmer.

Specify any limitations or constraints on security imposed on database record or fields.

Page 64: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 3

16 A

cct 3

16 A

cct 3

16

Data Manipulation Language (DML)

Used for data maintenance.

updating portions of the database

inserting portions of the database

deleting portions of the database

Page 65: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 3

16 A

cct 3

16 A

cct 3

16

Data Query Language (DQL)

The data query language (DQL) is used to interrogate the database.

The DQL retrieves, sorts, orders, and presents subsets of the database in response to user queries.

Page 66: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 316 Acct 316 Acct 316 Acct 316 Acct 316 Acct 316

Acct 3

16 A

cct 3

16 A

cct 3

16

More on the Relational Data Model

4

Ch

ap

ter

Page 67: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Table in a Relational Data Model

Page 68: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 3

16 A

cct 3

16 A

cct 3

16

Basic Requirements of the Relational Data Model

Primary keys must be unique.

The primary key cannot be null (blank).

Why?

Known as the entity integrity rule.

Page 69: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 3

16 A

cct 3

16 A

cct 3

16

What is the entity integrity rule?

The entity integrity rule ensures that every row in every relation (table) must represent data about some specific object in the real world.

Page 70: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 3

16 A

cct 3

16 A

cct 3

16

Basic Requirements of the Relational Data Model

Every foreign key must either be null or have a value corresponding to the value of a primary key in another relation.

Why?

The referential integrity rule.

Page 71: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 3

16 A

cct 3

16 A

cct 3

16

What is the referential integrity rule?

The referential integrity rule ensures that links exist among the tables of a database.

Page 72: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Basic Relational Data Model Stuff

Relation = Table = File

Some terminology

Page 73: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Table in a Relational Data Model

Tuple = Row = Record

Some terminology

Page 74: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Table in a Relational Data Model

Attribute = Column = Field

Some terminology

Page 75: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Attribute = Column = Field

Each column in a table must describe a characteristic of the object identified by the primary key.

Page 76: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Attribute = Column = Field

Each attribute (column) in a table has a distinct name, called the attribute name.

Page 77: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Attribute = Column = Field

Every entry in a column contains a value for that column only, and the values are of the same data type.

Page 78: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Attribute = Column = Field

The order (position) of the columns in relation to each other is unimportant.

Page 79: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Tuple = Row = Record

The entries in each column of any row must be single valued.

Page 80: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Tuple = Row = Record

The order of the rows is unimportant.

Page 81: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Tuple = Row = Record

Each row is unique; it differs from all other rows in the table.

Page 82: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 316 Acct 316 Acct 316 Acct 316 Acct 316 Acct 316

Acct 3

16 A

cct 3

16 A

cct 3

16

How does a database

differ from a spreadsheet

?

Page 83: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 316 Acct 316 Acct 316 Acct 316 Acct 316 Acct 316

Acct 3

16 A

cct 3

16 A

cct 3

16

How might an accountant’s

familiarity with the tabular

representation of spreadsheets

facilitate or hinder learning how to use a relational DBMS?

Page 84: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 316 Acct 316 Acct 316 Acct 316 Acct 316 Acct 316

Acct 3

16 A

cct 3

16 A

cct 3

16

Importance of a Well-Structured Relational Database

4

Ch

ap

ter

Page 85: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 316 Acct 316 Acct 316 Acct 316 Acct 316 Acct 316

Acct 3

16 A

cct 3

16 A

cct 3

16

Anomalies that may occur in non-normalized relational tables.

Page 86: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 316 Acct 316 Acct 316 Acct 316 Acct 316 Acct 316

Acct 3

16 A

cct 3

16 A

cct 3

16

Normalization! Anomalies! WOW! You accountants are an odd lot!

What is normalization? Is anything normal

around here?

Page 87: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 3

16 A

cct 3

16 A

cct 3

16

Normalization

A technique used to make complex databases more efficient by removing undesirable redundancy.

Break one large table into several smaller tables.

Page 88: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Normalization

Normalization starts with the assumption that everything is initially stored in one large table.

A set of rules is then followed to decompose that initial table into a set of normalized tables.

The objective is to produce a set of tables that are in what is called third normal form (3NF)

Page 89: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 3

16 A

cct 3

16 A

cct 3

16

Normalization

Problems caused by redundancy:

Storage inefficiencies

Processing inefficiencies

Errors

Page 90: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 3

16 A

cct 3

16 A

cct 3

16

Update Anomaly

When changes (updates) to data values are not correctly recorded.

Page 91: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 3

16 A

cct 3

16 A

cct 3

16

Insert Anomaly

There is no way to store information about one entity in the database without it being associated with another entity

Page 92: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 3

16 A

cct 3

16 A

cct 3

16

Delete Anomaly

Unintended results arising from deleting a row of data pertaining to one entity and resulting in the deletion of data regarding another entity as well.

Page 93: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 316 Acct 316 Acct 316 Acct 316 Acct 316 Acct 316

Acct 3

16 A

cct 3

16 A

cct 3

16

Database Design

4

Ch

ap

ter

Page 94: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter
Page 95: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 3

16 A

cct 3

16 A

cct 3

16

Approaches to Database Design

Normalization

Starts with the assumption that all data is initially stored in a large non-normalized table.

This table is then decomposed using a set of normalization rules to create a set of tables in the Third Normal Form.

Page 96: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 3

16 A

cct 3

16 A

cct 3

16

Approaches to Database Design

Semantic Data Modeling

The database designer uses his/her knowledge about the business structure to create a set of relational tables.

Page 97: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 3

16 A

cct 3

16 A

cct 3

16

Database Design Objectives

Completeness

Relevance

Accessibility

Up-to-dateness flexibility

Page 98: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 3

16 A

cct 3

16 A

cct 3

16

Database Design Objectives

Efficiency

Cost-effectiveness

Integrity

Security

Page 99: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 3

16 A

cct 3

16 A

cct 3

16

Database Systems and theFuture of Accounting

Database systems have the potential to significantly alter the nature of external reporting.

Page 100: Acct 316 Acct 316 Acct 316 Relational Databases 4 UAA – ACCT 316 Accounting Information Systems Dr. Fred Barbee Chapter

Acct 3

16 A

cct 3

16 A

cct 3

16

Database Systems and theFuture of Accounting

Perhaps the most significant effect of database systems will be in the way that accounting information is used in decision making.