You are on page 1of 18

Test Bank for Database Systems: Introduction to Databases and Data Warehouses, Nenad Jukic,

Test Bank for Database Systems: Introduction to


Databases and Data Warehouses, Nenad Jukic,
Susan Vrbsky Svetlozar Nestorov

To download the complete and accurate content document, go to:


https://testbankbell.com/download/test-bank-for-database-systems-introduction-to-dat
abases-and-data-warehouses-nenad-jukic-susan-vrbsky-svetlozar-nestorov/

Visit TestBankBell.com to get complete for all chapters


Database Systems (Jukic)
Chapter 6 Database Implementation and Use

6.1 Multiple Choice Questions

1) Which of the following describes the accuracy data quality characteristic?


A) The degree to which all the required data is present in the data collection
B) The extent to which the data conforms to its specified format
C) The extent to which data correctly reflects the real world instances it is supposed to depict
D) The extent to which the data properly conforms to and matches up with the other data
Answer: C
Diff: 1 Page Ref: 197-200

2) Which of the following describes the uniqueness data quality characteristic?


A) The degree to which all the required data is present in the data collection
B) The characteristic that requires each real-world instance to be represented only once in the data
collection
C) The extent to which data correctly reflects the real world instances it is supposed to depict
D) The extent to which the data properly conforms to and matches up with the other data
Answer: B
Diff: 1 Page Ref: 197-200

3) Which of the following describes the completeness data quality characteristic?


A) The degree to which all the required data is present in the data collection
B) The characteristic that requires each real-world instance to be represented only once in the data
collection
C) The extent to which the data properly conforms to and matches up with the other data
D) The degree to which the data is aligned with the proper time window in its representation of the real
world
Answer: A
Diff: 1 Page Ref: 197-200

4) Which of the following describes the consistency data quality characteristic?


A) The degree to which all the required data is present in the data collection
B) The extent to which the data properly conforms to and matches up with the other data
C) The extent to which data correctly reflects the real world instances it is supposed to depict
D) The extent to which the data conforms to its specified format
Answer: B
Diff: 1 Page Ref: 197-200

1
Copyright © 2014 Pearson Education, Inc.
5) Which of the following describes the timeliness data quality characteristic?
A) The degree to which all the required data is present in the data collection
B) The characteristic that requires each real-world instance to be represented only once in the data
collection
C) The extent to which data correctly reflects the real world instances it is supposed to depict
D) The degree to which the data is aligned with the proper time window in its representation of the real
world
Answer: D
Diff: 1 Page Ref: 197-200

6) Which of the following describes the conformity data quality characteristic?


A) The degree to which all the required data is present in the data collection
B) The extent to which the data properly conforms to and matches up with the other data
C) The extent to which data correctly reflects the real world instances it is supposed to depict
D) The extent to which the data conforms to its specified format
Answer: D
Diff: 1 Page Ref: 197-200

2
Copyright © 2014 Pearson Education, Inc.
HAPPY INSURANCE
Observe the HAPPY INSURANCE DATABASE:

CLIENT
ClientID ClientName ClientAgent ClientSpouseName
C111 Tom A1 Jenny
C222 Karin A1 Bill
C333 Cole A2 Amy
C444 Dorothy A2
C555 Andy A3 Amy
C666 Tina A3 Matt
C777 Christina A4 Mike

AGENT
AgentID AgentName AgentArea AgentRating AgentYearOfHire SupervisedBy
A1 Kate 1 101 1990
A2 Amy 2 92 2009 A1
A3 Luke 3 100 1992
A4 James 3 90 2010 A3

AREA
AreaID AreaName AreaHQ
1 East Boston
2 West San Francisco
3 Central Chicago

This database will be used for the following questions citing tables from the HAPPY INSURANCE
database.

