CHAPTER 9
REVIEW QUESTIONS
and growth.
2. the users, the database management system, the database administrator, and the
3. The primary difference between the network and hierarchical models is in the
parent-child relationship. The network model allows a child file to have multiple
parents. The hierarchical model permits a child to be associated with only one
parent record.
4. a. No data redundancy
d. Task-data independence.
Chapter 9 Page 100
database access.
6. One level is the schema, which is the conceptual view of the data. The schema
describes the entire database, and it represents the database logically. The second
level is the internal view which is the physical arrangement of the records. At this
level, the physical data records are described as well as linkages between files. The
next level is the subschema, which is the external view of the database that specific
users have authorization to use. This is also called the user view. This is the level
7. The primary key is a table attribute the value of which is unique to the record. It is a
unique identifier.
described in the data model. This is accomplished by embedding the primary key of
9. The data dictionary describes every data element in the database. The data
dictionary enables all users (and programmers) to share a common view of the data
10. An organization has three diverse operating units: tractors, sewing machines, and
computer chips. These units have different customers, suppliers, and production
11. An entity is anything about which the organization wishes to capture data. Entities
Payable”.
12. The XYZ company is a geographically distributed organization with several sites
around the country. Users at these sites need rapid access to common data for
read-only purposes.
13. (1:0,1) Every occurrence (record) is for one entity (Employee), there is a possibility
(1:1) Describes a situation in which each record in one entity is always associated
with one (and only one) record in the associated entity. For example,
(1:M) An example of this situation is that each item of Inventory (entity) is supplied
by one and only one Vendor (related entity), but each Vendor
(M:M) A company with a policy of purchasing the same types of inventory from
14. The term association pertains to the nature of the relationship between two entities.
the degree of association between two entities. Simply stated, cardinality describes
the number of possible occurrences in one table that are associated with a single
consisting of the primary keys of the two related tables is created in order to link the
related tables.
16. a. All occurrences at the intersection of a row and column are a single value. No
are allowed.
b. The attribute values in any column must all be of the same class.
d. Each row in the table must be unique in at least one attribute that is considered to be
17. a. Restrict—Extracts rows that satisfy the given condition from a specified table
c. Join—Builds a new table from two tables consisting of all concatenated pairs of
1. All nonkey attributes in the table are dependent on the primary key.
Chapter 9 Page 103
In other words, the primary key of a table wholly and uniquely defines each attribute
in the table, and none of the table attributes are defined by an attribute other than
19. The user may restrict the fields of data to view with the SELECT command. Further,
the user may restrict the rows or records of data to be viewed with the WHERE
command. The WHERE command allows the user to view only those records that
have values which fall within a certain range for one or more fields of data.
20. A data model is the blueprint for creating the physical database. Database designers
21. The deletion anomaly may cause records to be deleted unintentionally and may
occur for some time before the problem is noticed. A deletion anomaly occurs when
an item in one file is legitimately deleted. The problem occurs when this file is linked
to another file, which may also have a record deleted, due to its link. If the second
22. A user view is the set of data that a particular user sees. Examples of user views are
23. User views derive from underlying database tables. Simple views may be
constructed from a single table, while more complex views may require several
tables. Furthermore, a single table may contribute data to many different views.
Condition 2. An entity must contribute at least one attribute that is not provided
25. Because attributes are the logical and relevant characteristics of an entity, they are
unique to it. Therefore, the same attributes should not be used to define two different
entities.
DISCUSSION QUESTIONS
Chapter 9 Page 106
data and program dependency. Typically, these programs are application specific.
Thus, the users of the application data tend to be proprietary about the data in “their”
2. If your university were to use different databases for the registrar, library, parking,
food services, and computing services, then the number of forms you would have to
fill out, if any of your personal data changes, would be plentiful. For example, if you
were to move during the semester to a different apartment, the university should be
notified. In this situation, a couple of things could happen. You could be required to
go to each service individually and fill out an address form, or you could go to one
central location and fill out a form that has multiple copies, which are sent to the
various areas on campus for update. In any case, your address could be keyed in
correctly by the registrar. You might receive some correspondence from the registrar
and assume that the address correction was made. However, a keypunch error
might have occurred by the library staff, and you may not receive notification that
you have a library book which you forgot about past due. After the end of the
semester, you may not receive your final grade report. When you call the registrar,
you may find out that the library has reported that you have an overdue book and
that your grades should be held until the book is returned, and the fine is paid.
Chapter 9 Page 107
3. Under the database concept, the data becomes centrally stored with many different
users accessing the database. However, each user should not have access to the
whole database. Under the traditional data management approach, where the data
are limited to a single application, the user access problem was not as much of a
threat. The DBMS is a special software system that is programmed to know which
4. User views are derived database tables. A single table may contribute data to
several different views. On the other hand, simple views may be constructed from a
single table.
5. Tables that are logically related in the data model need to be physically linked. The
degree of association between the tables (i.e., 1:1, 1:M, or M:M) determines how the
linking occurs. The key-assignment rules for linking tables are discussed below:
Where a true 1:1 association exists between tables, either (or both) primary keys
Where a 1:M (or 1:0,M) association exists, the primary key of the 1 side is
To represent the M:M association between tables, a link table needs to be created
which has a combined (composite) key consisting of the primary keys of two related
tables.
Chapter 9 Page 108
6. The entity relationship (ER) diagram is the graphical representation technique used
to depict a data model. Each entity in an ER diagram is named in the singular noun
form, such as Customer rather than Customers. The labeled line connecting two
entities describes the nature of the association between them. This association is
also represents cardinality (the degree of association between two entities). Four
basic forms of cardinality are possible: zero or one (0,1), one and only one (1,1),
zero or many (0,M), and one or many (1,M). These are combined to represent
7. SQL allows users to retrieve data from many different files without the assistance of
programmer professionals. Thus, if the user has access to data files and knows
SQL, which is very user friendly, the user may retrieve the data instantaneously.
8. The data was not centrally stored for many different applications to use in the
not needed. Because it is centrally stored and shared by many users in a database
environment, the need arose for an individual to care for and control these files. The
9. The system programmer’s program should not have access to the data, except
perhaps temporarily to test the programs. The database administrator controls the
access to the data. If one person has the authority to both write programs and access
data, then control issues become a concern. The potential to commit fraud or
10. Neither table can donate an embedded key to the other, because both are on the
“many” side. The only solution, therefore, is to create a new link table containing the
11. Tables that are not normalized contain anomalies which require excessive updates
to tables, prevent data from being stored properly, and may cause unintentional
these anomalies threaten the integrity of the financial data of the organization.
12. A database lockout prevents multiple users from accessing the same table
simultaneously and making changes to data values while they are temporarily
accuracy.
distributed database at remote sites where the same beginning data balances are
stamping transactions. Depending on the need for data currency, the time-stamped
The focus is on capturing important details of transactions that may be lost when
they are forced into the structure of traditional accounting records. The transaction
15. Where a true 1:1 association exists between tables, either (or both) primary keys
may be embedded as foreign keys in the related table. On the other hand, when the
lower cardinality value is zero (1:0,1), a more efficient table structure can be
achieved by placing the 1-side (1:) table’s primary key in the zero-or-one (:0,1) table
as a foreign key. Assume that a company has 1000 employees, but only 100 of them
are sales staff. Also assume that each sales person is assigned a company car.
Therefore, every occurrence in the Employee entity is associated with either zero or
one occurrence in the Company Car entity. If we assigned the Company Car (:0,1)
side primary to the Employee (:1) table as a foreign key, then most of the foreign
keys will have null (blank) values. While this approach would work, it could cause
some technical problems during table searches. Correctly applying the key-
assignment rule solves this problem, because all Company Car records will have an
16. The insertion and update anomalies would create record keeping and operational
problems for the firm. However, flawed databases design that prevents the insertion
of records, or requires the user to perform excessive updates, would attract attention
quickly. The presence of the deletion anomaly is less conspicuous, but potentially
more serious from an accounting perspective. Because the deletion anomaly may go
undetected, the user may be unaware of the loss of important data until it is too late.
This anomaly can result in the unintentional loss of critical accounting records and
17. The organization’s business rules directly impact the structure of the database
tables. If the database is to function properly, its designers need to understand the
organization’s business rules, as well as the specific needs of individual users. For
example:
different suppliers, the cardinality between the Supplier and Inventory tables is
M:M.
2. When a the company purchases all items of a certain type from only one
respectively.
3. A policy that a separate receiving report is prepared for the receipt of goods
specified on a single purchase order will result in a 1:1 cardinality between the
receiving report and purchase order tables. If, however, multiple purchase orders
are combined on a single receiving report, then the cardinality between these
18. The partitioned approach works best for organizations that require minimal data
sharing among users at remote sites. To the extent that remote users share common
data, the problems associated with the centralized approach will apply. The primary
user must now manage requests for data from other sites. Selecting the optimum
host location for the partitions, to minimize data access problems, requires an in-
accesses to data. A deadlock occurs when multiple users seeking access to the
same set of records lockout each other. As a result, the transactions of all users
assume a “wait” state until the locks are removed. A deadlock is a permanent
condition that must be resolved by special software that analyzes each deadlock
20. The primary justification for a replicated database is to support read-only queries in
situations involving a high degree of data sharing, but no primary user exists. With
data replicated at every site, data access for query purposes is ensured, and
lockouts and delays due to network traffic are minimized. A potential problem arises,
each site processes only local transactions, the common data attributes that are
replicated at each site will be updated by different transactions and thus, at any point
in time, will have uniquely different values. System designers need to employ
MULTIPLE CHOICES
1. D
2. C
3. D
4. E
5. D
6. D
7. A
8. C
9. B
10. C
11. D
12. C
Chapter 9 Page 114
13. D
14. C
15. A
16. D
17. A
18. D
PROBLEMS
rough-cut estimate of your needs, this consulting team feels that your
the data, because it does not reside in that user groups’ application. A
whereby each authorized user group may gain access to the data it
3.
Supplier Table
Supplier ID DVD #
(PK) (PK)
DVD Table
Copy ID DVD #
(PK) (FK)
Customer Table
#(PK) Customer
Household Member Table
Chapter 9 Page 117
(FK) Member
4. Mail order catalogues are beginning to be customized based upon the preferences
and purchasing patterns of the customers. If data is stored regarding the customer
preferences and their buying patterns, then catalogues containing only the items
catalogue. Printing costs and postage costs would be saved. Also, more items could
be included which fit the pattern of the customer. Further, the customer does not
have to weed through the catalogue to find the items that he or she likes. The
Listed below are some files and some fields in the files which would be necessary in
Hand
Credit Card Type Freight Selling Price
Credit Card Number Total Amount
Credit Card Expiration
Last Purchase Date
Cumulative Purchase Amount
Purchases in Last 12 months Sales Order Detail
Purchases in Last 3 months File
Chapter 9 Page 118
Number
$ Purchases of Type B Item Number
$ Purchases of Type C Quantity
$ Purchases of Type D Discount
Request Type A catalogue
Request Type B catalogue
Request Type C catalogue
Request Type D catalogue
5. Lockout. The example below illustrates how two different transactions are being
processed against the same AR control account within the same time frame. The
individual logic steps are shown in their actual sequence of execution. If no database
lockout were in place, the AR Control value of 20,000 is retrieved by both users of the
system. One user is posting a payment to Sub Account 1 of $500 and the other is
AR
Control
Time IPU Instruction Sub Acct 1 Sub Account 2 Account
1:00:001 A Read sub acct 1 1,000
1:00:001 B Read sub acct 2 3,000
1:00:002 A Update sub acct 1 500
1:00:002 B Update sub acct 2 2,200
1:00:003 A Read control acct 20,000
1:00:003 B Read control acct 20,000
1:00:004 A Update control acct 19,500
1:00:005 B Update control acct 19,200
The update process does not reflect the second to last instruction executed. The AP
Deadlock. A deadlock occurs when multiple sites lock out each other. Take for
Item A, and the record for Item A is locked until the order is complete.
Customer 2’s order. The phone clerk apologizes for the delay and
Customer 2 apologizes for the delay and says the system is slow
intervention occurs.
Reasoning
The users are distributed around the country and need rapid access to data. A
centralized model may result in long delays because of network traffic and database
lockout.
User data needs are common not unique. Since there are no identifiable primary
Chapter 9 Page 120
Because usage is read-only, changes will not occur and database concurrency is not
a problem.
Reasoning
The users are distributed around the country and need rapid access to data. A
centralized model may result in long delays because of network traffic and database
lockout.
User data needs are unique with identifiable primary users. There is no need to
Since users are unique, changes to the database will not cause database
concurrency problem.
9. The first step is to remove repeating groups. The removal of repeating groups results
in the following two tables. Due Date has been removed because it is a calculated field.
Student ID Number is the primary key for the Student table. Student Id Number and
Book Call No. together are the primary key for the Library table. Student table is now in
Student Table
Number
The second step is to remove partial dependencies from Library table.
Book Title is partially dependent on the Book Call No. component of the primary key.
This assumes that the call number is unique to the book, and not to
the event of borrowing the book. It also assumes that more than one
copy of the book may exist in the library and that all copies have the
tables below:
Transaction Table
Number
Book Table
(PK)
Table Class
Chapter 9 Page 122
Number)
(FK)
Table Semester
#(PK)
Table Professor
# (PK)
Chapter 9 Page 123
PK Inventory Table FK
Chapter 9 Page 124
PK Vendor Table
Chapter 9 Page 126
PK Inventory Table
Chapter 9 Page 128
Note: This is an example of a many-to-many relation between the inventory and vendor tables. The solution
requires a link table, which also contains Unit Cost data. A composite key of Part # and Vendor # is
needed to define the Unit Cost attribute, because there are many prices for each item carried,
depending on which vendor supplies the part.
Customer Table
Invoice Table
Inventory Table
(PK) Status
Table PO
PO # (PK) Date Employee # Vendor # (FK)
(FK)
Table PO/Item
PO # (PK) Item # (PK) Quantity
Table Item
Item # (PK) Description On Hand Cost Price Location
Table Vendor
Vendor # (PK) Name Address Contact Terms Balance
Chapter 9 Page 130
15.
Response:
Chapter 9 Page 131
1 and 2
(a)Reason
Rejected Entities
Payroll clerk Violates rule 1 and 2 – Wording
suggests only one clerk (rule 1) and no
evidence of attributes unique to this
entity (rule 2)
Sagerod manufacturing company Violates Rule 1 – the company is a
single occurrence
cash disbursements clerk Violates rule 1 and 2
Valid entities
Employee
Paycheck register
Cash disbursement journal
Time card
Employee earnings File
Chapter 9 Page 132
17. a. and b.
Stores occurrence
Receiving Report This is a view––It derives entirely from receiving
Violates rule 2
Check (physical) This is a view––Derived from Check register records.
Violates rule 2
Payment Summary This is a view––Derived from Check register records
Violates rule 2
Purchase Requisition This is a view––Used to create Purchase Order
Violates rule 2
Customers Not relevant to this system
Stores
FA Receiving Report This is a view—It derives entirely from receiving
Violates rule 2
Check (physical) This is a view—Derived from Check register records.
Violates rule 2
Payment Summary This is a view—Derived from Check register records.
Violates rule 2
Purchase Requisition This is a view—Used to create Purchase Order.
Violates rule 2
Store Manager Assumption: manager/store-specific data will be
19.
Response:
1 and 2
Various clerks such as Sales Violates rule 1 and 2 – Wording suggests only
representative, accounting one clerk (rule 1) and no evidence of attributes
department clerk, AR Clerk, unique to this entity (rule 2)
etc.
stock release document This is a view – It derives entirely from sales
order and thus violates rule 2
Mail room employees Violates rule 2 – Assumption: no employee
specific data need to be captured by this system
packing slip. This is a view – Derived from sales order.
Violates rule 2
Invoice (physical) This is a view – derived from sales order Violates
rule 2
Customer Check (physical) This is a view – used to create record in cash
receipts journal Violates rule 2
inventory account summary This is a view – Derived from inventory records.
Violates rule 2
remittance advices This is a view that is derived from the sales order
and sent to the customer to facilitate posting
payments to the correct customer account
AR account summery This a view – derived from the AR subsidiary
ledger or the total of all unpaid sales orders
price list Given the limited information in the problem, this
entity may be represented as either a separate
table or more simply as a field in the inventory
record. We assume the latter in this solution.
Chapter 9 Page 140
AR Subsidiary ledger This is the sum of all sales order records organized
by customer that are still open (unpaid) at period
end.
AR control accounts (GL) This is the sum total of all sales order records that
are still open (unpaid) at the period end.
cost of goods sold account Calculated as the quantity sold (sales Order) X the
(GL) cost of the item taken from the inventory record
20
Chapter 9 Page 144
21.
Chapter 9 Page 145
occurrence
John, Billing Clerk Violates rule 2—Assumption: no employee specific
Violates rule 2
Warehouse Manager Violates rule 2—Assumption: no employee specific
records.
Chapter 9 Page 146
Violates rule 2
Chapter 9 Page 147
(record)
Check (register) Meets conditions of Rules 1 and 2
Chapter 9 Page 148