Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
19 views30 pages

Organizing and Manipulating Data

This document discusses organizing and manipulating data in databases, specifically focusing on Microsoft Access and its database management system (DBMS). It covers creating database tables, entering data, ensuring data accuracy, and extracting information through queries and SQL. Additionally, it highlights the importance of data mining and online analytical processing (OLAP) for analyzing complex data relationships.

Uploaded by

morrbinta001
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)
19 views30 pages

Organizing and Manipulating Data

This document discusses organizing and manipulating data in databases, specifically focusing on Microsoft Access and its database management system (DBMS). It covers creating database tables, entering data, ensuring data accuracy, and extracting information through queries and SQL. Additionally, it highlights the importance of data mining and online analytical processing (OLAP) for analyzing complex data relationships.

Uploaded by

morrbinta001
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/ 30

Organizing and Manipulating Data in Databases

Pa Modou Khan – w100240016


Introduction

• This chapter focuses on ways to use databases in AISs and the actual construction of a functioning
database in Microsoft Access.

• We begin with a discussion of the software used to create databases, in essence, database
management system and then describe how to implement Access database tables in practice.

• Next, we discuss how to retrieve data from a database.

• Finally, we examine a few special types of databases and current advances in database technology.
Creating Database Tables in Microsoft Access using Database
Management Systems

• When you are ready to actually create database tables and input records, this is where the task is completed using a
database management system.
• Database management System (DBMS) is a software that enables users to create database records, delete records,
query records (select subsets of records for viewing or analysis), alter database information, and recognize records as
needed.
• A DBMS is not a database. Rather, it is separate computer program that enables users to create, modify, and utilize a
database of information efficiently.
• This enables organizations to change record structures, queries, and report formats without also having to reprogram the
accounting software that access the database items
Database Management Systems (DBMS) Continue….

Examples of Microcomputer DBMS packages include;


• Microsoft Access
• Alpha 5
• dQuery
• Filemaker Pro
• Lotus Approach

Examples of DBMSs that run on client/server systems or mainframes includes;


• Microsoft SQL Server
• DB2
• Oracle
• MySQL
• Sybase Ingrus
• Supra
An Introduction to Microsoft Access

• Microsoft Access is a popular database that many businesses and individuals use for small database applications

• The procedures for creating tables and entering records in several alternative database systems are similar to those used in

Access.

• After launching Access, click on the “Blank database” on the top portion of the screen.

• A panel will appear on the right side of your screen asking you to name your database.

• The default name “Database1.accdb.” You can rename your database to something else.

• Next is to decide where to store the database. Look to the right of the file name textbox and find the folder.
Illustration
Creating Database Tables

• Database tables stores data for specific entities such as customers, vendors, or employee.

• To illustrate how to create tables in Access, let’s create a table of employee payroll.

• The ribbon across the top shows seven tabs: File, Home, Create, External data, Database Tools, Fields, and Table.

• Define a record structure for your table before entering data in your database.

• Click on Create on the ribbon to create a table. The default name “Table1” will appear on the left portion of the screen. You should

include the prefix “tbl” in any name you create for a table.

• To illustrate how to create table in Access, we are going to create a table of employee payroll records.
tblPayroll Masterfile

To define a record format, begin typing the name of the first


data field you wish to create- ‘SocSecNum” in the upper left
portion of the screen.

When you do the following three columns will appear in the


area of the screen:

1. Field Name (Required)

2. Data Type (Required)

3. Description (Optional)
Field Name, Data Type, and Description

1 Field names are the names you assign to the data fields in your record. You can embedded blanks in the field names and
capitalized selected letters in the name as desired. 1) Used names that help you remember their use such as “Zip code” and
2) Don’t use excessively long names. You can use the same filed name in each of the two tables . Field names are completely
independent of each other in different tables.

2 For each data field you create in a table, you must also specify a data type. The data type tells Access how to store the data- for
example, as a text, a number, yes/no, memo, or a date/time. Each data field you specify in a table also include a set of Field
properties whose values appear at the lower portion of the screen. This include settings such as Field size, Format, and Input
Mask.

The last item you can create for each data field in a table is its description. This is an optional field that you can ignore when
3 defining record structures.
Identifying Primary Keys

• A Primary Key is the data field in each record that uniquely identifies the record.

• After you have defined the data fields in your table, you should designate a primary key.

• For the Payroll file example, we will use the employee’s Social Security Number (SocSecNum) as Primary Key

• One way to set the primary key is to click on the name of this field and then select “Primary Key” icon from the banner at the top the