7) If a DBMS enforces a DELETE RESTRICT option on the referential integrity constraint between
CLIENT and AGENT in the HAPPY INSURANCE database, what will be the outcome after a
user tries to delete the last record (A4, James, 3, 90, 2010, A3) from AGENT?
A) CLIENT will have 7 records
AGENT will have 4 records
B) CLIENT will have 6 records
AGENT will have 3 records
C) CLIENT will have 7 records
AGENT will have 3 records
D) CLIENT will have 6 records
AGENT will have 4 records
Answer: A
Diff: 2 Page Ref: 177-181

3
Copyright © 2014 Pearson Education, Inc.
8) If a DBMS enforces a DELETE RESTRICT option on the referential integrity constraint between
CLIENT and AGENT in the HAPPY INSURANCE database, what will be the outcome after a
user tries to delete the last record (C777, Christina, A4, Mike) from CLIENT?
A) CLIENT will have 7 records
AGENT will have 4 records
B) CLIENT will have 6 records
AGENT will have 3 records
C) CLIENT will have 7 records
AGENT will have 3 records
D) CLIENT will have 6 records
AGENT will have 4 records
Answer: D
Diff: 2 Page Ref: 177-181

9) If a DBMS enforces a DELETE CASCADE option on the referential integrity constraint between
CLIENT and AGENT in the HAPPY INSURANCE database, what will be the outcome after a
user tries to delete the last record (A4, James, 3, 90, 2010, A3) from AGENT?
A) CLIENT will have 7 records
AGENT will have 4 records
B) CLIENT will have 6 records
AGENT will have 3 records
C) CLIENT will have 7 records
AGENT will have 3 records
D) CLIENT will have 6 records
AGENT will have 4 records
Answer: B
Diff: 2 Page Ref: 177-181

10) If a DBMS enforces a DELETE SET-TO-NULL option on the referential integrity constraint between
CLIENT and AGENT in the HAPPY INSURANCE database, what will be the outcome after a
user tries to delete the last record (A4, James, 3, 90, 2010, A3) from AGENT?
A) CLIENT will have 7 records
AGENT will have 4 records
B) CLIENT will have 6 records
AGENT will have 3 records
C) CLIENT will have 7 records
AGENT will have 3 records
D) CLIENT will have 6 records
AGENT will have 4 records
Answer: C
Diff: 2 Page Ref: 177-181

4
Copyright © 2014 Pearson Education, Inc.
11) If a DBMS enforces a DELETE SET-TO-DEFAULT option on the referential integrity constraint
between
CLIENT and AGENT in the HAPPY INSURANCE database, what will be the outcome after a
user tries to delete the last record (A4, James, 3, 90, 2010, A3) from AGENT?
A) CLIENT will have 7 records
AGENT will have 4 records
B) CLIENT will have 6 records
AGENT will have 3 records
C) CLIENT will have 7 records
AGENT will have 3 records
D) CLIENT will have 6 records
AGENT will have 4 records
Answer: C
Diff: 2 Page Ref: 177-181

12) If a DBMS enforces an UPDATE RESTRICT option on the referential integrity constraint between
CLIENT and AGENT in the HAPPY INSURANCE database, what will be the outcome after a
user tries to change the AgentID value in the last record to A5?

A) Value A4 appears once in column AgentID in AGENT, and value A4 appears once in column
ClientAgent in table CLIENT
B) Value A5 appears once in column AgentID in AGENT, and value A5 appears once in column
ClientAgent in table CLIENT
C) Value A5 appears once in column AgentID in AGENT, and value A5 does not appear in column
ClientAgent in table CLIENT
D) Value A5 does not appear in column AgentID in AGENT, and value A5 appears once in column
ClientAgent in table CLIENT
Answer: A
Diff: 2 Page Ref: 181-184

13) If a DBMS enforces an UPDATE CASCADE option on the referential integrity constraint between
CLIENT and AGENT in the HAPPY INSURANCE database, what will be the outcome after a
user tries to change the AgentID value in the last record to A5?

A) Value A4 appears once in column AgentID in AGENT, and value A4 appears once in column
ClientAgent in table CLIENT
B) Value A5 appears once in column AgentID in AGENT, and value A5 appears once in column
ClientAgent in table CLIENT
C) Value A5 appears once in column AgentID in AGENT, and value A5 does not appear in column
ClientAgent in table CLIENT
D) Value A5 does not appear in column AgentID in AGENT, and value A5 appears once in column
ClientAgent in table CLIENT
Answer: B
Diff: 2 Page Ref: 181-184

