Relational Databases: Suggested Answers To Discussion Questions
Relational Databases: Suggested Answers To Discussion Questions
com
CHAPTER 4
RELATIONAL DATABASES
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
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.
4-2
To download more slides, ebook, solutions and test bank, visit http://downloadslide.blogspot.com
4.2
a. DDL - this is the language used to define the database.
c DML - this is the language used to actually process transaction data and update the database.
e. DDL and DML - the former to alter the structure, the latter to make the change.
g. DDL and DML - the former to add the field, the latter to enter data in it.
There is no solution to parts d through f as students will select different software packages and come
up with different queries.
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
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
b. Query
Query Result
4-5
To download more slides, ebook, solutions and test bank, visit http://downloadslide.blogspot.com
c. Query
Query Result
4-6
To download more slides, ebook, solutions and test bank, visit http://downloadslide.blogspot.com
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.
Table Result
4-7
To download more slides, ebook, solutions and test bank, visit http://downloadslide.blogspot.com
Query
Query Result
4-8
To download more slides, ebook, solutions and test bank, visit http://downloadslide.blogspot.com
e. Query
Query Result
4-9
To download more slides, ebook, solutions and test bank, visit http://downloadslide.blogspot.com
f. Query
Query Result
4-10
To download more slides, ebook, solutions and test bank, visit http://downloadslide.blogspot.com
g. Query
Query Result
4-11
To download more slides, ebook, solutions and test bank, visit http://downloadslide.blogspot.com
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
b. Query
Query Result
4-13
To download more slides, ebook, solutions and test bank, visit http://downloadslide.blogspot.com
c. Query
Query Result
4-14
To download more slides, ebook, solutions and test bank, visit http://downloadslide.blogspot.com
d. Query
Query Result
4-15
To download more slides, ebook, solutions and test bank, visit http://downloadslide.blogspot.com
e. Query
Query Result
4-16
To download more slides, ebook, solutions and test bank, visit http://downloadslide.blogspot.com
f. Query
Query Result
4-17
To download more slides, ebook, solutions and test bank, visit http://downloadslide.blogspot.com
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
Query
Query Result
4-19
To download more slides, ebook, solutions and test bank, visit http://downloadslide.blogspot.com
h. Query
Query Result
4-20
To download more slides, ebook, solutions and test bank, visit http://downloadslide.blogspot.com
i. Query
Query Result
4-21
To download more slides, ebook, solutions and test bank, visit http://downloadslide.blogspot.com
i. Query
Query Result
4-22
To download more slides, ebook, solutions and test bank, visit http://downloadslide.blogspot.com
4.6 The necessary tables, with their attendant primary and foreign keys, are as follows:
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
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
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 TABLE
INVOICE-INVENTORY TABLE
CUSTOMER TABLE
CustomerID CustomerName
201 Johnson
305 Henry
4-24
To download more slides, ebook, solutions and test bank, visit http://downloadslide.blogspot.com
4.9
TABLE 4-18
PART TABLE
334 XYZ 30
231 PDQ 50
444 YYM 80
2 504 3/9/05
3 889 4/5/05
VENDOR TABLE
PURCHASE-PART TABLE
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
a. Query
Query Result
4-26
To download more slides, ebook, solutions and test bank, visit http://downloadslide.blogspot.com
b. Query
Query Result
4-27
To download more slides, ebook, solutions and test bank, visit http://downloadslide.blogspot.com
c. Query
Query Result
4-28
To download more slides, ebook, solutions and test bank, visit http://downloadslide.blogspot.com
d. Query
Query Result
4-29
To download more slides, ebook, solutions and test bank, visit http://downloadslide.blogspot.com
e. Query
Query Result
4-30
To download more slides, ebook, solutions and test bank, visit http://downloadslide.blogspot.com
f. Query
Query Result
4-31
To download more slides, ebook, solutions and test bank, visit http://downloadslide.blogspot.com
g. Query
Query Result
4-32
To download more slides, ebook, solutions and test bank, visit http://downloadslide.blogspot.com
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:
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