0% found this document useful (0 votes)
27 views42 pages

Class 05

Uploaded by

ab.a.m.riaz
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)
27 views42 pages

Class 05

Uploaded by

ab.a.m.riaz
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/ 42

DATABASE SYSTEMS

Database Systems:
Over the past 50 years, a number of different
approaches or models have represented accounting
information systems. Each new model evolved
because of the shortcomings and limitations of its
predecessor. An interesting feature in this evolution
is that the newest technique does not immediately
replace older models. Thus, at any point in time,
various generations of systems exist across different
organizations and may even coexist within a single
enterprise.
Database Systems
The modern auditor needs to be familiar with
the operational features of all AIS approaches
that he or she is likely to encounter. This chapter
deals with four such models:
❖ The Manual processes,
❖ The Flat-file systems,
❖ The database approach,
❖ The database management system.
The Manual process model
The manual process model is the oldest and most
traditional form of accounting systems. Manual systems
constitute the physical events, resources, and
personnel that characterize many business processes.
This includes such tasks as order-taking, warehousing
materials, manufacturing goods for sale, shipping goods
to customers, and placing orders with vendors.
This model also includes the physical task of record
keeping that is manually. Manual procedures facilitate
to understand the internal control activities, including
segregation of functions, supervision, independent
verification, audit trails, and access controls.
The Flat-File Model
The flat-file approach is most often associated
with so-called legacy systems (outdated
systems). These are large mainframe systems
that were implemented in the late 1960s
through the 1980s.
Organizations today still use these systems
extensively. The flat-file model describes an
environment in which individual data files are
not related to other files. End users in this
environment own their data files rather than
share them with other users.
Many so-called legacy (outdated) systems are
characterized by the flat-file approach to data
management. In this environment, users own their
data files. Exclusive ownership of data is a natural
consequence of two problems associated with the
legacy-system era.
➢ The first is a business culture that erects barriers
between organizational units that inhibit entity-
wide integration of data.
➢ The second problem stems from limitations in
flat-file management technology that require
data files to be structured to the unique needs of
the primary user.
Figure: Flat-File Data Management
Flat-File Data Management
In the above figure, the file contents are represented
conceptually with letters. Each letter could signify a single
data attribute (field), a record, or an entire file. Note also
that data element B is present in all user files. This is
called data redundancy and is the cause of three types of
data management problems:
(1) Data storage,
(2) Data updating, and
(3) Currency of information.
Each of these, as well as a fourth problem, task-data
dependency, which is not directly related to data
redundancy will be examined next.
The Database Approach
The most obvious change from the flat-file model is
the pooling of data into a common database that is
shared by all the users. Thus flat-file problems
solved, because data sharing (the absence of
ownership) is the central concept of the database
approach. The followings are characteristics of
database:
▪ No data redundancy
▪ Single update
▪ Current values
▪ Task-data independence
The Database Management System
The purpose of the DBMS is to provide
controlled access to the database. The DBMS is
a special software system that is programmed to
know which data elements each user is
authorized to access. The user’s program sends
requests for data to the DBMS, which validates
and authorizes access to the database in
accordance with the user’s level of authority.
The DBMS will deny requests for data that the
user is unauthorized to access.
Difference between File system & DBMS
File system DBMS
1. File system is a collection of data. Any 1. DBMS is a collection of data and
management with the file system, user has user is not required to write the
to write the procedures procedures for managing the
2. File system gives the details of the data database.
representation and Storage of data. 2. DBMS provides an abstract view of
3. In File system storing and retrieving of data data that hides the details.
cannot be done efficiently. 3. DBMS is efficient to use since there
4. Concurrent access to the data in the file are wide varieties of sophisticated
system has many problems like a. Reading techniques to store and retrieve
the file while other deleting some the data.
information, updating some information 4. DBMS takes care of Concurrent
5. File system doesn’t provide crash recovery access using some form of locking.
mechanism. Eg. While we are entering some 5. DBMS has crash recovery
data into the file if System crashes then mechanism, DBMS protects user
content of the file is lost. from the effects of system failures.
6. Protecting a file under file system is very 6. DBMS has a good protection
difficult mechanism.
Data Independence
Data independence can be defined as the capacity
to change the schema at one level without changing
the schema at next higher level. There are two
types of data Independence. They are :
1. Logical data independence.
2. Physical data independence.
❖ Logical data independence is the capacity to
change the conceptual schema without having to
change the external schema.
❖ Physical data independence is the capacity to
change the internal schema without changing the
conceptual schema.
When not to use a DBMS
▪ Main inhibitors (costs) of using a DBMS
▪ High initial investment and possible need for additional
hardware.
▪ Overhead for providing generality, security, concurrency
control, recovery, and integrity functions When a DBMS
may be unnecessary
▪ If the database and applications are simple, well defined
and not expected to change.
▪ If there are stringent real-time requirements that may not
be met because of DBMS overhead.
▪ If access to data by multiple users is not required.
▪ If the database system is not able to handle the complexity
of data because of modeling limitations
▪ If the database users need special operations not
supported by the DBMS.
Types of Databases and Database Applications
❑ Traditional Applications:
Numeric and Textual Databases
❑ More Recent Applications:
Multimedia Databases
Geographic Information Systems (GIS)
Data Warehouses
Real-time and Active Databases
Many other applications
Data Model
A model is an abstraction process that hides
superfluous details. Data modeling is used for
representing entities of interest and their
relationship in the database. Data model is a
collection of concepts that can be used to
describe the structure of a database which
provides the necessary means to achieve the
abstraction. The structure of a database means
that holds the data.
Types of Data Models