5
Copyright © 2014 Pearson Education, Inc.
14) If a DBMS enforces an UPDATE SET-TO-NULL option on the referential integrity constraint between
CLIENT and AGENT in the HAPPY INSURANCE database, what will be the outcome after a
user tries to change the AgentID value in the last record to A5?

A) Value A4 appears once in column AgentID in AGENT, and value A4 appears once in column
ClientAgent in table CLIENT
B) Value A5 appears once in column AgentID in AGENT, and value A5 appears once in column
ClientAgent in table CLIENT
C) Value A5 appears once in column AgentID in AGENT, and value A5 does not appear in column
ClientAgent in table CLIENT
D) Value A5 does not appear in column AgentID in AGENT, and value A5 appears once in column
ClientAgent in table CLIENT
Answer: C
Diff: 2 Page Ref: 181-184

ARC UNIVERSITY

Observe the following scenario in ARC UNIVERSITY, taking place in 2013. An office worker was given
a task to enter into a table all currently enrolled students at ARC UNIVERSITY. He just started and so far
he has correctly entered five records, shown in the table CURRENTLY ENROLLED STUDENTS. There
are no errors in any of the five records entered so far.

CURRENTLY ENROLLED STUDENTS (YEAR 2013)


Student Student Student Date Date of Student Home Student Home
ID Lname Fname Student E-mail Date of Birth Started Graduation Town Country
200601 Zhong Xiang zhongx@arc.edu 12.11.1995. 1.1.2010. 1.1.2014. Beijing China
200602 Little Mark littlem@arc.edu 04.05.1994. 1.1.2011. 1.1.2015. Detroit USA
200701 Jones Mary jonesm@arc.edu 11.03.1993. 1.1.2010. 1.1.2014. Chicago USA
200702 Lalime Patrick lalimep@arc.edu 04.02.1995. 1.1.2012. 1.1.2016. Toronto Canada
200703 Kuyt Marco kuytm@arc.edu 03.08.1992. 1.1.2010. 1.1.2014. Amsterdam Netherlands

This scenario will be used for the following questions citing table CURRENTLY ENROLLED STUDENTS.

15) If the office worker inserts the record below into the table CURRENTLY ENROLLED STUDENTS,
which problem will occur? (Assume that all the dates in the record below are correct.)

200603 Little Mark littlem@arc.edu 04.05.1994. 1.1.2011. 1.1.2015. Detroit US

A) Accuracy
B) Uniqueness
C) Conformity
D) No data quality problem with this record
Answer: B
Diff: 2 Page Ref: 197-200

6
Copyright © 2014 Pearson Education, Inc.
16) If the office worker inserts the record below into the table CURRENTLY ENROLLED STUDENTS,
which problem will occur? (Assume that all the dates in the record below are correct.)

200705 McCormick Chris mccormickc@arc.edu 11.10.1992. 1.1.2010. 1.1.2014. Chicago USA

A) Accuracy
B) Uniqueness
C) Conformity
D) No data quality problem with this record
Answer: D
Diff: 2 Page Ref: 197-200

17) If the office worker inserts the record below into the table CURRENTLY ENROLLED STUDENTS,
which problem will occur? (Assume that all the dates in the record below are correct.)

200706 DeBoot Inge debooti@arc.edu 10.11.1994. 1.1.2011. 1.1.2015. Amsterdam Never Land

A) Accuracy
B) Completeness
C) Conformity
D) No data quality problem with this record
Answer: A
Diff: 2 Page Ref: 197-200

18) If the office worker inserts the record below into the table CURRENTLY ENROLLED STUDENTS,
which problem will occur? (Assume that all the dates in the record below are correct.)

200401 Cruz Julio cruzj@arc.edu 01.02.1990. 1.1.2010. 1.1.2014. Mexico City

