0% found this document useful (0 votes)
64 views33 pages

Relational Databases: Suggested Answers To Discussion Questions

This document provides suggested answers to discussion questions and problems related to relational databases from Chapter 4. The answers discuss key concepts like the logical vs physical view of data in a database, differences between spreadsheets and databases, arguments for and against abandoning double entry accounting in databases, and when real-time processing is necessary. Sample database schemas and queries are also provided as examples.

Uploaded by

Mikay Torio
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)
64 views33 pages

Relational Databases: Suggested Answers To Discussion Questions

This document provides suggested answers to discussion questions and problems related to relational databases from Chapter 4. The answers discuss key concepts like the logical vs physical view of data in a database, differences between spreadsheets and databases, arguments for and against abandoning double entry accounting in databases, and when real-time processing is necessary. Sample database schemas and queries are also provided as examples.

Uploaded by

Mikay Torio
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/ 33

To download more slides, ebook, solutions and test bank, visit http://downloadslide.blogspot.

com

CHAPTER 4

RELATIONAL DATABASES

SUGGESTED ANSWERS TO DISCUSSION QUESTIONS

4.1 The database approach is possible because of the database management system (DBMS). As shown
in Figure 4.2, the DBMS is a software program that sits between the actual data stored in the system
and the application programs that use the data. As shown in Figure 4.4, this allows users to separate
the way they view the data (called the logical view) from the way the data is actually stored (the
physical view). The DBMS interprets the users' requests and retrieves, manipulates, or stores the
data as needed. The two distinct views separate the applications from the physical information,
providing increased flexibility in applications, improved data security, and ease of use.

In a database system the manager will rarely, if ever, need to understand or be familiar with the
physical view of the data. In most instances, the internal auditor and the programmer will not need to
understand or be familiar with the physical view of the data. Most everything they do requires only an
understanding of the logical view of the data.

If accountants understand logical data structures and the logical view of the data they are better able
to draw the information they need from the database.

4.2 A major difference between spreadsheets and databases is that the former are designed primarily to
handle numeric data, whereas the latter can handle both text and numbers. Consequently, the query
and sorting capabilities of spreadsheets are much more limited than what can be accomplished with a
good query language and a DBMS. Accountants’ familiarity with spreadsheets might hinder their
ability to design and use relational DBMS because many links in spreadsheets are preprogrammed
and designed in, whereas a well-designed relational database is designed to facilitate ad-hoc queries.

4.3 There is no one correct answer to this question because the quality of an answer depends on the
justifications provided. Nevertheless, good answers should address the following:

Database technology does permit abandonment of double entry, but there will likely be great
resistance to such a radical change. Thus, students choosing this option need to present
reasons why they think such a radical change would succeed.

The use of a schema for accountants seems quite plausible. It does eliminate the redundancy of
double entry from the database system, yet it still provides the framework familiar and useful to
accountants and financial analysts.

There is a good possibility that double entry will remain, even in databases, due to inertia.
Indeed, most modern AIS, such as ERP systems, use databases but also retain the principles of
double entry.

4.4 On-line real-time processing is not necessary for every business transaction. For example, batch
processing is adequate for payroll: there is little need for the data to be current except on payday.
Real-time financial statements may be useful for planning and may provide management with better
ability to react to changes in the environment. Nevertheless, real-time financial statements may
present distorted pictures of reality if accruals have been ignored or not properly recognized.

4-1
To download more slides, ebook, solutions and test bank, visit http://downloadslide.blogspot.com

Ch. 4: Relational Databases

SUGGESTED ANSWERS TO THE PROBLEMS

4.1
a. Note that the problem does not say what the date is (date ordered, date shipped, etc) so
different assumptions can be made about the need date data.

To fill out a sales order, the sales order entry clerk needs access to the following data stored
in the data base
item number customer name
description customer name
quantity-on-hand shipping address
price credit limit

To create and mail a bill (invoice), the billing clerk needs access to the following data
stored in the data base:
customer name quantity sold
customer number price
billing address terms
item numbers

