[go: up one dir, main page]

0% found this document useful (0 votes)
196 views14 pages

Chapter 9 - Database Management Systems

This chapter discusses database management systems and their advantages over traditional flat file data storage. It covers database concepts like relationships between data, data normalization to reduce anomalies, and the stages of database design. The key aspects of relational databases are explained, including how data is organized into tables and linked using primary and foreign keys. Normalization is introduced as a process to reduce data anomalies by splitting tables into multiple relational tables.

Uploaded by

Kim Ella
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
196 views14 pages

Chapter 9 - Database Management Systems

This chapter discusses database management systems and their advantages over traditional flat file data storage. It covers database concepts like relationships between data, data normalization to reduce anomalies, and the stages of database design. The key aspects of relational databases are explained, including how data is organized into tables and linked using primary and foreign keys. Normalization is introduced as a process to reduce data anomalies by splitting tables into multiple relational tables.

Uploaded by

Kim Ella
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

ACCO20153 - ACCOUNTING INFORMATION SYSTEM

by: James Hall

CHAPTER 9
DATABASE MANAGEMENT SYSTEMS

Objectives:
● Problems inherent in the flat-file approach to data management that gave rise to the
database concept
● Relationships among the defining elements of the database environment
● Anomalies caused by unnormalized databases and the need for data normalization
● Stages in database design: entity identification, data modeling, constructing the physical
database, and preparing user views
● Features of distributed databases and issues to consider in dealing on a particular
database configuration

Flat-File vs. Database Environments


● Computer processing involves two components: data and instructions (programs)
● Conceptually, there are two methods for designing the interface between program
instructions and data:
▪ File-oriented processing – A specific data file was created for each application
▪ Data-oriented processing – Create a single data repository to support
numerous applications
● Disadvantages of file-oriented processing include redundant data and varying formats
for storing and redundant data.

Flat-File Environment

User 1
Transactions Data
A, B, C

User 2
Transactions

X, B, Y

User 3
Transactions
L. B, M
Data Redundancy and Flat-File Problems

● Data Storage – creates excessive storage costs of paper documents and/or magnetic
form
● Data Updating – any changes or additions must be performed multiple times

CHAPTER 9 - DATABASE MANAGEMENT SYSTEMS


ACCO20153 - ACCOUNTING INFORMATION SYSTEM
by: James Hall
● Currency of Information – potential problem of failing to update all affected files
● Task-Data Dependency – user’s inability to obtain additional information as his or her
needs change

Database Approach
User 1 Database
Transactions

User 2
Transactions

User 3
Transactions

Advantages of the Database Approach

Data sharing/centralized database resolves flat-file problems:

● No data redundancy: Data is stored only once, eliminating data redundancy and
reducing storage costs
● Single Update: Because data is in only one place, it requires only a dingle update,
reducing the time and cost of keeping the database current
● Current values: A change to the database made by any user yields current data values
for all other users.
● Task-data independence: As users’ information needs expand, the new needs can be
more easily satisfied than under the flat-file approach

Disadvantages of the Database Approach

● Can be costly to implement


▪ Additional hardware, software, storage, and network resources are required
● Can only run in certain operating environments
▪ May make it unsuitable for some system configurations
● Because it is so different from the file-oriented approach, the database approach
requires training users

CHAPTER 9 - DATABASE MANAGEMENT SYSTEMS


ACCO20153 - ACCOUNTING INFORMATION SYSTEM
by: James Hall
▪ May be inertia or resistance

Internal Controls and DBMS


● The database management system (DBMS) stands between the user and the database
● Thus, commercial DBMS’s (e.g., Access or Oracle) actually consist of a database plus…
▪ Plus software to manage the database, especially controlling access and other
internal controls
▪ Plus software to generate reports, create data-entry forms, etc.
● The DBMS has special software to know which data elements each user is authorized to
access and deny unauthorized requests of data

CHAPTER 9 - DATABASE MANAGEMENT SYSTEMS


ACCO20153 - ACCOUNTING INFORMATION SYSTEM
by: James Hall

DBMS Features
● Program Development – user created applications
● Backup and Recovery – copies database
● Database Usage Reporting – captures statistics on database usage (who, when, etc.)
● Database Access – authorizes access to sections of the database
▪ User Programs – makes the presence of the DBMS transparent to the user
▪ Direct Query – allows authorized users to access data without programming

Data Definition Language (DDL)


● DDL is a programming language used to define the database
● It identifies the names and the relationship of all data elements, records, and files
that constitute the database.
● DDL defines the database on three viewing levels
⮚ Internal view – physical arrangement of records (1 view)
⮚ Conceptual view (schema) – representation of database (1 view)
⮚ User view (subschema) – the portion of the database each user views (many
views)

CHAPTER 9 - DATABASE MANAGEMENT SYSTEMS