A) Accuracy
B) Completeness
C) Conformity
D) No data quality problem with this record
Answer: B
Diff: 2 Page Ref: 197-200

19) If the office worker inserts the record below into the table CURRENTLY ENROLLED STUDENTS,
which problem will occur? (Assume that all the dates in the record below are correct.)

200707 Busse Otto busseo@arc.edu Jan-2-1994. 1.1.2011. 1.1.2015. Berlin Germany

A) Accuracy
B) Completeness
C) Conformity
D) No data quality problem with this record
Answer: C
Diff: 2 Page Ref: 197-200

7
Copyright © 2014 Pearson Education, Inc.
20) Observe the three records below that are NOT YET entered in the table CURRENTLY ENROLLED
STUDENTS. (Assume all the shown values in all three records are correct.)

201001 Smith Susan smiths@arc.edu 06.06.1993. 1.1.2014. 1.1.2018. Chicago USA

201002 Still Meg stillm@arc.edu 07.07.1991. 1.1.2010. 1.1.2014. Chicago USA

201003 Soto Alex sotoa@arc.edu 08.08.1990. 1.1.2007. 1.1.2011. Chicago USA

Which of these three records that are not yet entered should be entered into the table CURRENTLY
ENROLLED STUDENTS in order to avoid the timeliness problem?

A) The record with Student ID value 201001 (for student Susan Smith)
B) The record with Student ID value 201002 (for student Meg Still)
C) The record with Student ID value 201003 (for student Alex Soto)
D) All three records
Answer: B
Diff: 2 Page Ref: 197-200

6.2 True/False Questions

1) A web site can be an interface into a database.


Answer: TRUE
Diff: 1 Page Ref: 197

2) Mandating instantaneous entry of all new data is an example of a preventive data quality action.
Answer: TRUE
Diff: 2 Page Ref: 200

3) Using an input mask such as DD/MM/YYYY for entry of a date value is an example of a corrective data
quality action.
Answer: FALSE
Diff: 2 Page Ref: 200

4) Most RDBMS packages implement assertions using the CREATE ASSERTION statement.
Answer: FALSE
Diff: 3 Page Ref: 202

8
Copyright © 2014 Pearson Education, Inc.
HAPPY INSURANCE
Observe the HAPPY INSURANCE DATABASE:

CLIENT
ClientID ClientName ClientAgent ClientSpouseName
C111 Tom A1 Jenny
C222 Karin A1 Bill
C333 Cole A2 Amy
C444 Dorothy A2
C555 Andy A3 Amy
C666 Tina A3 Matt
C777 Christina A4 Mike

AGENT
AgentID AgentName AgentArea AgentRating AgentYearOfHire SupervisedBy
A1 Kate 1 101 1990
A2 Amy 2 92 2009 A1
A3 Luke 3 100 1992
A4 James 3 90 2010 A3

AREA
AreaID AreaName AreaHQ
1 East Boston
2 West San Francisco
3 Central Chicago

This database will be used for the following questions citing tables from the HAPPY INSURANCE
database.

5) If a DBMS enforces in the HAPPY INSURANCE database a DELETE RESTRICT option on the
referential integrity constraint between AREA and AGENT, and a DELETE CASCADE between AGENT
and CLIENT, the first record in the table AGENT can be deleted.
Answer: TRUE
Diff: 3 Page Ref: 177-181

6) If a DBMS enforces in the HAPPY INSURANCE database a DELETE RESTRICT option on the
referential integrity constraint between AREA and AGENT, and a DELETE CASCADE between AGENT
and CLIENT, the first record in the table AREA can be deleted.
Answer: FALSE
Diff: 3 Page Ref: 177-181

7) If a DBMS enforces in the HAPPY INSURANCE database a DELETE RESTRICT option on the
referential integrity constraint between AGENT and AGENT (i.e., circular referential integrity constraint
for table AGENT) in the HAPPY INSURANCE database, and a DELETE CASCADE between AGENT and
CLIENT, the first record in the table AGENT can be deleted.
Answer: FALSE
Diff: 3 Page Ref: 177-181