1. High Level- Conceptual data model.


2. Low Level – Physical data model.
3. Relational or Representational
4. Object-oriented Data Models
5. Object-Relational Models
➢ High Level-conceptual data model: User level data model is the
high level or conceptual model. This provides concepts that are
close to the way that many users perceive data.
➢ Low level-Physical data model : provides concepts that describe
the details of how data is stored in the computer model. Low level
data model is only for Computer specialists not for end-user.
➢ Representation data model: It is between High level & Low level
data model Which provides concepts that may be understood by
end-user but that are not too far removed from the way data is
organized by within the computer.
➢ In Object Oriented Data Model, data and their relationships are
contained in a single structure which is referred as object in this
data model. In this, real world problems are represented as objects
with different attributes.
➢ The Object-Relational data model refers to a combination of a
Relational database model and an Object-Oriented database model.
As a result, it supports classes, objects, inheritance, and other
features found in Object-Oriented models, as well as data types,
tabular structures, and other features found in Relational Data
Models.
Schemas versus Instances
“Schema” and “Instance” are key ideas in a database
management system (DBMS) that help organize and manage
data. A schema can be referred to as the blueprint of the
database while an instance is the actual contents of the
database at a given point of time.

What is Schema?
Schema is the overall description of the database. The basic
structure of how the data will be stored in the database is
called schema. In DBMS, the term schema refers to the
architecture of the database which describes how it will
appear or will be constructed. It describes the organization of
data such as tables, relationships as well as constraints. A
schema is a template that dictates how data items in a
database will be stored, arranged, and accessed.
Example
Let’s say a table teacher in our database named
school, the teacher table requires the name,
dob, and doj in their table so we design a
structure as:
Teacher table
Name: String
Doj: date
Dob: date
Types of Schema

Schema is of three types: Logical Schema,


Physical Schema and view Schema.
• Logical Schema – It describes the database
designed at a logical level.
• Physical Schema – It describes the database
designed at the physical level.
• View Schema – It defines the design of the
database at the view level.
What is Instance?
An instance of DBMS refers to real data in a
database coming at some particular point in
time. Instance on the other hand refers to the
content in the database in as much as it refers to
the structure defined under a particular schema
at a given point.
Example
Let’s say a table teacher in our database whose
name is School, suppose the table has 50
records so the instance of the database has 50
records for now and tomorrow we are going to
add another fifty records so tomorrow the
instance has a total of 100 records. This is called
an instance.
Difference Between Schema and Instance