ACCO20153 - ACCOUNTING INFORMATION SYSTEM
by: James Hall

Data Manipulation Language (DML)


● DML is the proprietary programming language that a particular DBMS uses to retrieve,
process, and store data to/from the database
● Entire user programs may be written in the DML, or selected DML commands can be
inserted into universal programs, such as COBOL and FORTRAN
● Can be used to ‘patch’ third party applications to the DBMS

Query Language
● The query capability permits end users and professional programmers to access data in
the database without need for conventional programs

CHAPTER 9 - DATABASE MANAGEMENT SYSTEMS


ACCO20153 - ACCOUNTING INFORMATION SYSTEM
by: James Hall
⮚ Can be an internal control issue since users may be making an ‘end run’ around
the controls built into the conventional programs
● IBM’s structured query language (SQL) is a fourth-generation language that has
emerged as the standard query language
⮚ Adopted by ANSI as the standard language for all relational databases

Database Conceptual Models


● Refers to the particular method used to organize records in a database a.k.a. “logical
data structures”
● Objective: develop the database efficiently so that the data can be accessed quickly and
easily
● There are 3 main models: hierarchical (tree structure), network, relational
● Most existing databases are relational. Some legacy systems use hierarchical or network
databases

CHAPTER 9 - DATABASE MANAGEMENT SYSTEMS


ACCO20153 - ACCOUNTING INFORMATION SYSTEM
by: James Hall
The Relational Model
● The relational model portrays data in the form of a two dimensional ‘table’.
● Its strength is the ease with which tables may be linked to one another.
⮚ A major weakness of hierarchical and network databases.
● Relational model is based on the relational algebra functions of restrict, project, and join

Associations and Cardinality


● Association – the labeled line connecting two entities or tables in a data model
⮚ Describes the nature of the between them
⮚ Represented with a verb, such as ships, requests, or receives
● Cardinality – the degree of association between two entities
⮚ The number of possible occurrences in one table that are associated with a
single occurrence in a related table
⮚ Used to determined primary keys and foreign keys

CHAPTER 9 - DATABASE MANAGEMENT SYSTEMS


ACCO20153 - ACCOUNTING INFORMATION SYSTEM
by: James Hall

Properly Designed Relational Tables


● Each row in the table must be unique in at least one attribute, which is the primary key.
⮚ Tables are linked by embedding the primary key into the related table as a foreign
key.
● The attribute values in any column must all be of the same class or data type
● Each column in a given table must be uniquely named
● Tables must conform to the rules of normalization or anomalies

3 Types of Anomalies
● Insertion Anomaly – A new item cannot be added to the table until at least one entity
uses a particular attribute item
● Deletion Anomaly – If an attribute item used by only one entity is deleted, all
information about that attribute item is lost
● Update Anomaly – A modification on an attribute must be made in each of the rows in
which the attribute appears
● Anomalies can be corrected by creating additional relational tables

CHAPTER 9 - DATABASE MANAGEMENT SYSTEMS


ACCO20153 - ACCOUNTING INFORMATION SYSTEM
by: James Hall
Advantages of Relational Tables
● Removes all 3 types of anomalies
● Various items of interest (customers, inventory, sales) are stored in separate tables
● Space is used efficiently
● Very flexible – users can form ad hoc relationships

The Normalization Process


● A process which systematically splits unnormalized complex tables into smaller tables
that meet 2 conditions:
⮚ All non-key (secondary) attributes in the table are dependent on the primary key
⮚ All non-key attributes are independent of the other non-key attributes
● When unnormalized tables are split and reduced to third normal form, they must then be
linked together by foreign keys

Accountants and Data Normalization


● Update anomalies can generate conflicting and obsolete database values
● Insertion anomalies can result in unrecorded transactions and incomplete audit trails

CHAPTER 9 - DATABASE MANAGEMENT SYSTEMS


ACCO20153 - ACCOUNTING INFORMATION SYSTEM
by: James Hall
● Deletion anomalies can cause the loss of accounting records and the destruction of audit
trails
● Accountant should understand the data normalization process and be able to determine
whether a database is properly normalized

Six (6) Phases in Designing Relational Databases


1. Identity Entities
⮚ Identify the primary entities of the organization
⮚ Construct a data model of their relationships
2. Construct a data model showing entity associations
⮚ Determine the associations between entities
⮚ Model associations into an ER diagram
3. Add primary keys and attributes
⮚ Assign primary keys to all entities in the model to uniquely identify records
⮚ Every attribute should appear in one or more user views
4. Normalize and add foreign keys
⮚ Remove repeating groups, partial and transitive dependencies
⮚ Assign foreign keys to be able to link tables
5. Construct the physical database
⮚ Create physical tables
⮚ Populate tables with data
6. Prepare the user views
⮚ Normalized tables should support all required views of system users
⮚ User views restrict users from have access to unauthorized data