To manage inventory, the inventory control department needs access to the following data
stored in the data base:
item number quantity on hand.
description,

To purchase inventory, the purchasing department needs access to the following data
stored in the data base:
item number quantity on hand
description cost.

b. The set of necessary tables includes the following

Table Name Primary Key Foreign Keys Other Attributes


Inventory Item Number Cost (standard or list)
Description
Quantity on Hand
Price (standard or list)
Sales Invoice number Customer number Date of sale
Terms
Sales-Inventory Item number Quantity sold
Invoice number Price (actual sales price)
Customer Customer number Customer name
Shipping address
Billing address
Credit Limit

4-2
To download more slides, ebook, solutions and test bank, visit http://downloadslide.blogspot.com

Accounting Information Systems

4.2
a. DDL - this is the language used to define the database.

b DQL - this is an example of a query.

c DML - this is the language used to actually process transaction data and update the database.

d. DQL - another example of a task that involves querying the database.

e. DDL and DML - the former to alter the structure, the latter to make the change.

f. DQL - such a listing can be produced by a query.

g. DDL and DML - the former to add the field, the latter to enter data in it.

4.3 Below is a set of tables that answers parts a, b, and c.

There is no solution to parts d through f as students will select different software packages and come
up with different queries.

Table Name Primary Key Foreign Keys Other Attributes


Inventory Item Number Description
Quantity on Hand
Purchases Purchase order number Vendor number Date of purchase
Purchasing Agent Total amount of purchase
(employee number)
Purchases-Inventory Item number Quantity purchased
Purchase order number Unit cost (actual)
Extended amount
Vendor Vendor number Vendor name
Vendor address
Employees Employee number Employee name

Note: Extended amount and Total amount of purchase do not have to be stored in the data base as they can
be calculated from other values. Extended amount is Quantity purchased x Unit cost. Total amount of
purchase is the sum of all the extended amounts for all items on a particular purchase order,

4-3
To download more slides, ebook, solutions and test bank, visit http://downloadslide.blogspot.com

Ch. 4: Relational Databases

4.4
Answers depend upon the specific DBMS and query language used. Here are suggested answers in QBE
(Query By Example) prepared in Microsoft Access.

a. Query

Query Result

4-4
To download more slides, ebook, solutions and test bank, visit http://downloadslide.blogspot.com

Accounting Information Systems

b. Query

Query Result

4-5
To download more slides, ebook, solutions and test bank, visit http://downloadslide.blogspot.com

Ch. 4: Relational Databases

c. Query

Query Result

4-6
To download more slides, ebook, solutions and test bank, visit http://downloadslide.blogspot.com

Accounting Information Systems

d.
This question requires the use of a total invoice calculation, thus, a total invoice table is prepared as a
Microsoft “Make Table Query” in Microsoft Office. A Make Table Query is prepared exactly the
same as a normal query except that the user selects the Make Table Query option under the Query
Design menu tab.

Make Table Query

Table Result

4-7
To download more slides, ebook, solutions and test bank, visit http://downloadslide.blogspot.com

Ch. 4: Relational Databases

Query

Query Result

4-8
To download more slides, ebook, solutions and test bank, visit http://downloadslide.blogspot.com

Accounting Information Systems

e. Query

Query Result

4-9
To download more slides, ebook, solutions and test bank, visit http://downloadslide.blogspot.com

Ch. 4: Relational Databases

f. Query

Query Result

4-10
To download more slides, ebook, solutions and test bank, visit http://downloadslide.blogspot.com

Accounting Information Systems

g. Query

Query Result

4-11
To download more slides, ebook, solutions and test bank, visit http://downloadslide.blogspot.com

Ch. 4: Relational Databases

4.5 Answers depend upon the specific DBMS and query language used. Here are suggested answers in
QBE (Query By Example) prepared in Microsoft Access.

a. Query

Query Result

4-12
To download more slides, ebook, solutions and test bank, visit http://downloadslide.blogspot.com

Accounting Information Systems

b. Query

Query Result

4-13
To download more slides, ebook, solutions and test bank, visit http://downloadslide.blogspot.com