screen.

• Another way is to right click on the field with your mouse and select “Primary Key” from the set of choices in the drop- down list.
Creating Relationships
After creating your tables, it is
important to know how to create
relationships between the tables.
These relationships link tables
together. They also enables users to
create multiple reports.

1 Select tables, select


“Relationship” from the
“Database Tools” tab.

To link the two tables together,


2 drag and drop the Department
Code name from either table to the
similar name in the other table.
Entering Data in a Database

• After specifying the names, data types, sizes, descriptions, and primary key for the data fields in our table, you can
create individual records for it. To do so, you must switch to datasheet view from the View Menu.

• Begin by entering data in the row with the asterisk* and use the tap key to transition from data field to data field.

• If you make mistake while entering data, you can use your backspace key or delete key to rectify it.

• Also, you can delete an entire record by clicking on the first column to select an entire row and then hitting the

delete key.
Entering Data in Database Tables continue..
Ensuring Valid and Accurate Data Entry

• The data definition Language of DBMS enables its users to define the record structure of any particular database

table tab. Well -conceived record structures can serve as controls over the accuracy of critical accounting data.

• Using Microsoft Access, one input control is inherent in the data type that you assign to a particular data field. If

you create a data field as a number type, Access will reject all character inputs that are not numbers.

• Input Mask, Default values, Drop-Down Lists, Validating Rules are some of the features for ensuring valid and

accurate data entry


Ensuring Valid and Accurate Data Entry continue..

1 Input Mask. Input Masks limit users to particular types of data in specific formats- for
examples, “123-45-6789” for a Social Security Number, and “(123)456-7890” for a telephone
number, or “8/9/10” for a date. The DBMS interprets these symbols as input requirements and
acts accordingly. Input Masks help users input data correctly in databases by indicating a
general input format, thereby reducing data entry errors.
Default Values. A third control over the accuracy of data entry is to specify a default value
2 for the data fields of new records. For example, a payroll program could include the
number ‘‘40’’ in the hours-worked data field for all employees who typically work 40 hours
each week. Again, default values help guard against input errors as well as speed data
entry
3 Drop-Down Lists. Database systems such as Access 2010 enable you to use similar boxes
for your tables or form. Although such boxes are convenient alternatives to typing data
manually, they also control input errors because they limit user entries to valid inputs.
Ensuring Valid and Accurate Data Entry continue..

4 Validation Rules One of the most versatile data-entry controls is the ability to create custom
validation tests using a validation rule. Using Microsoft Access, for example, you create such
rules as a record-structure property of a data field.

5 Referential Integrity. A final data-entry control is to enforce referential integrity in


relational database tables. This feature controls certain inconsistencies among the records
in relational tables. Database management systems make it easy to enforce referential
integrity. In Access, for example, you simply check a box in the Edit Relationships dialog
window at the time that you create the relationship
Tips for Creating Database Tables and Records

• Design first; create tables and records last

• Name tables systematically and use conventional tbl prefixes


• Use mnemonic names for data fields

• Assign correct data types to data fields

• Data fields that link tables together must be the same data type.

• Limit the size of data fields to reasonable lengths.

• Use input masks


Extracting Data from Databases: Data Manipulating Languages

• The totality of the information in a database and the relationship between its tables are called the database
Schema. Thus, the Schema is a map or plan of the entire database.
• Using the previous Payroll example, the schema would be all the information that a company might store about
employees pay details.
• Any particular user or application program will normally be interested in only a subset of the information in a
database. This limited access is a subschema, or view. For example, one subschema for our payroll database might
be information required for an employees’ name, overtime, department.
• The term schema and subschema describe a simple idea- the distinction between the design of a database on one
hand and the use of a database on the other.

• The goal is to design a database schema that is flexible enough to create all of the subschema required
by users.
Creating Select Queries

• A payroll manager wants to know which employees are eligible to receive year-
end bonuses, or a purchasing agent of a manufacturing company needs to
know what inventory balances are below their reorder point. What this
individuals have in common is the need for specific information from one or
more database tables.

• Queries allow database developers to create customized subschemas. For


example, using the Employee payroll database, you might want to 1) look up for
something about a specific employee, 2) change the information in a specific
record, 3) delete a specific record. A dynaset is dynamic subset of a database
that you create with such queries and the purpose of a data manipulation
Language (DML) is to help create such dynaset.
Case-in-Point

• Internal auditors are charged with evaluating internal controls, operational


