Chapter 4 AIS
Chapter 4 AIS
DATABASES
C
Learning outcomes
• Understand the database systems and relational
database
• First Let’s examine some basic principles about how data are
stored in computer systems.
– An entity is anything about which the organization wishes to store
data.
– Assume you have a company, one entity would be the customer.
Customers
Phone Registration
Customer ID Last Name First Name Number Date
Customers
Customers
Phone Registartion
Customer ID Last Name First Name Number Date
Customers
Phone Registration
Customer ID Last Name First Name Number Date
Student Store
File File
Advisor
File
• A database is an organized collection of data
stored and accessed electronically.
• Small databases can be stored on a file system,
– while large databases are hosted on computer
clusters or cloud storage. Multiple location
IN JU; SRS
GOOGLE Database = data + base
APPLE It is a collection of any data.
Written
Video
Image
Graphics….
© 2006 Prentice Hall Business Publishing Accounting Information Systems, 10/e Romney/Steinbart
• Data management
– Is a resource
– approach to data management
• legacy systems (flat-file) approach
• Database approach
© 2006 Prentice Hall Business Publishing Accounting Information Systems, 10/e Romney/Steinbart
FILE VS. DATABASES
• Database systems were developed to address
the problems associated with the proliferation
of master files.
– For years, each time a new information need arose,
companies created new files and programs.
– The result: a significant increase in the number of
master files.
Database
Management
System
application
Database
Management
programs that access
System the database is
referred to as the
Sales
Department
Shipping
Department
Billing
Department database
system.
FILE VS. DATABASES
• The person responsible
Database
Fact A Fact B for the database is the
Fact C Fact D
Fact E Fact F database administrator.
• As technology improves,
many large companies
Database are developing very
Management
System large databases called
data warehouses.
Sales Shipping Billing
Department Department Department
ADVANTAGES OF DATABASE SYSTEMS
Jr.
38%
Database
Logical View—User A Logical View—User B
Enrollment by Class Scholarship Distribution
Fr.
5%
Sr. Soph.
33% 24%
Jr.
38%
DBMS
The operating system
Operating translates DBMS
System requests into
instructions to
physically retrieve
data from various
Database disks.
• The DBMS handles the link between the physical and
logical views of the data.
– Allows the user to access, query, and update data
without reference to how or where it is physically
stored.
– The user only needs to define the logical data
requirements.
• Separating the logical and physical views of data also
means users can change their conceptualizations of the
data relationships without making changes in the
physical storage.
• The database administrator can also change the physical
storage of the data without affecting users or application
programs.
Database
Fact A Fact B
Fact C Fact D
Fact E Fact F
Database
Management
System
© 2006 Prentice Hall Business Publishing Accounting Information Systems, 10/e Romney/Steinbart
• Accountants are frequently involved in developing
conceptual- and external-level schema.
COURSES
Course ID Course Section Day Time
1234 ACCT-3603 1 MWF 8:30
1235 ACCT-3603 2 TR 9:30
1236 MGMT-2103 1 MW 8:30
STUDENT x COURSE
SCID Stude nt ID Course
333333333-1234 333-33-3333 1234
333333333-1236 333-33-3333 1236
111111111-1235 111-11-1111 1235
111111111-1236 111-11-1111 1235
STUDENTS Each row is
Last First Phone called a tuple,
Student ID Name Name No. which rhymes
333-33-3333 Simpson Alice 333-3333 with “couple.”
111-11-1111 Sanders Ned 444-4444
123-45-6789 Moore Artie 555-5555
COURSES
Course ID Course Section Day Time
1234 ACCT-3603 1 MWF 8:30
1235 ACCT-3603 2 TR 9:30
1236 MGMT-2103 1 MW 8:30
STUDENT x COURSE
SCID
333333333-1234
333333333-1236
111111111-1235
111111111-1236
Each row
STUDENTS
contains data
Last First Phone
about a specific
Student ID Name Name No.
occurrence of
333-33-3333 Simpson Alice 333-3333
the type of entity
111-11-1111 Sanders Ned 444-4444
in the table.
123-45-6789 Moore Artie 555-5555
COURSES
Course ID Course Section Day Time
1234 ACCT-3603 1 MWF 8:30
1235 ACCT-3603 2 TR 9:30
1236 MGMT-2103 1 MW 8:30
STUDENT x COURSE
SCID
333333333-1234
333333333-1236
111111111-1235
111111111-1236
STUDENTS Each column in
Last First Phone a table contains
Student ID Name Name No. information
333-33-3333 Simpson Alice 333-3333 about a specific
111-11-1111 Sanders Ned 444-4444 attribute of the
123-45-6789 Moore Artie 555-5555 entity.
COURSES
Course ID Course Section Day Time
1234 ACCT-3603 1 MWF 8:30
1235 ACCT-3603 2 TR 9:30
1236 MGMT-2103 1 MW 8:30
STUDENT x COURSE
SCID
333333333-1234
333333333-1236
111111111-1235
111111111-1236
TYPES OF ATTRIBUTES
• A primary key is the database attribute, or
combination of attributes, that uniquely
identifies a specific row in a table.
– Example: Item Number in inventory table
• A foreign key is an attribute in a table that is also
a primary key in another table and is used to link
the two tables.
• Other non-key attributes in a table store
important information about that entity.
© 2006 Prentice Hall Business Publishing Accounting Information Systems, 10/e Romney/Steinbart
STUDENTS
Last First Phone
Student ID Name Name No.
333-33-3333 Simpson Alice 333-3333
111-11-1111 Sanders Ned 444-4444
123-45-6789 Moore Artie 555-5555
COURSES
Course ID Course Section Day Time
1234 ACCT-3603 1 MWF 8:30
1235 ACCT-3603 2 TR 9:30
1236 MGMT-2103 1 MW 8:30
STUDENT x COURSE
A primary key is the attribute or
SCID
combination of attributes that
333333333-1234 uniquely identifies a specific
333333333-1236 row in a table.
111111111-1235
111111111-1236
STUDENTS
Last First Phone
Student ID Name Name No.
333-33-3333 Simpson Alice 333-3333
111-11-1111 Sanders Ned 444-4444
123-45-6789 Moore Artie 555-5555
COURSES
Course ID Course Section Day Time
1234 ACCT-3603 1 MWF 8:30
1235 ACCT-3603 2 TR 9:30
1236 MGMT-2103 1 MW 8:30
STUDENT x COURSE
SCID
333333333-1234 In some tables, two or more attributes
333333333-1236 may be joined to form the primary key.
111111111-1235
111111111-1236
Students
First Advisor
Student ID Last Name Name Phone No. No.
333-33-3333 Simpson Alice 333-3333 1418
111-11-1111 Sanders Ned 444-4444 1418
123-45-6789 Moore Artie 555-5555 1503
ADVISORS
Advisor No. Last Name First Name Office No.
1418 Howard Glen 420
1419 Melton Amy 316
1503 Zhang Xi 202
1506 Radowski J.D. 203
ADVISORS
Advisor No. Last Name First Name Office No.
1418 Howard Glen 420
1419 Melton Amy 316
1503 Zhang Xi 202
1506 Radowski J.D. 203
ADVISORS
Advisor No. Last Name First Name Office No.
1418 How ard Glen 420
1419 Melton Amy 316
1503 Zhang Xi 202
1506 Radowski J.D. 203
• If Ned withdraws from all his classes and you eliminate all three of
his rows from the table, then you will no longer have a record of
Ned.
• If Ned is planning to take classes next semester, then you
probably didn’t really want to delete all records of him.
• This problem is referred to as a delete anomaly.
• Alternatives for Storing Data
– Another possible approach would be to store each
student in one row of the table and
• create multiple columns to accommodate each class
that he is taking.
Last First Phone
Student ID0 Name Name No. Class 1 Class 2 Class 3 Class 4
COURSES
Course ID Course Section Day Time
1234 ACCT-3603 1 MWF 8:30
1235 ACCT-3603 2 TR 9:30
1236 MGMT-2103 1 MW 8:30
© 2006 Prentice Hall Business Publishing Accounting Information Systems, 10/e Romney/Steinbart
STUDENTS
Last First Phone
Student ID Name Name No.
333-33-3333 Simpson Alice 333-3333
111-11-1111 Sanders Ned 444-4444
123-45-6789 Moore Artie 555-5555
COURSES
Course ID Course Section Day Time
1234 ACCT-3603 1 MWF 8:30
1235 ACCT-3603 2 TR 9:30
1236 MGMT-2103 1 MW 8:30
STUDENT x COURSE
SCID • Note that within each table, there are no
333333333-1234 duplicate primary keys and no null
333333333-1236 primary keys.
111111111-1235 • Consistent with the entity integrity rule.
111111111-1236
Student
First Advisor
Student ID Last Name Name Phone No. No.
333-33-3333 Simpson Alice 333-3333 1418
111-11-1111 Sanders Ned 444-4444 1418
123-45-6789 Moore Artie 555-5555 1503
ADVISORS
Advisor No. Last Name First Name Office No.
1418 Howard Glen 420
1419 Melton Amy 316
1503 Zhang Xi 202
1506 Radowski J.D. 203
COURSES
Course ID Course Section Day Time
1234 ACCT-3603 1 MWF 8:30
1235 ACCT-3603 2 TR 9:30
1236 MGMT-2103 1 MW 8:30
STUDENT x COURSE
• Add a course here.
SCID
• Leaves no blank spaces.
333333333-1234
333333333-1236
111111111-1235 • When a particular student enrolls for a
111111111-1236 particular course, add that info here.
• Deletion of a class for a student would cause the
elimination of one record in the student x class table.
– The student still exists in the student table.
– The class still exists in the class table.
– Avoids the delete anomaly.
STUDENTS
Last First Phone • Ned still
Student ID Name Name No. exists in
333-33-3333 Simpson Alice 333-3333 the
111-11-1111 Sanders Ned 444-4444 student
123-45-6789 Moore Artie 555-5555 table.
COURSES
Course ID Course Section Day Time
1234 ACCT-3603 1 MWF 8:30
1235 ACCT-3603 2 TR 9:30
1236 MGMT-2103 1 MW 8:30
STUDENT x COURSE
• Even if Ned was the only student in
SCID
the class, ACCT-3603 still exists in
333333333-1234
the course table.
333333333-1236
111111111-1235 • If Ned Sanders drops ACCT-3603,
111111111-1236 remove Ned’s class from this table.
Database Design Process
© 2006 Prentice Hall Business Publishing Accounting Information Systems, 10/e Romney/Steinbart
• Steps in database design include the following:
– Planning
© 2006 Prentice Hall Business Publishing Accounting Information Systems, 10/e Romney/Steinbart
• Steps in database design include the following:
– Planning
– Requirements analysis
© 2006 Prentice Hall Business Publishing Accounting Information Systems, 10/e Romney/Steinbart
• Steps in database design include the following:
– Planning
– Requirements analysis
– Design
© 2006 Prentice Hall Business Publishing Accounting Information Systems, 10/e Romney/Steinbart
• Steps in database design include the following:
– Planning
– Requirements analysis
– Design
– Coding
© 2006 Prentice Hall Business Publishing Accounting Information Systems, 10/e Romney/Steinbart
• Steps in database design include the following:
– Planning
– Requirements analysis
– Design
– Coding
– Implementation
© 2006 Prentice Hall Business Publishing Accounting Information Systems, 10/e Romney/Steinbart
Planning Stage
Coding Stage
© 2006 Prentice Hall Business Publishing Accounting Information Systems, 10/e Romney/Steinbart
• Accountants can and should participate in all stages
of the database design process, although
participation varies between stages.
– Planning stage
– Requirements analysis and design stages
• Accountants participate in:
– Identifying user needs
– Developing logical schemas
– Designing data dictionary
– Specifying controls
© 2006 Prentice Hall Business Publishing Accounting Information Systems, 10/e Romney/Steinbart
• Accountants can and should participate in all stages
of the database design process, although
participation varies between stages.
– Planning stage
– Requirements analysis and design stages
– Coding stage
• Accountants with good AIS skills may
participate in coding.
© 2006 Prentice Hall Business Publishing Accounting Information Systems, 10/e Romney/Steinbart
• Accountants can and should participate in all stages
of the database design process, although
participation varies between stages.
– Planning stage
– Requirements analysis and design stages
– Coding stage
– Implementation stage
Accountants help test accuracy of database and
application programs
© 2006 Prentice Hall Business Publishing Accounting Information Systems, 10/e Romney/Steinbart
• Accountants can and should participate in all stages
of the database design process, although
participation varies between stages.
– Planning stage
– Requirements analysis and design stages
– Coding stage
– Implementation stage
– Operation and maintenance stage
© 2006 Prentice Hall Business Publishing Accounting Information Systems, 10/e Romney/Steinbart
The Resource, Event and Agent (REA) Data
Model
• The REA data model was developed specifically for
use in designing accounting information systems.
© 2006 Prentice Hall Business Publishing Accounting Information Systems, 10/e Romney/Steinbart
• Three Basic Types of Entities
– The REA data model is so named because it
classifies entities into three distinct categories:
• Resources that the organization acquires and uses.
© 2006 Prentice Hall Business Publishing Accounting Information Systems, 10/e Romney/Steinbart
• Three Basic Types of Entities
– The REA data model is so named because it
classifies entities into three distinct categories:
• Resources that the organization acquires and uses.
• Events in which the organization engages
© 2006 Prentice Hall Business Publishing Accounting Information Systems, 10/e Romney/Steinbart
Sales man
Inventory Sales
Customers
Customers
Cash Cash receiving
Cashiers
© 2006 Prentice Hall Business Publishing Accounting Information Systems, 10/e Romney/Steinbart
DATABASE SYSTEMS AND THE FUTURE OF ACCOUNTING
• Database systems may profoundly affect the fundamental
nature of accounting:
– May lead to abandonment of double-entry accounting,
• because the redundancy of the double entry is not
necessary in computer data processing.
• The use of accounting information in decision making will
be enhanced by:
– Powerful querying capabilities that accompany database
packages.
– The ability to accommodate multiple views of the same
underlying phenomenon.
– The ability to integrate financial and operational data.
• Accountants must become knowledgeable about
databases so they can participate in developing the
AIS of the future.
Any question?
Thank you!
85 01/01/2025