Answers To Group I Questions: Chapter One
Answers To Group I Questions: Chapter One
1.3 Summarize problems that can occur when using a list to keep track of some-thing.
Problems occur when changes are made to the list. If multiple copies of data occur in the list, the
change must be made to each copy of the data.
Problems occur when data is delete data. It is possible to delete data about one object in the list and
loose data about a second or third object in the list.
Problems occur when we want to add data to the list. If some data in the list is missing, we may not
know exactly how or where to store the data that we do have.
Lists can also contain inconsistencies. If data is stored twice but the data does not have the same
value, we cannot tell which value is correct. Sometimes what appears to be an inconsistency may
actually be data that represents two different meanings of the data.
When data is missing from a list we cannot tell if the missing data means that the data has no
meaning for a particular row in the list of whether we simply do not know what the value of the
data should be.
Problems also occur when we share data in a list. These problems involve such things as who
determines the format for the list and even the data within the list, who is allowed to modify, delete,
or add items to the list, and who is allowed to see the list.
Problems also occur in lists because lists typically contain data about many different themes.
1.4 Based on your answer to question 1.3, when do you think it is appropriate to use a list to
keep track of something?
A list may be appropriate when the list will contain data about a single theme and the data is not
shared between multiple users that with different objectives for the list.
1.5 Describe problems that can occur when an adviser changes his or her phone number.
1-1
Chapter One Introduction to Database Processing
Using Jones as an example, if you do not change Jones’ phone number in both the first and last
lines, you cannot tell which phone number is the correct phone number for Jones. In this example,
since the phone numbers would be different, you may not know that the Jones in the last line is the
same Jones as the one in the first line.
1.6 Suppose student Stein drops out of school, and the second row is deleted. Describe the
side effects of this deletion.
The first problem would be that you would loose advisor Kwail phone number. You would also
loose the fact that there is an advisor name Kwail. It also appears that the Dept Head column
contains the name of the department head for the Major. Since Stein is the only Info Systems major,
you would lose the name of the department head for the entire major. (you would also lose the fact
that the school offers an Info Systems major)
1.7 How do we use this list to record the fact that Smith is the department head of the
computer science department?
To record this fact you would need to add a row of data to the list. The row would only contain data
for the Major (Computer Science) and the Dept Head (Smith). Since, at this point, there are no
students that you know of there would be no data for the Student column. Since there is no student
there would also be no Advisor or Advisor Phone.
Even though this can be done to satisfy the requirement not that it may make the list appear to
provide information that is incorrect. For example, it may make someone think that there are really
six students instead of five, we just do not know the name of the sixth student.
1.8 Suppose the entry in the last row, last column is changed from Greene to Abernathy. What
problems will then occur in interpreting this list?
As it currently stands, you should be able to determine that the department head for the Accounting
major is Green. If you make the suggested change, it will appear that the Accounting major has two
different department heads. Would this mean that Greene was the department head when Parks,
Johnson, and Gonzales declared the Accounting major and Abernathy was the department head
when Rickey declared the major? If so, who is the current department head or are there two
department heads? If there is only one department head, which one is the correct department head,
Greene or Abernathy?
1-2
Chapter One Introduction to Database Processing
1.9 Change this list to a set of three interrelated tables. Use the technique shown in Figure 1-4
for representing relationships.
AdvisorIDAdvisorAdvisor MajorIDMajorDept
Phone1Jones221.23452Kwail223.4 Head1AccountingGreene2In
4443Rosenbloom281.39444Jones2 fo SystemsMasters
21.2345
StudentIDStudentAdvisorIDMa
jorID1Parks112Stein223Johnson1
34Gonzales135Rickey11
1.10Explain how none of the problems encountered in questions 1.5 to 1.8 can occur with the
tables developed in your answer to question 1.9.
Since Jones is stored in the Advisor table Jones appears only once and can have only one phone
number. If there are two different Jones’, they would both be in the advisor table with different
phone numbers and different Ids. The different Ids would indicate that they are different people.
If Stein drops out of school you would delete Stein’s row in the student table. This deletion would
have no effect on the Advisor table and the major table. No information from these tables would be
lost.
You can add Smith as the department head of the Computer Science major by adding a row to the
Major table. There would be no affect on the Student or Advisor table.
As the table currently stands, the change in question 1.8 would be made in the major table. Since
the Info Systems major exists only once in this table there would be only one change to be made.
Using these tables, the Dept Head column could only represent the current department head.
1.11 Using the SQL statement on page xxx as an example, guess at a similar statement for
joining together the tables in your answer to question 1.9. If any of your column names
have spaces in them, put the column names in brackets [ ]. Because there is no
computation in your result, you will not need an expression like [Daily Rate]*[Days] As
Charge in your answer.
SELECT ADVISOR.Advisor, ADVISOR.[Advisor Phone], STUDENT.Student, MAJOR.Major,
MAJOR.[Dept Head)
FROM ADVISOR, MAJOR, STUDENT
WHERE ADVISOR.ID = STUDENT.AdvisorID
AND STUDENT.MajorID = MAJOR.ID
1-3
Chapter One Introduction to Database Processing
1.14 What does DBMS stand for? List the functions of a DBMS.
DBMS stands for Database Management System
The functions of the DBMS are:
• Create Database
• Create Tables
• Create Supporting Structures
• Read Database Data
• Update Database Data
• Maintain Database Structures
• Enforce Rules
• Control Concurrency
• Provide Security
• Perform Backup and Recovery
1.19 Explain the differences between personal, workgroup, and organizational databases.
1-4
Chapter One Introduction to Database Processing
Personal: Mary Richards Housepainting: single-user databases with a relatively small amount of
data—say, fewer than 10 megabytes. The forms and reports for these databases are generally simple
and straightforward.
Workgroup: Treble Clef Music; they have more than one user, but usually fewer than 20 or 30
users altogether. They contain a moderate amount of data—say, 50 or 100 megabytes. The forms
and reports need to be complex enough to support several different business functions.
Organizational: The largest databases are like those in the auto registration case, which have
hundreds of users and trillions of bytes of data. Many different applications are in use, with each
application having its own forms and reports. The characteristics of these types of databases are
summarized in Figure 1-16.
1.20 Summarize the tasks in the requirements phase of the development on a database
system.
The tasks to be completed in the requirements phase of the development of a database are to:
Build data model
Specify data items
Define constraints and rules
Determine application requirements
1.22 Summarize the tasks in the design phase of the development on a database system.
In the design phase of the development of a database you must design the:
Tables
Relationships
Indexes
Constraints
Stored procedures and triggers
Forms
Reports
Queries
Application code
1.23 Summarize the tasks in the implementation phase of the development on a database
system.
In the implementation phase of the development of a database you must:
Create tables
Create relationships
Create constraints
Write stored procedures and triggers
Fill the database
Create forms
Create reports
Create queries
Write application code
1-5
Chapter One Introduction to Database Processing
Test
1.24 Name two data models that preceded the relational model.
IBM developed and promoted DL/I, or Data Language One, which modeled database data in
the form of hierarchies or trees.
CODASYL, the group that developed the standards for the COBOL language, created a model in
the 1970s called the DBTG (Data Base Task Group) Model. The DBTG model could readily
represent both hierarchies and networks. This model was at one time proposed as a national
standard, but was never adopted primarily because of its complexity.
1.25 Describe the disadvantages of the two data models in your answer to question.
The DL/1 model was not truly general-purpose. Representing non-hierarchical network
data was cumbersome.
The CODASYL model’s primary disadvantage was its complexity.
1.27 How did personal DBMS products influence the development of organizational DBMS
products?
Because there was plenty of computing power available on personal computers, personal DBMS
products were able to create more graphical user interfaces. Over time, the influence of these
products changed the interfaces of larger organizational DBMS products as well.
1.32 What technology is at the leading edge of the database field today?
1-6
Chapter One Introduction to Database Processing
Recent years have seen the introduction and use of XML, which is a technology that originated to
support Web sites, but has since been extended to provide important solutions to database problems.
The integration of database technology and XML is the leading edge of the database field today and
will be important for many years in the future.
1.33 Suppose that the New Orleans Wooden Boat Society (a fictitious organization) publishes
a monthly newsletter for which it charges $35 per year. Assume they keep the following
data in the form of list in a spreadsheet:
Name, Street, ApartmentNo, City, State, Zip, StartDate, EndDate, AmountPaid
What problems are likely to occur when maintaining this data as a list?
Suppose a library wanted to purchase 3 subscriptions to the newsletter. You would need to make
three different entries for the library to know that three copies must be sent and that the library paid
$35 for each subscription. If you simply made one entry for $105 being the AmountPaid, you may
not know that three copies of the newsletter must be mailed. If this were the only library in the list
you may think that a subscription cost $105 when purchased by a library but everyone else only
pays 35. If three entries were made and the Street name was changed, all three entries must be
changed.
1.34Suppose that a subscriber who has received the newsletter for three years changes his or
her address. Should the address data be changed on all subscriptions, or on only the
current subscription? Why or why not?
The answer here would depend upon how the data were being used. If the data were simply being
used as historical data to know where subscriptions were sent, the answer would be NO, you would
want to keep the original mailing address. If you did not change the address and wanted to send a
reminder to any address that had not renewed their subscription you may send a reminder to
someone that has moved into your old address but never ordered the subscription. You would
probably need to argue that the address should be changed in this case.
1.35Break the list in question 1.33 into two tables, one for SUBSCRIBER and one for
SUBSCRIPTION. Relate the tables using Figure 1-4 as an example. How does this
arrangement fix the problems you identified in question 1.33? How does this arrangement
affect your answer to question 1.34? Make an argument that this two-table design is not
an improvement over the spreadsheet, and is thus unnecessary.
1-7
Chapter One Introduction to Database Processing
SubscriptionIdStartDateEndDateAmountPaidSubscriberID11/1/200312/3
1/2003$35.00122/1/20031/31/2004$35.00232/1/20031/31/2004$35.00242/1/20
031/31/2004$35.00253/20/20022/19/2003$35.00363/20/20032/19/2004$35.00
3
Since each subscriber exits only once in the subscriber table a subscriber can only have one
address, thus the question is mute since there are no additional addresses to change.
It is difficult to argue that this is not an improvement. It saves space (the address is not duplicated)
and allows each table to carry a single theme (either theme subscriber or theme subscription). By
changing the design you have made changes to what the data must mean. The address must be the
current address. This design does not provide an opportunity store previous addresses.
1.36 Suppose that the society decides to have two publications: a shop guide that is published
quarterly (Winter, Spring, Summer, Fall), and the newsletter that is published monthly.
Assume that the cost of the shop guide is $15 per year, and the cost of the newsletter is
$35 per year. Assume that the society keeps the following data:
Name, Street, ApartmentNo, City, State, Zip, Publication, StartDate, EndDate, AmountPaid
What problems are likely to occur when maintaining this data as a list?
All the original problems would still exist. In addition, if the list were used to provide other
advertising, subscriber that had two current subscriptions would get two advertisements. If a
subscriber that subscribed to both publications moved they would need to notify you twice to make
sure the current address were changed in both places. In essence, anyone that that subscribed to
both publications would need to be treated as two different people.
1.37 Break the list in question 1.36 into two tables: one for SUBSCRIBER and one for
SUBSCRIPTION. Relate the tables using Figure 1-4 as an example. How does this
arrangement fix the problems you identified in question 1.36? Explain why it is easier to
make the argument that this two-table design is an improvement over the spreadsheet.
1-8
Chapter One Introduction to Database Processing
SubscriptionIdPublicationStartDateEndDateAmountPaidSubscribe
rID1Newsletter1/1/200312/31/2003$35.0012Shop
Guide1/1/200312/31/2003$15.0013Newsletter2/15/20032/14/2004$35.00
24Newsletter2/15/20032/14/2004$35.0025Newsletter2/1/20031/31/2004$
35.0036Shop Guide2/1/20031/31/2004$15.003
SubscriberIDNameStreetCityStateZip1J.J.
Jones105 Main St.FairfaxVA087912T.T. Turner25
Market St.EdmondOK467313B.B. Baker1002 East
Rd.NelsonSC56789
This design continues to eliminate the need for duplicate addresses. If a subscriber changed
addresses they would need to notify you only once since they only have one address. Each
subscriber is now treated as one person and not two different people.
1.38 Suppose that the cost of the shop guide is $15 per year, and the cost of the newsletter is
$35 per year, but the cost of both is $40 per year. Does this situation affect the design of
your tables for question 1.37? Why or why not? How should the society handle this
situation?
This change would affect the design of the tables. You would need to create a new publication
(probably called Both) with an AmountPaid of $40. The society would handle this by using a
subscription table like the one below.
SubscriptionIdSubscriptionTypeStartDateEndDateAmountPaidSubsc
riberID1Both1/1/200312/31/2003$40.0012Newsletter2/15/20032/14/2004$35
.0023Newsletter2/15/20032/14/2004$35.0024Both2/1/20031/31/2004$40.00
35Shop Guide3/1/20032/29/2004$15.004
1.39 Just about anyone with computer skills in the society can create and process a list in a
spreadsheet. Developing a database and database application, however, requires
specialized knowledge and skills. If the society asked you to help them determine whether
the cost and trouble of a database were worthwhile, how would you proceed? What
questions would you ask? What sort of an analysis would you do?
You should begin by creating a data model for the problem. To do this you would need expertise in
data modeling (Chapters 2-5). Once the model were created you could compare the database model
1-9
Chapter One Introduction to Database Processing
to the model of the list. Specify the data items and define the constraints and business rules. Once
you have done this you could see many of the advantages of the database model over the list model.
You should also ask questions like how many users would be using the list. If there are several
users there would be even more reason to justify the database. Also ask about standards between
users. Make sure all users can agree on certain standards such as the format for Dates. Ask about
privacy issues. Are some users allowed to see the address and other not allowed to see the
addresses.
1-10
Chapter One Introduction to Database Processing
1. Construct a table of sample data that conforms to the CUSTOMER structure. Include at
least four rows in your table. For this question and the following questions, just list the data
using a word processor.
CUSTOMER
Name StreetAddr Apt City St Postal Country EmailAddress Phone
A.A. Able 103 East Ave. 23-B London 00957 ENG [email protected] 780.056.9043
B.B. Baker 234 Main St. Edmond OK 55671 USA [email protected] 567.321.7654
C.C. Clark 23 Maple La. Edmond OK 55671 USA [email protected] 567.321.8902
D.D. O'Donald 23 Shamrock Rd. A3 O'Bryrne 00346 IRE [email protected] 987.7654.321
2. Which of the columns of the CUSTOMER table can be used as a key (a column that
identifies to identify a unique row of the table)?
In the table above, either Name, Street, Phone or EmailAddress could be used as the Key since any
one uniquely identifies a row. You must realize that in the real world, none of these will satisfy the
requirements for a Key. Name and address will not remain unique very long. There are many B.B.
Bakers in the world and almost every city has a 234 Main St. EmailAddress and Phone Number are
the best candidates for a key but phone number change too often (especially with the use of cell
phones) to be considered a good candidate for a key. Email Addresses also change too often to be
considered a good key. A key should rarely change.
3. Construct a table of data that conforms to the PURCHASE structure. Include at least four
rows in your table.
Purchase
DateOfPurchase SerialNumber
2/12/2003 12001
2/19/2003 12002
2/19/2003 12003
2/21/2003 12004
4. Which of the columns of the PURCHASE table can be used as a key of PURCHASE?
The serial number can be used as the Key as long as all stoves have a serial numbers.
5. Using the tables defined previously, there is no way to relate a particular customer to his
or her stove. One way to do that is to add SerialNumber of PURCHASE to CUSTOMER.
The CUSTOMER table then appears as follows:
CUSTOMER (Name, StreetAddress, ApartmentNumber, City, State/Province,
Zip/PostalCode, Country, EmailAddress, PhoneNumber, SerialNumber)
Copy your sample CUSTOMER data and add the SerialNumber column to it. Call this new
table CUSTOMER1
1-11
Chapter One Introduction to Database Processing
CUSTOMER1
Name Phone StreetAddr Apt City St Postal Country EmailAddress SerialNumber
A.A. Able 780.056.9043 103 East Ave. 23-B London 00957 ENG [email protected] 12001
B.B. Baker 567.321.7654 234 Main St. Edmond OK 55671 USA [email protected] 12002
C.C. Clark 567.321.8902 23 Maple La. Edmond OK 55671 USA [email protected] 12003
D.D. O'Donald 987.7654.321 23 Shamrock Rd. A3 O'Bryrne 00346 IRE [email protected] 12004
6. An alternative technique for representing the relationship of the two tables is to place
EmailAddress of CUSTOMER in PURCHASE. The PURCHASE table then appears as
follows:
PURCHASE (DateOfPurchase, SerialNumber, EmailAddress)
Purchase1
DateOfPurchase SerialNumber EmailAddress
Samantha Green owns and operates Twigs Tree Trimming Service. Samantha graduated from
the forestry program and worked for a large landscape design firm that performs tree trimming
and removal. After several years of experience, she bought her own truck, stump grinder, and
other equipment and then opened her own business in St. Louis, Missouri.
1-12
Chapter One Introduction to Database Processing
Although many of her jobs are one-time operations to remove a tree or stump, others are
recurring: trimming a tree or groups of trees every year or every other year. When business is
slow, she calls former clients to remind them of her service and of the need to trim their trees on
a regular basis.
Samantha keeps the following data about each of her jobs:
OwnerName, Phone, Street Address, City, State, Zip, DateOfService, Description,
AmountBilled, AmountPaid, DateOfPayment.
A. Assume that Samantha stores this data as a list in a spreadsheet. Describe five potential
problems Samantha can have when storing the data in this manner.
1.Phone, address, city, state, zip will be duplicated. When a customer’s phone number changes, it
must be updated in each place.
2.When a customer moves to a new address, the address must be change in each place it occurs in the
list.
3.Each entry in the table is treated as a separated customer. When a mailing is created a customer may
get several copies of the mailing if they appear in the list more than once.
4.What happens when a customer moves to a new address and someone else moves into the old
customer’s address. The new customer also becomes a customer. It may appear that we have two
customers at the same address. Who do we bill?
5.The table carries two themes, one about customer and one about service.
2. Which of the columns of the CUSTOMER table can be used as a key (a column that
identifies to identify a unique row of the table)?
The best key would be Phone or the combinations of Street, City, and State.
3. Construct a table of data that conforms to the SERVICE structure. Include at least four
rows in your table.
SERVICE
DateOfService Description AmountBilled AmountPaid DateOfPayment
5/10/2003 Trim Shrubs $75.00 $75.00 5/30/2003
1-13
Chapter One Introduction to Database Processing
4. Explain why none of the columns in the SERVICE table can be used as a key.
Look at the first two rows of data. These are two different services performed for different people
on the same day. Both rows contain the same data so there is not column that that makes the rows
unique.
5. Add an ID column to SERVICE similar to that for the tables in Figure 1-4. Modify your
example data to include the ID column.
SERVICE
ID DateOfService Description AmountBilled AmountPaid DateOfPayment
1 5/10/2003 Trim Shrubs $75.00 $75.00 5/30/2003
2 5/10/2003 Trim Shrubs $75.00 $75.00 5/30/2003
3 5/12/2003 Mow Lawn $35.00 $35.00 6/1/2003
4 5/14/2003 Mulch $125.00 $50.00 6/30/2003
Shrubs
6. Using the tables defined previously, there is no way to relate a particular customer to his
or her service. One way to do that is to add ID of SERVICE to CUSTOMER. The
CUSTOMER table then appears as follows:
CUSTOMER (OwnerName, Phone, Street Address, City, State, Zip, ServiceID)
Copy your sample CUSTOMER data, and add the ServiceID column to it. Call this new
table CUSTOMER1.
CUSTOMER1
OwnerName Phone Street Address City State Zip ServiceID
A. A. Able 540.433.2200 109 Main St. Fairfax VA 66702 1
B.B. Baker 540.566.1122 1340 Market Ave. Springfield VA 66732 2
C. C. Cline 703.777.2021 1002 Broad St. Baltimore MD 70344 3
D. D. Daniel 540.433.5572 12 Maple Ave. Fairfax VA 66702 4
7. An alternative technique for representing the relationship of the two tables is to place
Phone of CUSTOMER in SERVICE. The SERVICE table then appears as follows:
SERVICE (DateOfService, Description, AmountBilled, AmountPaid, DateOfPayment,
Phone)
Copy your sample SERVICE data, and add the Phone column to it. Call this new table
SERVICE1.
SERVICE1
ID DateOfService Description AmountBilled AmountPaid DateOfPayment Phone
1 5/10/2003 Trim Shrubs $75.00 $75.00 5/30/2003 540.433.2200
2 5/10/2003 Trim Shrubs $75.00 $75.00 5/30/2003 540.566.1122
3 5/12/2003 Mow Lawn $35.00 $35.00 6/1/2003 703.777.2021
4 5/14/2003 Mulch $125.00 $50.00 6/30/2003 540.433.5572
Shrubs
8. You now have three possible database structures:
1-14
Chapter One Introduction to Database Processing
1-15