9
Copyright © 2014 Pearson Education, Inc.
8) If a DBMS enforces in the HAPPY INSURANCE database a DELETE RESTRICT option on the
referential integrity constraint between AGENT and AGENT (i.e., circular referential integrity constraint
for table AGENT) in the HAPPY INSURANCE database, and a DELETE CASCADE between AGENT and
CLIENT, the second record in the table AGENT can be deleted.
Answer: TRUE
Diff: 3 Page Ref: 177-181

9) If a DBMS enforces in the HAPPY INSURANCE database an UPDATE RESTRICT option on the
referential integrity constraint between AGENT and AGENT (i.e., circular referential integrity constraint
for table AGENT) in the HAPPY INSURANCE database, and an UPDATE CASCADE between AGENT
and CLIENT, value A1 in the first record in the table AGENT can be changed to A5.
Answer: FALSE
Diff: 3 Page Ref: 177-181

10) If a DBMS enforces in the HAPPY INSURANCE database an UPDATE RESTRICT option on the
referential integrity constraint between AGENT and AGENT (i.e., circular referential referential integrity
constraint for table AGENT) in the HAPPY INSURANCE database, and an UPDATE CASCADE between
AGENT and CLIENT, value A1 in the second record in the table AGENT can be changed to A5.
Answer: FALSE
Diff: 3 Page Ref: 177-181

6.3 Essay Questions

1) Describe the delete restrict option (for implementing a referential integrity constraint).
Answer: The delete restrict option does not allow a record to be deleted if its primary key value is
referred to by a foreign key value.
Diff: 1 Page Ref: 178

2) Describe the delete cascade option (for implementing a referential integrity constraint).
Answer: The delete cascade option allows a record to be deleted if its primary key value is referred to by
a foreign key value. However, all the records whose foreign key value refers to the primary key value of
the record that is being deleted will also be deleted.
Diff: 1 Page Ref: 179

3) Describe the delete set-to-null option (for implementing a referential integrity constraint).
Answer: The delete set-to-null option allows a record to be deleted if its primary key value is referred to
by a foreign key value of a record in another relation. As a consequence, in all of the records where the
foreign key value refers to the primary key of the record that is being deleted, the value of the foreign key
is set to null.
Diff: 1 Page Ref: 180

4) Describe the delete set-to-default option (for implementing a referential integrity constraint).
Answer: The delete set-to-default option allows a record to be deleted if its primary key value is referred
to by a foreign key value of a record in another relation. As a result, in all of the records where the foreign
key value refers to the primary key of the record that is being deleted, the value of the foreign key is set to
a predetermined default value.
Diff: 1 Page Ref: 180-181

10
Copyright © 2014 Pearson Education, Inc.
5) Describe the update restrict option (for implementing a referential integrity constraint).
Answer: The update restrict option does not allow the primary key value of a record to be changed if its
primary key value is referred to by a foreign key value.
Diff: 1 Page Ref: 181

6) Describe the update cascade option (for implementing a referential integrity constraint).
Answer: The update cascade option allows the primary key value of a record to be changed if its primary
key value is referred to by a foreign key value. However, all the foreign key values that refer to the
primary key being changed are also changed and set to the new value of the primary key.
Diff: 1 Page Ref: 182

7) Describe the update set-to-null option (for implementing a referential integrity constraint).
Answer: The update set-to-null option allows a record to be changed if its primary key value is referred
to by a foreign key value of a record in another relation. As a consequence, in all of the records where the
foreign key value refers to the primary key being changed, the value of the foreign key is set to null.
Diff: 1 Page Ref: 182-183

8) Describe the update set-to-default option (for implementing a referential integrity constraint).
Answer: The update set-to-default option allows a record to be changed if its primary key value is
referred to by a foreign key value of a record in another relation. As a consequence, in all of the records
where the foreign key value refers to the primary key being changed, the value of the foreign key is set to
a predetermined default value.
Diff: 1 Page Ref: 183-184

9) What is the purpose of an index?


Answer: An index is a mechanism for increasing the speed of data search and data retrieval on relations
with a large number of records.
Diff: 1 Page Ref: 187-192