efficiency, business risks, and other critical factors for success. The volume of
data that internal auditors examine has expanded rapidly over the past decade,
and internal auditors are developing new tools and testing procedures to detect
risks and operational inefficiencies in complex environments. Conducting
database queries is now a valuable and important skill for internal auditors. One
example of modern application of queries by internal auditors involves
employee phone records. Firms can analyze the phone calls made by their
employees in order to reduce telecommunications costs and ensure compliance
with policies related to telecommunications. Queries of long-distance call
records allow internal auditors to detect misuse of phone services
One-Table Select Queries
• A select query creates a dynaset of database information based on two types of
user-specified criteria: (1) criteria that determine which records to include and
(2) criteria that determine which data fields to include from those records. You
can create several types of queries with Access 2010. One is a simple filter query
that references only one table. Another combines the information from several
tables. A third type is an action query.
• Single Criterion. To create a simple filter query, first click the Create tab on the
main menu bar. In the Create menu, click ‘‘Query Design.’’ Access will display a
small dialog box that allows you to select the table(s) on which to base your
query.
• Multiple Criteria. It is also possible to specify multiple criteria in a query
Single Criterion Query continue..
Creating Action Queries

• Although most queries simply extract information from database tables, some accounting tasks require users to update or delete
multiple records in a single operation. Microsoft Access supports the action queries listed below

• Delete queries. Enables you to delete table records selectively. Examples include the ability to delete employees who have left the
organization, students who drop out of school or graduate from school, or inventory products no longer sold by the company.

• Append queries. Enables you to append records from one table to the end of another table. Accounting examples include the ability to
add the payroll records for the current period to a year-to-date table or to consolidate the employees from two departments into a
single table.

• Update queries. Enables you to alter selected table records systematically. Accounting examples include the ability to raise all
suggested retail prices of a particular product line by 10%, lower the salaries of all those employees with a low performance rating by
5%, or add a fixed handling charge to all customer purchases over a set limit.