Ch. 4: Relational Databases

c. Query

Query Result

4-14
To download more slides, ebook, solutions and test bank, visit http://downloadslide.blogspot.com

Accounting Information Systems

d. Query

Query Result

4-15
To download more slides, ebook, solutions and test bank, visit http://downloadslide.blogspot.com

Ch. 4: Relational Databases

e. Query

Query Result

4-16
To download more slides, ebook, solutions and test bank, visit http://downloadslide.blogspot.com

Accounting Information Systems

f. Query

Query Result

4-17
To download more slides, ebook, solutions and test bank, visit http://downloadslide.blogspot.com

Ch. 4: Relational Databases

g. Questions g and i require the use of a total customer sales calculation, thus, a customer total
sales table is prepared as a Microsoft “Make Table Query” in Microsoft Office. A Make Table Query
is prepared exactly the same as a normal query except that the user selects the Make Table Query
option under the Query Design menu tab.

Make-Table Query

Table Result

4-18
To download more slides, ebook, solutions and test bank, visit http://downloadslide.blogspot.com

Accounting Information Systems

Query

Query Result

4-19
To download more slides, ebook, solutions and test bank, visit http://downloadslide.blogspot.com

Ch. 4: Relational Databases

h. Query

Query Result

4-20
To download more slides, ebook, solutions and test bank, visit http://downloadslide.blogspot.com

Accounting Information Systems

i. Query

Query Result

4-21
To download more slides, ebook, solutions and test bank, visit http://downloadslide.blogspot.com

Ch. 4: Relational Databases

i. Query

Query Result

4-22
To download more slides, ebook, solutions and test bank, visit http://downloadslide.blogspot.com

Accounting Information Systems

4.6 The necessary tables, with their attendant primary and foreign keys, are as follows:

Table Name Primary Key Foreign Keys Other Attributes


Employee Employee Number Supervisor number Employee name
(another employee Pay rate
number) Date hired
Date of birth
Skills Skill number Skill name
Employees-Skills Skill number Date skill acquired
Employee number

There is no solution to part c as students will select different software packages and enter different
data in the tables.

4.7 The following additional tables, with their attendant primary keys, are needed to store the other new
attributes. Note that customer name is already stored in the customer table

Table Name Primary Key Foreign Keys Other Attributes


Cash Receipts Cash Receipt Number Customer number Date of receipt
Employee processing Total amount received
payment (employee number)
Cash Receipts- Invoice payment applies Amount applied to a
Sales to (Invoice number) specific invoice
Cash Receipt number

There is no solution to part c as students will select different software packages and enter different
data in the tables.

4-23
To download more slides, ebook, solutions and test bank, visit http://downloadslide.blogspot.com

Ch. 4: Relational Databases

4.8 To avoid the update, insert, and delete anomalies in Table 4-17 (shown below), three separate
relational tables (Invoice Table, Invoice-Inventory Table, and Customer Table) are created.

TABLE 4-17

Invoice# Date OrderDate CustomerID CustomerName Item# Quantity

52 6-19-05 5-25-05 201 Johnson 103 5


52 6-19-05 5-25-05 201 Johnson 122 8
52 6-19-05 5-25-05 201 Johnson 10 11
52 6-19-05 5-25-05 201 Johnson 71 12
57 6-20-05 6-01-05 305 Henry 535 18
57 6-20-05 6-01-05 305 Henry 115 15
57 6-20-05 6-01-05 305 Henry 122 5

INVOICE TABLE

Invoice# Date OrderDate CustomerID

52 6-19-05 5-25-05 201


57 6-20-05 6-01-05 305

INVOICE-INVENTORY TABLE

Invoice# Item# (PK/FK) Quantity


(PK/FK)
52 103 5
52 122 8
52 10 11
52 71 12
57 535 18
57 115 15
57 122 5

CUSTOMER TABLE

CustomerID CustomerName

201 Johnson
305 Henry

Note: PK-Primary Key, FK – Foreign Key, PK/FK – Primary Key/Foreign Key