10) What is linear search?


Answer: Linear search finds a particular value in a list by checking elements sequentially and one at a
time until the searched-for value is found.
Diff: 2 Page Ref: 187-188

11) What is binary search?


Answer: Binary search is a nonlinear search method that takes advantage of sorted lists. It divides the
sorted list initially in two parts (hence the name binary) of the same size by looking up the value in the
middle of the list. If the searched-for value is larger than the value in the middle of the list, the top part of
the list is eliminated from the search space. Equivalently, if the searched-for value is smaller than the
value in the middle of the list, the bottom part of the list is eliminated from the search space. Either way,
the search space is reduced by half in one single step. This process of looking up the value in the middle
and halving the search space is repeated in the remaining part of the list, until the searched-for value is
found.
Diff: 3 Page Ref: 187-188

11
Copyright © 2014 Pearson Education, Inc.
12) What is a form?
Answer: A form is a database front-end component whose purpose is to enable data input and retrieval
for end users in a way that is straightforward and requires no training. It provides an interface into a
database relation or query.
Diff: 1 Page Ref: 192

13) What is a report?


Answer: A report is a database front-end component whose purpose is to present the data and
calculations on the data from one or more tables from the database in a formatted way. Whereas the
purpose of forms is to facilitate the interaction between the end users and the database by enabling users
to engage in actions such as update and search, reports are used strictly for the retrieval of data. The data
that is retrieved via reports is formatted and arranged in a professional and easy-to-view fashion, to be
displayed on the screen or printed as a hard copy.
Diff: 1 Page Ref: 194

14) What are preventive data quality actions?


Answer: Preventive data quality actions are actions taken to preclude the data quality problems.
Diff: 2 Page Ref: 200

15) What are corrective data quality actions?


Answer: Corrective data quality actions are actions taken to correct the data quality problems.
Diff: 2 Page Ref: 200

16) What is a trigger?


Answer: A trigger is a rule that is activated by a deletion of a record, insertion of a record, or a
modification (update) of a record in a relation.
Diff: 2 Page Ref: 203

12
Copyright © 2014 Pearson Education, Inc.
HAPPY INSURANCE
Observe the HAPPY INSURANCE DATABASE:

CLIENT
ClientID ClientName ClientAgent ClientSpouseName
C111 Tom A1 Jenny
C222 Karin A1 Bill
C333 Cole A2 Amy
C444 Dorothy A2
C555 Andy A3 Amy
C666 Tina A3 Matt
C777 Christina A4 Mike

AGENT
AgentID AgentName AgentArea AgentRating AgentYearOfHire SupervisedBy
A1 Kate 1 101 1990
A2 Amy 2 92 2009 A1
A3 Luke 3 100 1992
A4 James 3 90 2010 A3

AREA
AreaID AreaName AreaHQ
1 East Boston
2 West San Francisco
3 Central Chicago

This database will be used for the following questions citing tables from the HAPPY INSURANCE
database.

17) Show the CREATE TABLE statements for HAPPY INSURANCE database for the table CLIENT
(assume that non-primary key columns can be optional) with the DELETE CASCADE option for its
referential integrity constraint.
Answer:
CREATE TABLE client
(clientid CHAR(4),
clientname CHAR(10),
clientagent CHAR(2),
clientspousename CHAR(10),
PRIMARY KEY (clientid),
FOREIGN KEY (clientagent) REFERENCES agent
ON DELETE CASCADE);
Diff: 2 Page Ref: 184-185

13
Copyright © 2014 Pearson Education, Inc.
18) Show the CREATE TABLE statements for HAPPY INSURANCE database for the table CLIENT
(assume that non-primary key columns can be optional) with the DELETE SET-TO-NULL and UPDATE
CASCADE option for its referential integrity constraint.
Answer:
CREATE TABLE client
(clientid CHAR(4),
clientname CHAR(10),
clientagent CHAR(2),
clientspousename CHAR(10),
PRIMARY KEY (clientid),
FOREIGN KEY (clientagent) REFERENCES agent
ON DELETE SET NULL
ON UPDATE CASCADE);
Diff: 2 Page Ref: 184-185