Distributed Data Processing (DDP)


● Data processing is organized around several information processing units (IPUs)
distributed throughout the organization
⮚ Each IPU is placed under the control of the end user
● DDP does not always mean total decentralization
⮚ IPUs in a DDP system are still connected to one another and coordinated
⮚ Typically, DDP’s use a centralized database
⮚ Alternatively, the database can be distributed, similar to the distribution of the
data processing capability

CHAPTER 9 - DATABASE MANAGEMENT SYSTEMS


ACCO20153 - ACCOUNTING INFORMATION SYSTEM
by: James Hall

Centralized Databases in DDP Environment


● The data is retained in a central location
● Remote IPUs send requests for data
● Central site services the needs of the re\mote IPUs
● The actual processing of the data is performed at the remote IPU

Advantages of DDP
● Cost reductions in hardware and data entry tasks
● Improved cost control responsibility
● Improved user satisfaction since control is closer to the user level
● Backup of data can be improved through the use of multiple data storage sites

Disadvantages of DDP
● Loss of control
● Mismanagement of resources

CHAPTER 9 - DATABASE MANAGEMENT SYSTEMS


ACCO20153 - ACCOUNTING INFORMATION SYSTEM
by: James Hall
● Hardware and software incompatibility
● Redundant tasks and data
● Consolidating incompatible tasks
● Difficulty attracting qualified personnel
● Lack of standards

Data Currency
● Occurs in DDP with a centralized database
● During transaction processing, data will temporarily be inconsistent as records are read
and updated
● Database lockout procedures are necessary to keep IPUs from reading inconsistent data
and from writing over a transaction being written by another IPU

Distributed Databases: Partitioning


● Splits the central database into segments that are distributed to their primary users
● Advantages:
⮚ Users’ control is increased by having data stored at local sited
⮚ Transaction processing response time is improved
⮚ Volume of transmitted data between IPUs is reduced
⮚ Reduces the potential data loss from a disaster

The Deadlock Phenomenon


● Especially a problem with partitioned databases
● Occurs when multiple sites lock each other out of data that they are currently using
⮚ One site needs data locked by another site
● Special software is needed to analyze and resolve conflicts
⮚ Transactions may be terminated and restarted

Distributed Databases: Replication


● The duplication of the entire database for multiple IPUs
● Effective for situations with a high degree of data sharing, but no primary user
⮚ Supports read-only queries
● Data traffic between sites is reduced considerably

Concurrency Problems and Control Issues


● Database concurrency is the presence of complete and accurate data at all IPU sites
● With replicated databases, maintaining current data at all locations is difficult
● Time stamping is used to serialize transactions

CHAPTER 9 - DATABASE MANAGEMENT SYSTEMS


ACCO20153 - ACCOUNTING INFORMATION SYSTEM
by: James Hall
⮚ Prevents and resolves conflicts created by uploading data at various IPUs

Distributed Databases and the Accountant


● The following database options impact the organization’s ability to maintain database
integrity, to preserve audit trails, and to have accurate accounting records
⮚ Centralized or distributed data?
⮚ If distributed, replicated or partitioned?
⮚ If replicated, totally or partially replication?
⮚ If partitioned, what allocation of the data segments among the sites?

Review Questions:
1. Give five general duties of the database administrator.
2. What are the four primary elements of the database environment?
3. How are the network and hierarchical models different?
4. What flat-file data management problems are solved as a result of using the database
concept?
5. What are four ways in which database management systems provide a controlled
environment to manage user access and the data resources?
6. Explain the relationship between the three levels of the data definition language. As a user,
which level would you be most interested in?
7. What is a primary key?
8. What is a foreign key?
9. What is a data dictionary, and what purpose does it serve?
10. Give an application for a partitioned database.
11. What is an entity?
12. Give an application for a replicated database.
13. Discuss and give an example of the following types of associations: (1:0,1), (1:1), (1:M), and
(M:M).
14. Distinguish between association and cardinality.
15. Explain how a separate linking table works in a many-to-many association.
16. What are the four characteristics of properly designed relational database tables?
17. What do the relational features restrict, project, and join mean?
18. What are the conditions for the third normal form (3NF)?

CHAPTER 9 - DATABASE MANAGEMENT SYSTEMS


ACCO20153 - ACCOUNTING INFORMATION SYSTEM
by: James Hall
19. Explain how the SELECT and WHERE commands help a user to view the necessary data
from multiple database files (tables).
20. What is a data model?
21. How can a poorly designed database result in unintentional loss of critical records?
22. What is a user view?
23. Does a user view always require multiple tables to support it? Explain.
24. What two conditions must valid entities meet?
25. Can two different entities have the same defining attributes? Explain.

CHAPTER 9 - DATABASE MANAGEMENT SYSTEMS

You might also like