4-24
To download more slides, ebook, solutions and test bank, visit http://downloadslide.blogspot.com

Accounting Information Systems

4.9

TABLE 4-18

Purchase Purchase Part # Description Unit Quantity Vendor # Vendor Vendor


Order # Order Date Price Ordered Name Address
2 3/9/05 334 XYZ $30 3 504 KL Supply 75 Stevens Dr.
2 3/9/05 231 PDQ $50 5 504 KL Supply 75 Stevens Dr.
2 3/9/05 444 YYM $80 6 504 KL Supply 75 Stevens Dr.
3 4/5/05 231 PDQ $50 2 889 Oscan Inc 55 Cougar Cir.

PART TABLE

Part #(PK) Description Unit Price

334 XYZ 30
231 PDQ 50
444 YYM 80

PURCHASE ORDER TABLE

Purchase Order # (PK) Vendor #(FK) Purchase Order Date

2 504 3/9/05
3 889 4/5/05

VENDOR TABLE

Vendor #(PK) Vendor Name Vendor Address

504 KL Supply 75 Stevens Dr.


889 Oscan Inc. 55 Cougar Cir.

PURCHASE-PART TABLE

Purchase Order # Part # (PK/FK) Quantity Ordered


(PK/FK)
2 334 3
2 231 5
2 444 6
3 231 2

Note: PK-Primary Key, FK – Foreign Key, PK/FK – Primary Key/Foreign Key

4.10 The queries and the answers to the queries for the questions about the comprehensive problem
4-25
To download more slides, ebook, solutions and test bank, visit http://downloadslide.blogspot.com

Ch. 4: Relational Databases

data,(Table 4-19) are shown below.

a. Query

Query Result

4-26
To download more slides, ebook, solutions and test bank, visit http://downloadslide.blogspot.com

Accounting Information Systems

b. Query

Query Result

4-27
To download more slides, ebook, solutions and test bank, visit http://downloadslide.blogspot.com

Ch. 4: Relational Databases

c. Query

Query Result

4-28
To download more slides, ebook, solutions and test bank, visit http://downloadslide.blogspot.com

Accounting Information Systems

d. Query

Query Result

4-29
To download more slides, ebook, solutions and test bank, visit http://downloadslide.blogspot.com

Ch. 4: Relational Databases

e. Query

Query Result

4-30
To download more slides, ebook, solutions and test bank, visit http://downloadslide.blogspot.com

Accounting Information Systems

f. Query

Query Result

4-31
To download more slides, ebook, solutions and test bank, visit http://downloadslide.blogspot.com

Ch. 4: Relational Databases

g. Query

Query Result

4-32
To download more slides, ebook, solutions and test bank, visit http://downloadslide.blogspot.com

Accounting Information Systems

SUGGESTED ANSWERS TO THE CASES

4.1 Answers will depend on the students’ experience and the nature of the company selected. Be sure
that the students thoroughly address all issues raised in the case.

4.2 No single answer exists with this case; indeed, solutions will vary depending upon student
ingenuity and creativity. Reports should be graded in terms of how well each issue was addressed
and in terms of writing quality. Students should be able to find the following information:

Relational DBMS include DB2, Oracle, SQL Server and Access.

Many newer products are based on the object-oriented data model, or are a hybrid of the
relational and object-oriented approaches. Older mainframe DBMS are based on hierarchical
or network logical models.

Hierarchical and network DBMS often provide performance advantages, especially in terms of
processing speed. Those advantages, however, usually come at the cost of making it much
more difficult for end users to do ad-hoc queries of the database. Relational databases support
easy to use yet powerful query languages like SQL and graphical query-by-example languages
such as that provided by Microsoft Access. Object-oriented databases are especially effective
for including multimedia, whereas hierarchical, network, and relational databases are better
suited for alphanumeric data (although the relational model can be extended to include
multimedia data). Pure object-oriented databases are more often designed for special purpose
scientific use when graphical images and sound need to be stored in the database. Relational
and hybrid object-relational are commonly used in newer transaction processing systems,
although older systems are based on the hierarchical or network data models.

4-33

You might also like