19) Show the CREATE TABLE statements for HAPPY INSURANCE database for the table AGENT
(assume that non-primary key columns can be optional) with the user defined constraint specifying that
the agent rating must be between 50 and 150.
Answer:
6CREATE TABLE agent
(agentid CHAR(2),
agentname CHAR(10),
agentarea CHAR(1),
agentrating INT CHECK (agentrating >= 50 AND agentrating <= 150)
agentyearofhire INT,
supervisedby CHAR(2),
PRIMARY KEY (agentid),
FOREIGN KEY (agentarea) REFERENCES area,
FOREIGN KEY (supervisedby) REFERENCES agent);
Diff: 3 Page Ref: 184-185

20) Show the SQL statement that will for HAPPY INSURANCE database create and index on the
ClientName column of the table CLIENT.
Answer: CREATE INDEX clientname_index ON client(clientname);
Diff: 2 Page Ref: 192

21) Assume a data-entry form for HAPPY INSURANCE database is created where a user can perform the
following data-entry action:

ENTER AREA ID: 4 (<--- Entered by the user)


ENTER AREA NAME: South (<--- Entered by the user)
ENTER AREA HQ: Atlanta (<--- Entered by the user)

Write the SQL statement that will be issued on the user's behalf based on this action.
Answer: INSERT INTO area VALUES ('4', 'South','Atlanta');
Diff: 2 Page Ref: 192-194

14
Copyright © 2014 Pearson Education, Inc.
22) Assume a form is created for HAPPY INSURANCE database where a user can perform the following
action:
A user highlights the first row of the CLIENT table and presses the delete key on the keyboard.
Write the SQL statement that will be issued on the user's behalf based on this action.
Answer:
DELETE FROM client
WHERE clientid = 'C111';
Diff: 2 Page Ref: 192-193

23) Assume a form is created for HAPPY INSURANCE database where a user can perform the following
action:
A user highlights value A1 in the first row of the CLIENT table and changes it to A4.
Write the SQL statement that will be issued on the user's behalf based on this action.
Answer:
UPDATE client
SET clientagent = 'A4'
WHERE clientid = 'C111';
Diff: 3 Page Ref: 192-194

24) Assume a search form for HAPPY INSURANCE database is created where a user can perform the
following action:

ENTER AREA ID:


ENTER AREA NAME:
ENTER AREA HQ:
ENTER AGENTID:
ENTER AGENTNAME:
ENTER AGENTAREA: 3 (<--- Entered by the user)
ENTER AGENTRATING:
ENTER AGENTYEAROFHIRE:
ENTER SUPERVISEDBY:

(User clicks on the search button upon entering the value above.)

Write the SQL statement that will be issued on the user's behalf based on this action.
Answer:
SELECT *
FROM agent
WHERE agentarea = '3';
Diff: 2 Page Ref: 192-194

15
Copyright © 2014 Pearson Education, Inc.
Test Bank for Database Systems: Introduction to Databases and Data Warehouses, Nenad Jukic,

25) Assume a search form for HAPPY INSURANCE database is created where a user can perform the
following action:

ENTER AREA ID:


ENTER AREA NAME:
ENTER AREA HQ:
ENTER AGENTID:
ENTER AGENTNAME:
ENTER AGENTAREA:
ENTER AGENTRATING:
ENTER AGENTYEAROFHIRE: 2010 (<--- Entered by the user)
ENTER SUPERVISEDBY: A3 (<--- Entered by the user)

(User clicks on the search button upon entering the values above.)

Write the SQL statement that will be issued on the user's behalf based on this action.
Answer:
16
Copyright © 2014 Pearson Education, Inc.
SELECT *
FROM agent
WHERE agentyearofhire = 2010 and supervisedby = 'A3';
Diff: 2 Page Ref: 192-194

16
Copyright © 2014 Pearson Education, Inc.

Visit TestBankBell.com to get complete for all chapters

You might also like