Schema Instance
It is the overall description of the It is the collection of information
database. stored in a database at a particular
moment.
The schema is same for the whole Data in instances can be changed
database. using addition, deletion, and
updating.
Does not change Frequently. Changes Frequently.
Affects the entire database structure. Affects only the current state of data.
Requires significant effort and Easily altered by
planning to change. performing CRUD (Create, Read,
Update, Delete) operations.
Table structures, relationships, Data entries, records in tables.
constraints.
DBMS Languages
• A DBMS has appropriate languages and
interfaces to express database queries and
updates.
• Database languages can be used to read, store
and update the data in the database.
Types of Database Languages
Data Definition Language (DDL)
• DDL stands for Data Definition Language. It is used to
define database structure or pattern.
• It is used to create schema, tables, indexes, constraints, etc.
in the database.
• Using the DDL statements, you can create the skeleton of
the database.
• Data definition language is used to store the information of
metadata like the number of tables and schemas, their
names, indexes, columns in each table, constraints, etc.

Here are some tasks that come under DDL:


Create: Alter: Drop: Truncate: Rename: Comment:
Data Manipulation Language (DML)
▪ DML stands for Data Manipulation Language.
It is used for accessing and manipulating data
in a database. It handles user requests.
Here are some tasks that come under DML:

Select: Insert: Update: Delete: Merge: Call:


Explain Plan: Lock Table:
Data Control Language (DCL)
• DCL stands for Data Control Language. It is
used to retrieve the stored or saved data.
• The DCL execution is transactional. It also has
rollback parameters.

Here are some tasks that come under DCL:


Grant: Revoke:
Transaction Control Language (TCL)
• TCL is used to run the changes made by the
DML statement. TCL can be grouped into a
logical transaction.

Here are some tasks that come under TCL:


Commit: Rollback:
Database Design Process
The organization’s database is its physical
repository for financial and nonfinancial data.
We use the term database in the generic sense.
It can be a filing cabinet or a computer disk.
Figure 4.4. presents a breakdown of the
database environment into four primary
elements: users, the DBMS, the database
administrator, and the physical database.
Users
Users access the database in two ways.
✓ The first is via user application programs that
systems professionals prepare. These programs
send data access requests (calls) to the DBMS,
which validates the requests and retrieves the
data for processing.
✓ The second method of database access is via
direct query, which requires no formal user
programs. The DBMS has a built-in query facility
that allows authorized users to process data
independent of professional programmers.
Database Management System
The DBMS provides a controlled environment to
assist (or prevent) user access to the database
and to efficiently manage the data resource.
Database Management Systems (DBMS)
are software systems used to store, retrieve, and
run queries on data. A DBMS serves as an
interface between an end-user and a database,
allowing users to create, read, update, and
delete data in the database.
Database Administrator
The Database Administrator (DBA) is responsible for managing the
database resource. Multiple users sharing a common database require
organization, coordination, rules, and guidelines to protect the integrity
of the database. In large organizations the DBA function may consist of
an entire department of technical personnel under the database
administrator. In smaller organizations someone within the computer
services group may assume DBA responsibility. The duties of the DBA
fall into the following areas:
➢ database planning,
➢ database design,
➢ database implementation,
➢ database operation and maintenance, and
➢ database change and growth.
The Physical Database
This is the lowest level of the database. The
physical database consists of magnetic spots on
magnetic disks. The other levels of the database
(for example, the user view, conceptual view,
and internal view) are abstract representations
of the physical level. At the physical level, the
database is a collection of records and files.
Types of Database Model
• Hierarchical database model.
• Relational model.
• Network model.
• Object-oriented database model.
• Entity-relationship model.
• Document model.
• Entity-attribute-value model.
• Star schema.
The Relational (REA) Database Model
REA is an accounting framework for modeling an
organization’s critical resources, events, and agents (REA)
and the relationships between them. Once specified,
both accounting and non- accounting data about these
phenomena can be identified, captured, and stored in a
relational database. From this repository, user views can
be constructed that meet the needs of all users in the
organization. The availability of multiple views allows
flexible use of transaction data and permits the
development of accounting information systems that
promote, rather than inhibit, integration. The REA model
was proposed in 1982 as a theoretical model for
accounting.
A system is relational if it:
➢ Represents data in the form of two-
dimensional tables such as the database table,
called Customer,
➢ Supports the relational algebra functions of
restrict, project, and join.
These three algebra functions are examined in
the following section.

Restrict: Project: Join:

Although restrict, project, and join is not the


complete set of relational functions, it is a useful
subset that satisfies most business information
needs.
The Elements of REA Database Model

Resources Events

Agents(Entities)

You might also like