• Make-table queries. Enables you to create a new table from the records that you select in an existing table. For example, a university
might want to create a separate table of all graduating seniors. Auditors might use this query is to create a separate table of all
records that have been deleted in order to maintain an audit trail.
Guidelines for creating Queries
1. Spell accurately and be sensitive to capitalization. The criteria for Access select queries are case sensitive. For
example, you will not get matches if you specify California licenses as ‘‘Cal’’ or ‘‘Ca’’ in a criteria line if the entries in the
underlying database table are ‘‘CA.’’
2. Specify AND andAND operation), enter the criteria on the same line of your query. If you want a query to satisfy either
of two conditions (i.e., perform an OR operation), place them on successive criteria lines.
3. OR operations correctly. If you want a query to satisfy two conditions simultaneously (i.e., perform an Tables must be
joined properly. If you wish to construct a multitable query, the tables should first be joined properly in the Access
Relationships window.
4. Name queries systematically. Query names should begin with the standard ‘‘qry’’ prefix. It also helps to assign
mnemonic query names—for example, ‘‘qryCustomers _in_California’’ or ‘‘qryGraduating_Seniors.’’

5. Choose data fields selectively. Double clicking on the asterisk (∗) in the data field list of a table (e.g., the first symbol
in each of the three table lists in Figure 4-15) enables you to include all the data fields from that table in your query.
Because most commercial database tables have many data fields, using this option can result in a large number of
data fields (i.e., columns in the lower portion of your query).
Structured Query Language

• In addition to using a DML in a DBMS, you can also access selected information from a database using a data
query language. The American National Standards Institute (ANSI) has adopted standards for one such query
language: structured query language (SQL). This language is important because most relational databases
such as Access support it.
• SQL is a useful tool for auditors because understanding SQL allows an auditor to retrieve data
from many database systems, both small and large. In most contemporary business
environments, an auditor can no longer retrieve data from paper reports. Instead, data must be
acquired from the computerized accounting information system. SQL allows a user to specify the
table and fields that the user wants to retrieve, using commands such as FROM, SELECT, and
WHERE. FROM identifies the table source and SELECT chooses the data fields to include in the
query. The WHERE command can specify criteria, such as selecting sales orders in excess of a
specified dollar amount.
Online Analytical Processing and Data Mining

• Online Analytical Processing (OLAP). OLAP involves using data-extraction tools to obtain complex information that describes what
happened and also why it happened. Several software developers now market OLAP packages. Examples include Integration Server
(Arbor Software), Holos (Seagate Technology), PowerDimensions (SyBase), Plato (Microsoft), and WhiteLight (WhiteLight Systems). Some
of these tools work only with specific databases, while others interface with several of them. Most allow end users to perform their own
database analyses, including data mining (discussed shortly) and creating pivot tables, which are two-dimensional statistical summaries of
database information (and similar to the pivot tables in Microsoft Excel)

• Data Mining. Closely connected to OLAP is the concept of data mining, which means using a set of data analyses and
statistical tools to detect relationships, patterns, or trends among stored data. For example, data mining tools might
enable an auditor to find falsified invoices or overstated revenues. Data mining can help advertisers to cross-sell products
or offer tie-in promotions, help retailers decide product placements in their stores (e.g., placing snacks near the frozen
pizza section), and help sales managers increase customer satisfaction. Because data mining tools can sift through
massive amounts of corporate data to detect patterns, they can be particularly effective tools for firms seeking to better
understand their customers or their cost drivers. A wide variety of software tools now provide data mining capabilities, and
many data mining tools are included in OLAP software, database software, and artificial intelligence algorithms. In
addition, users can purchase specific software packages for data mining tasks—for example, Darwin (Oracle), Intelligent
Miner (IBM), Enterprise Miner (SAS), or Clementine (SPSS)
Recent Databases Advances and Data Warehouses

• Cloud computing is a form of Internet-based computing. Instead of applications being stored on individual workstations,
software is provided through the Internet, processing occurs on a Web of computers, and information is ultimately sent to
the user’s computer.
• Cloud computing allows companies to expand their IT capabilities without investing in significant hardware, software, or
training. All that is necessary is a subscription to a service that offers the software and processing capabilities that the firm
needs
• The use of cloud computing is expanding rapidly in small businesses and large corporations because of its low costs,
scalability, and simplicity relative to creating inhouse systems.
• Another common example of cloud computing involves backup services—that is, creating duplicate copies of critical data
for security purposes. Just as individual users can backup files on synchronized external hard disks, businesses can contract
with such vendors as Carbonite, Mozy, and SOS to create similar backups over the Internet. These vendors can often
perform the same backup tasks less expensively and more reliably, and of course, such contracts shift the security
responsibility from the database owner to the Internet vendor. But such cloud computing also carries risks—in particular,
the danger of relying upon an external party to protect sensitive data as well as properly maintaining the backups
Data Warehouses

• Where feasible, it often makes sense to pool the data from separate applications into a large, common body of information called a data
warehouse

• The data in a data warehouse are rarely current. Rather, they are typically ‘‘older information’’ that was initially collected for other reasons during
the conduct of normal operations and daily activities of an organization. For example, in recording a sale, an AIS collects data about the customer,
the product, the timing of the sale, and so on. Extended histories of this information can be helpful in predicting things such as future sales of new
products. In order to analyze large volumes of historical data, the data must first be amassed in a central location—the data warehouse

• To be useful, the data in data warehouses should have the following characteristics: (1) free of errors, (2) defined uniformly, (3) span a longer time
horizon than the company’s transaction systems, and (4) optimized data relationships that allow users to answer complex questions—for example,
queries requiring information from several diverse sources.

• One advantage of a data warehouse is to make organizational information available on a corporate-wide basis. For example, the marketing
representatives of a company can gain access to the company’s production data and thereby be better able to inform customers about the future
availability of desired, but as yet unmanufactured, products
Summary

✓ Database management systems (DBMSs) enable users to create their own databases using data definition
languages (DDLs) and manipulate file data using data manipulation languages (DMLs)

✓ Designers can integrate a variety of data-validation techniques to help ensure data integrity. Examples
include choosing data types carefully for data fields, using input masks, using default values, creating a wide
variety of validation rules, and enforcing referential integrity

✓ Microsoft Access is a popular database management system that small businesses can use to create
complete accounting systems. The chapter illustrated the techniques you can use to create database tables
and records with this software

✓ An important use of databases is to extract selected information from it, and Access provides a number of
tools for constructing select queries and action queries. These tools allow users to extract data from a single
table or from multiple tables. Following the guidelines in this chapter can help you avoid errors when creating
such queries.

✓ Two additional ways of extracting information from databases are using structured query language (SQL) and
online analytical processing (OLAP) tools.

✓ Users can also manipulate database information by sorting, indexing, using data mining tools, or performing
specialized tasks with end-user programming languages

✓ Accountants are likely to need to extract data from a database or data warehouse at one time or another,
using data manipulation languages such as queries, OLAP, or data mining tools. Cloud computing and data
mining are changing the design and delivery of database management systems
Thank You

You might also like