Chapter 12 Report - Final
-
Upload
princessa-lopez-masangkay -
Category
Documents
-
view
222 -
download
0
Transcript of Chapter 12 Report - Final
-
7/31/2019 Chapter 12 Report - Final
1/8
12. 1 General Structure of Accounting System
Database Management Systems (DBMS) is a collection of software designed to manage the data in
response to instructions issued by application programs or requests made by users.
In an accounting system using a database, the application programs interact with the database
management, and the database management system, in turn, interfaces with the data stored in a database.The development if database management system requires highly skilled information technology
specialist. Therefore, this software is purchased commercially rather than developed in-house.
Advantages & Disadvantages of Database
Advantages:
Data Integration. Data elements can be combined in virtually limitless ways, providing theillusions of files if varying content and format. Different application programs and the interactivequeries can the same data in different configurations as needed. With a database, it is much easierto bring data together to help in making business decisions. Data integration is the one feature of
a database that makes it far superior to conventional files. Program and Data Independence. Application programs are independent of physical structure the
data they process. The physical structure can be changed without necessitating a change in
application program. Also make it easy for users to retrieve data.
Programming Simplification. When conventional files are used, most of the responsibility for
designing the storage data and retrieval methods and file-related processes was borne by the
application developers. Database management systems, on the other hand, are normally supplied
with all storage, retrieval and similar processes already in place. Access to data is provided by
standardized languages available in the database management system. these statements can easily
be embedded in the program code, thereby simplifying the writing of application programs. The
database management, not the application program, contains the description of the data in the
database.
Data Quality and Efficiency. Each data element is stored only once, and multiple programs can
access every data element as needed.
Data Security. User who do not have legitimate need for specific data are prohibited from
accessing the data. Another program or user may be permitted to add records but not delete them.
Disadvantages
Increased Hardware Requirements. A database management system places heavy demands on the
central processing unit because of its large number of instructions, thereby creating a need for
greater processing power.Secondary storage may need to be increased to accommodate access
linkages such as index files. Required Technical Skills. Requires application developers and information system personnel
have database technical skills.
Difficult Conversion from Conventional files. The data formerly resided in independent data files
must be must be restructured for inclusion in the database.
-
7/31/2019 Chapter 12 Report - Final
2/8
Vulnerability to System Failure. Every application depends on the database management system.
Elaborate measures have to be taken to protect the data from system crash or malfunction and to
provide for speedy recovery if the database is damaged or destroyed
Potential for Error Contamination. Precludes easy isolation & correction of erroneous data
12.2 How Database Management System Works
How Database Management System Works?
Through application programs
Through a query language
Through the forms and reports facilities of the database management system
Application Programs are written in standard programming languages such as COBOL, Visual Basic,
and C. Application developers embed query language statements to help in the processing of data. A
Query Language is a High-level, English-like Language. It includes commands for opening files,
inserting records, deleting records, or changing the value of data elements. A second way, through aQuery language, enables user to make ad hoc, spur-of-the-moment request from a computer. The third
way that users can interface with a database is through the forms and reports facilities. Forms are
generally used to input data into the database. Reports are used to display data stored in the database.
Users can create their own forms and reports or accept the default ones created automatically
12.3 Database Architecture
Database Architecture is the collection of large-scale qualities that give the database its unique style.
Logical and Physical Data Structure
Logical structure is the way the data are thought about, or viewed, by users. Physical structure is
the way the data are physically stored on storage devices.
Three-level Architecture of a Database
EXTERNAL LEVEL is the way the data elements are viewed logically by individual users. A user
generally is interested in only a portion of the entire database.
CONCEPTUAL LEVEL is the logical view of all data.
INTERNAL LEVEL is the physical implementation of the conceptual level. It is the physical structure
of all data.
-
7/31/2019 Chapter 12 Report - Final
3/8
12.4 Data Relationships
The logical structure of a database consists not only of data elements but also the complex
relationships among data elements.
Relationship a connection or interaction , between tables
- Gives additional meaning to the dataTypes of Relationship:
One-to-One Relationship
- One record in the first table matches only one record in the second table
One-to-Many Relationship
- One record in the first table matches many records in the second table ,but record in
the second table matches only one record in the first table
Many-to-Many Relationship
- One record in the first table matches many records in the second table ,and one
record in the second table matches many records in the first table
12.5 Schemas and Subschemas
Schemas exist at all three levels in the database architecture : the external , conceptual and
internal levels.
Schema
The logical view of the data if the schema is at the external level or the conceptual
level , or the physical view of the data if the schema is at the internal level
The relationships among the data
The domains for the data elements
The business rules apply to the data
Conceptual Schema is for the entire database and is at the conceptual level of the database architecture
External subschema
- a subset of the conceptual schema that is required by a particular application program
or user
- depicts the external level of the database architecture
Internal subschema
- describes how the conceptual schema is implemented physically
- Specifies how data are stored at the level of stored records , stored record formats ,
indexes , hashing algorithms , pointers , block sizes , and storage media
- depicts the internal level of the database architectureMapping the process of making a data element in one schema correspond to an element in another
schema
Mapping can be done at two levels:
1. Conceptual-Internal Mapping defines the correspondence between the conceptual view and
the stored database
2. External Conceptual Mapping - defines the correspondence between a particular external
view and the conceptual view
-
7/31/2019 Chapter 12 Report - Final
4/8
Data Definition Language (DDL) software subroutines of the data base management system product
that defines the external and conceptual schemas
Domain a set of all possible values a data element can have
Business Rules constraints on business activities that can be enforced by the database or application
programs
12.6 Data Dictionary
Data Dictionary a special file , stored in the database itself , which provides metadata on the data
elements stored in the database
12.7 Database Administrator
Database administrator (DBA) is responsible for planning, organizing, and maintaining the database
to satisfy users needs. The DBA typically is supported by a staff. The preferred position of the DBA in
the organizational structure is a staff position to the director of information services.
12.8 Logical Data Models
12.8a Relational Model
Most contemporary databases are based on the relational model.
The relational model is easy to build and permits data relationship to be defined on an ad hoc
basis, making it very flexible.
Its operational power and simplicity enable non-technical users to retrieve data without the help
of an application developer, and users can build and implement relational databases.
The relational model is an application of the mathematical framework of set of theory and has
emerged largely as the result of the work of the mathematician E.F.Codd which is supported byrelational algebra and calculus.
Codds formula uses the terms relation, turple (which rhymes with couple), and attribute,
but in practice other words are often used to mean the same things.
12.8b Object-oriented Model
Another type of database which is able to handle maps, graphs, images, audio, and video, as well
as the familiar text and numbers.
Whereas the relational model contains a collection of records stored in a file, an object-oriented
model contains objects.
Real-world objects, such as sales invoice, an employee, or a graph, are represented by database
objects. Each object is a self-contained unit including data and instructions for processing thedata, such as multiply quantity sold times unit sales price in the sales invoice object.
12.8c Combined Object and Relational Models
In the late 1996 and early 1997, vendors start releasing object-oriented database management
systems that combined object-oriented features with the high performing relational databases. These
databases are on the verge of use by a number of innovative organizations but have not yet entered the
mainstream.
-
7/31/2019 Chapter 12 Report - Final
5/8
12.9 Components of a Relational Database
12.9a Tables
In the relational model, data are perceived by the user to be arranged in simple tables with rows
and columns.
An important feature of the tables in the relational database is that the tables can be related to oneanother.
The table gives users the illusion of distinct files.
12.9b Primary Keys
Each table in a relational database consists of records composed of primary key and related
(nonkey) data elements.
A primary key is one or a group of data elements that uniquely identifies a record.
The primary key may be a single data element, in which case it is called a simple key.
The key may be the combination of two or more data elements, in which case it is called a
composite key, compound key, orconcatenated key.
12.9c Index Keys A key is used as a unique identifier that must be assigned when tables are designed. However,
when database is implemented, another type of key called the index key, comes into play.
An index key is a data element on which the database management system builds an index file to
improve the performance of the database.
Whereas primary keys are unique, index keys may or may not be unique.
12.9d Foreign Keys
A Foreign key is the primary key of a table that is placed in another table so the tables can be
joined.
The rules in locating foreign keys in the tables are:
In a one-to-one relationship, it generally does not matter in which table the foreign keyis placed.
In a one-to-many relationship, the foreign key must be placed in the many side of the
relationship
In a many-to-many relationship, a connecting table must be created to break the
relationship into two one-to-many relationships so the above rule for that relationship
applies.
12.10 Relational Operations
The operations display (not store) new tables containing only the information you want. The
common operations performed on tables in an accounting system include:
Selection
Projection
Join
Union
Intersection
Difference
-
7/31/2019 Chapter 12 Report - Final
6/8
12.10a Selection
Selection displays a new table with only the desired rows from a single source table whosecolumns meet prescribed conditions. The new table will have fewer rows than the source table but thesame number of columns. A request for customers whose current balance is more than $4,000 willproduce the following table:
12.10b Projection
Projection displays a new table with only the desired columns from a single source table. Thenew table will have fewer columns than the source table but the same number of rows. A request for thenames of all customers and their current balances will produce the following table:
Name
Current
BalLeeds Hotel 4,500
Franklin Resorts 0
Lee 6,200ManchesterCamp 2,900
12.10c Selection and Projection
Selection and projection used in combination displays a new table with only the desired columnsof the desired rows from a single source table. The new table will have both fewer rows and columns thanare in the source table. A request for the name of the customer and the customers current balance if thecurrent balance is more than $4,000 will display the ff. new table:
Name
Current
Bal
Leeds Hotel 4,500
Lee 6,20012.10d Join
Join is the operation that materializes the 1:1, 1:*, or *:* relationships between tables. Joindisplays a new table from two source tables that have different columns except for one column that is thesame. This same column is the primary key in one table and the foreign key in another table. The newtable is based on a match of the common column in the two source tables. Join is probably the mostfrequently used operation in accounting systems. Suppose that we have the ff. source tables and we want
to join every customer name with the customers outstanding invoice or invoices:
CUSTCO
DE NameCurrentB
al
C200LeedsHotel 4,500
C220 Lee 6,200
INVOICENO
CUSTCODE
100050 C220
100051 C230
100052 C200INVOICE
NO CUSTCODE Name
100050 C220 Lee
100051 C230Manchester
Camp
100052 C200 Leeds Hotel
-
7/31/2019 Chapter 12 Report - Final
7/8
12.e Union
For the next three operations union, intersection, and difference to work, the tables must beunion compatible. This means that each table must have the same number of columns, and the
corresponding columns must come from the same domain. The illustrations for these three operations willbe performed on the following two source tables:
CUSTCODE CustName
C200 East Bank
C210 St. Agnes Hospital
C220 Spark Manufacturing
C230 National Petroleum
Union displays a new table from two source tables that have the same columns. The new tablemost likely will be longer than either of the two source tables because it will contain all rows from both
source tables; however, duplicate rows will be eliminated. The new table will contain the same columns.
CUSTCODE CustName
C200 East Bank
C210 St. Agnes Hospital
C220 Spark Manufacturing
C230 National Petroleum
C190 West Bank
C202 St. William Hospital
12.10f Intersection
Intersection also displays a new table from two source tables that have the same columns. Thenew table most likely will be shorter than either of the two source tables because it will contain only thoserows that exist in exactly the same way in both source tables. The new table will have the same columnsas are in the two source tables.
CUSTCODE CustName
C220 Spark Manufacturing
C230 National Petroleum
12.10g Difference
Difference also displays a new table from two source tables that have the same columns. The new
table most likely will be shorter than either of the two source tables because it contains only rowsoccurring in the first source table but not in the second table.
CUSTCODE CustName
C200 East Bank
C210 St. Agnes Hospital
CUSTCODE CustName
C190 West Bank
C202 St. William Hospital
C220 Spark Manufacturing
C230 National Petroleum
-
7/31/2019 Chapter 12 Report - Final
8/8
12.11 Queries and Outputs
The table in a relational database, if designed properly, will provide all the information needed toprint documents, such as sales (customer) invoice, financial statements, and all other types of output
needed by the users of the accounting system whether planned in advance or requested on the spur of themoment. Data elements that are not stored in a database but instead are calculated on demand from otherdata elements that are stored in the database are called virtual data elements.
To be able to print the invoice, we would first need to create and run a query that joins the tablesand then multiplies the quantity of each product sold by its selling price. In these queries, we would usethe relational operations, such as selection, projection, and join. Next, we would use the report facility ofthe database management system to design an invoice. The invoice would be populated with the result ofthe query and data elements from the various tables that should appear on the invoice. The invoice designwould take care of totaling the amounts for subtotal and total due.
We can also generate the financial statements by designing queries and reports. For example, tocalculate the amount of sales to go on the income statement, a query would multiply the quantity of each
product sold in the invoice line table by its selling price in the inventory table and sum the amounts for aparticular time period. A report would be created for the income statement and would include the result ofthis query.
An important feature of a relational database management system is that it not only can performthe typical accounting system functions such as recording and processing transactions and other eventsand producing output, such as invoices and financial statements, but the data stored in the database can beretrieved in any combination that we need, when we need it. A second way (other than using SQL) that auser can query a database is to use a database management system feature called query by example. Thisis a graphical interface that allows users to enter the results of what they are looking for. The databasemanagement systems query facility constructs the appropriate SQL statements to send to the databaseengine.
12.12 Association between Tables and Files
Accountants often speak of files instead of database tables because a file is our logical view of thedata in the database. We visualize the data in terms of the four types of files mentioned in Chapter 3 reference file, open file, transaction file, and master file. Sometimes one database comprises on file, andsometimes it takes more than one database table to comprise the logical file.
Assuming that no calculated amounts are stored, the number of on-demand calculations that willhave to be made in an accounting system are immense. Therefore, for the sake of fast response, manyamounts in accounting systems that could be calculated are, in fact, stored.