Professional Documents
Culture Documents
CHAPTER 9
DATABASE MANAGEMENT SYSTEMS
REVIEW QUESTIONS
1.
2.
the users, the database management system, the database administrator, and the
physical database structures.
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.
5.
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
that users find of most interest.
7.
The primary key is a table attribute the value of which is unique to the record. It is a
unique identifier.
8.
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
resource, thus facilitating greatly the analysis of user needs.
10.
An organization has three diverse operating units: tractors, sewing machines, and
computer chips. These units have different customers, suppliers, and production
facilities. Operating data are consolidated for financial reporting only.
11.
An entity is anything about which the organization wishes to capture data. Entities
may be physical, such as Inventory, Customer, or Employee. They may also be
conceptual, such as Sale (to a customer), Accounts Receivable, or Accounts
Payable.
12.
13.
(1:0,1) Every occurrence (record) is for one entity (Employee), there is a possibility
of zero or one occurrence in the related entity (Company Car).
(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,
a company laptop computer is assigned to only one manager, and
every manager is assigned only one laptop.
(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
supplies one or many different Inventory items to the company.
(M:M) A company with a policy of purchasing the same types of inventory from
multiple suppliers would have a M:M association between the Vendor
and Inventory entities.
14.
The term association pertains to the nature of the relationship between two entities.
This is represented by a verb such as shipped, requests, or receives. Cardinality is
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
occurrence in a related table.
15.
16. a.
All occurrences at the intersection of a row and column are a single value. No
d. Each row in the table must be unique in at least one attribute that is considered to be
the primary key.
17. a.
RestrictExtracts rows that satisfy the given condition from a specified table
JoinBuilds a new table from two tables consisting of all concatenated pairs of
rows, one from each table.
18.
1. All nonkey attributes in the table are dependent on the primary key.
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
identify system entities and prepare a model of them using a graphical
representation technique called an entity relationship (ER) diagram.
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
record should not be deleted, then an update anomaly has occurred.
22.
A user view is the set of data that a particular user sees. Examples of user views are
computer screens for entering or viewing data, management reports, or source
documents, such as an invoice.
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.
24.
Condition 2.
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
1.
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.
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
data each user is authorized to access. This controlled authorization is crucial in
centrally stored DBMSs.
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
may be embedded as foreign keys in the related table.
Where a 1:M (or 1:0,M) association exists, the primary key of the 1 side is
embedded in the table of the M-side.
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.
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
represented with a verb, such as shipped, requests, or receives. The ER diagram
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
logical associations between entities such as 1:1, 1:0,M, and M:M.
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
traditional data management environment; therefore, a database administrator was
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
database administrator is responsible for database planning, developing the data
requirements and data dictionary, database design and controls, database
implementation and access controls, operation and maintenance, and establishing
and reviewing the standards and procedures.
9.
The system programmers 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
embezzlement or to destroy or alter the companys records increases.
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
key fields of both tables.
11.
Tables that are not normalized contain anomalies which require excessive updates
to tables, prevent data from being stored properly, and may cause unintentional
deletion of data. Accountants need to be familiar with normalization issues, because
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
inconsistent. Lockouts force changes to be made sequentially to ensure data
accuracy.
13.
14.
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:) tables 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 keyassignment rule solves this problem, because all Company Car records will have an
employee assigned, and no null values will occur.
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
the destruction of the audit trail.
17.
The organizations business rules directly impact the structure of the database
tables. If the database is to function properly, its designers need to understand the
organizations business rules, as well as the specific needs of individual users. For
example:
1. When an organization decides to purchase the same items of inventory from
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
supplier, the cardinality between Supplier and Inventory tables is 1:M
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
tables will be 1: M respectively.
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 indepth analysis of end-user data needs.
19.
20.
MULTIPLE CHOICES
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
PROBLEMS
1.
Al Brindifi, VP Operations
Carla Glasser, VP Finance
James Closter, VP Marketing
Julia Tinner, Controller
Beth Clark, Manager of Information Systems
FROM:
Solutions Consultants
SUBJ:
planned,
managed,
and
maintained. The
database
a.
3.
Supplier Table
Supplier ID Supplier
Supplier
(PK)
Address
Name
Terms
Balance
Supplier
Phone #
Supplier/DVD Table
Supplier ID DVD #
(PK)
(PK)
DVD Table
DVD #
DVD
DVD
Year of
(PK)
Name
Genre
Release
Address
Credit
Copy Table
Copy ID
DVD #
(PK)
(FK)
Customer Table
Customer
Name of
Phone
Primary
#(PK)
Customer
Card #
Cost
Rental
Time
4.
Member #
Customer
Name of
(PK)
Phone #
Household
(FK)
Member
Age
Restrictions
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
which are believed to be of value to the customer may be contained in the
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
technology is changing such that customized or semi-customized (for groups of
people) catalogues are a reality.
Listed below are some files and some fields in the files which would be necessary in
addition to the traditional accounts receivable, cash receipts, vendor,
and general ledger files.
Customer
Master File
Customer Number
Name
Sales
File
Customer Number
Sales Order
Inventory
Master File
Item Number
Item
Inventory Type
File
Product Type
Product
Number
$ Amount of Items
Taxes
Description
Product Type
Quantity on
Classification
Address
Phone
Credit Card Type
Credit Card Number
Credit Card Expiration
Last Purchase Date
Cumulative Purchase Amount
Purchases in Last 12 months
Purchases in Last 3 months
Freight
Total Amount
Hand
Selling Price
5.
Sales Order
Number
Item Number
Quantity
Discount
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
posting a payment to Sub Account 2 for $800.
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
Control Account should reflect payments received of $1,300, but only
$800 of payments are accounted for. Thus, a transaction is lost, and
the control and subsidiary ledgers are out of balance.
Deadlock. A deadlock occurs when multiple sites lock out each other. Take for
example, a mail order company in which two customers are
7.
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
Because usage is read-only, changes will not occur and database concurrency is not
a problem.
8.
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
replicate the entire database.
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
3NF. Library table requires further normalization.
Student Table
Student ID
Student First
Student Last
No. of Books
Number
Name
Name
Out
Book Title
Date Out
Library Table
Student ID
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
same call number. Removing the partial dependency results in the
tables below:
Transaction Table
Student ID
Date Out
Number
Book Table
Book Call No.
Book Title
Book Call No. is the primary key for the new table Book. Since no transitive
dependencies exist, all three tables (Student, Transaction, and Book)
are now in 3NF.
10.
Table Textbook
ISBN #
Title
(PK)
Publisher
(FK)
Table Publisher
Publisher
(PK)
Table Class
Address
Phone #
Cost
Selling
Quantity
Price
on Hand
Course #
Course
Professor
(PK)
Name
(Employee
Days
Room #
(FK)
Number)
(FK)
Table Semester
Term
Year
Semester
Name
Address
#(PK)
Table Professor
Employee
# (PK)
Term #
Phone
Title
11.
Inventory Table
FK
PK
Vendor Table
Telephone
Inventory Table
Telephone
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 Employee
Employee #
Name
Address
Date Hired
Exemptions Marital
(PK)
Table PO
PO # (PK)
Status
Date
Table PO/Item
PO # (PK)
Item # (PK) Quantity
Table Item
Item # (PK)
Description On Hand
Table Vendor
Vendor # (PK) Name
Address
Cost
Price
Location
Contact
Terms
Balance
15.
16.
Response:
1 and 2
Rejected Entities
Payroll clerk
(a)Reason
supervisor
check for the total payroll
paycheck
payroll summary
Valid entities
Employee
Paycheck register
Cash disbursement journal
Time card
Employee earnings File
17.
a. and b.
Rejected Entities
Accounts Payable
Reason
Violates rule 1 and 2Wording suggests only one
Department Clerk
Stores
Receiving Report
occurrence
This is a viewIt derives entirely from receiving
Summary
Part-Time Employees
Unloading Personnel
Sales
Representatives
Obsolescence
Reports
Invoice (physical)
Violates rule 2
This is a viewUsed to create Invoice Record
Check (physical)
Violates rule 2
This is a viewDerived from Check register records.
Payment Summary
Violates rule 2
This is a viewDerived from Check register records
Purchase Requisition
Violates rule 2
This is a viewUsed to create Purchase Order
Customers
Violates rule 2
Not relevant to this system
Valid Entities
Purchase Manager
Reason
Assumption: all store purchase managers will use
the system. This entity will consist of multiple
occurrences and provide manager/store-specific
Supplier
Inventory
Purchase Order
Receiving Report
Invoice (record)
Payment Obligation
Check (register)
18.
Solution a. and b.
Rejected Entities
Accounts Payable
Reason
Violates rule 1 and 2Wording suggests only one
Department Clerk
Stores
FA Receiving Report
Summary
Receiving Clerk
Accounts Payable
Manager
Depreciation
Schedule
Invoice (physical)
Check (physical)
Violates rule 2
This is a viewDerived from Check register records.
Payment Summary
Violates rule 2
This is a viewDerived from Check register records.
Purchase Requisition
Violates rule 2
This is a viewUsed to create Purchase Order.
Store Manager
Violates rule 2
Assumption: manager/store-specific data will be
contained in other entities i.e. Purchase Order
Valid Entities
Supplier
Fixed Assets Inventory
Purchase Order
Receiving Report
Invoice (record)
Payment Obligation
Check (register)
Reason
Meets conditions of Rules 1 and 2
Meets conditions of Rules 1 and 2
Meets conditions of Rules 1 and 2
Meets conditions of Rules 1 and 2
Meets conditions of Rules 1 and 2
Meets conditions of Rules 1 and 2
Meets conditions of Rules 1 and 2
19.
Response:
1and2
Rejected Entities
Lotus Tea Importer Company
and all departments such as
Sales, warehouse, shipping
department, general ledger
department, etc.
Various clerks such as Sales
representative, accounting
department clerk, AR Clerk,
etc.
stock release document
Mail room employees
packing slip.
Invoice (physical)
Customer Check (physical)
inventory account summary
remittance advices
AR account summery
price list
(a)Reason
Violates Rule 1 the company and these
departments are single occurrences
Valid entities
Customer
Sales order
inventory (product)
Cash receipts record (CR
journal)
bill of lading
carrier
deposit slip
Shipping Notice
Reason
Meets conditions of Rules 1 and 2
Meets conditions of Rules 1 and 2
Meets conditions of Rules 1 and 2
Meets conditions of Rules 1 and 2
Meets conditions of Rules 1 and 2
Meets conditions of Rules 1 and 2
Meets conditions of Rules 1 and 2
Meets conditions of Rules 1 and 2
Meets conditions of Rules 1 and 2
Meets conditions of Rules 1 and 2
Sales Journal
AR Subsidiary ledger
20
21.
22.
Solution: a. and b.
Rejected Entities
Sales Representative
Reason
Assumption: Sales representative specific data will
occurrence
Violates rule 2Assumption: no employee specific
Chris, Warehouse
Clerk
Sandy, AR Clerk
Customer Invoice
(physical)
Customer Check
(physical)
Remittance Advise
Remittance List
Clerk
Deposit Slip
Warehouse Manager
Violates rule 2
Violates rule 2Assumption: no employee specific
Demand Forecast
Purchase Requisition
Rejected Entities
Sara, Purchasing
Reason
Violates rule 2Assumption: no employee specific
Clerk
PO Blind Copy
Cash Disbursement
Clerk
Payment Check
(Physical)
Packing Slip
Valid entities
Customer
Sales Order
Sales Journal
Inventory Sub Ledger
Bill of Lading
General Ledger
Cash Receipts Journal
Return Record
Purchase Order
Supplier
Account Payable
Receiving Report
Supplier Invoice
Reason
Meets conditions of Rules 1 and 2
Meets conditions of Rules 1 and 2
Meets conditions of Rules 1 and 2
Meets conditions of Rules 1 and 2
Meets conditions of Rules 1 and 2
Meets conditions of Rules 1 and 2
Meets conditions of Rules 1 and 2
Meets conditions of Rules 1 and 2
Meets conditions of Rules 1 and 2
Meets conditions of Rules 1 and 2
Meets conditions of Rules 1 and 2
Meets conditions of Rules 1 and 2
Meets conditions of Rules 1 and 2
(record)
Check (register)
22, part c.
22, part c.
22, part d.
22 part d.