Sunteți pe pagina 1din 5

Chapter 4: The Relational Model 3: Advanced Topics

True / False
14. A stored procedure is placed on a client computer.
1. Views cannot be used to examine table data.
2. An individual can use a view to create report, charts,
and other objects that show database data.

3. A view is a physical table in the DBMS.


4. To create a view in Access, you simply create and
then save a query.

5. One advantage of using views is that they provide


data dependence.

6. One advantage of a view is that different users can


view the same data in different ways.
7. Indexes can increase the efficiency with which data is
retrieved from the database.
8. When you create an index whose key has a single
field, you have created what is called a single-column
index.
9. The command DEL INDEX CustList; would remove
the index named CustList.
10. The following command will enable Jones to retrieve
data from the Customer table, but not to take any other
action: GRANT SELECT ON Customer Jones ;
11. Referential integrity is specified using the FOREIGN
KEY clause in the SELECT command.
12. Legal-values integrity is the property that states that
no record can exist in the database with a value in the
field other than one of the legal values.
13. Information about tables in the database is kept in
the system catalog.

Cengage Learning Testing, Powered by Cognero

Page 1

Chapter 4: The Relational Model 3: Advanced Topics

15. Access supports stored procedures.


Multiple Choice
16. The ____ command will create an application program's or individual user's picture of the database.
a.
CREATE INDEX
b.
SELECT INDEX
c.
SELECT VIEW
d.
CREATE VIEW
17. A row-and-column subset ____ consists of a subset of the rows and columns in some individual table.
a.
view
b.
trigger
c.
index
d.
catalog
18. To create an index named RepBal with the keys RepNum and Balance and with the balances listed in descending order, the
command is ____.
a.
CREATE INDEX RepBal ON Customer (RepNum, Balance) ;
b.
CREATE INDEX RepBal Customer (RepNum DESC) ;
c.
CREATE INDEX ON Customer (RepNum, Balance ASC) ;
d.
CREATE INDEX RepBal ON Customer (RepNum, Balance DESC) ;
19. The ____ statement will take away user privileges to the database.
a.
SELECT
b.
INDEX
c.
DEL
d.
REVOKE
20. In Access, a key symbol appears in the row selector of the field that is the ____ key.
a.
index
b.
catalog
c.
Foreign
d.
Primary
21. To create the primary key clause for the Customer table on the CustomerNum field, the correct statement is ____.
a.
PRIMARY KEY (CustomerNum)
b.
PRIMARY KEY (Customer, CustomerNum)
c.
KEY (CustomerNum)
d.
PRIMARY (CustomerNum)
22. To create the primary key clause for the OrderLine table on the OrderNum and ItemNum fields, the correct statement is ____.
a.
PRIMARY KEY (OrderLine, OrderNum, ItemNum)
b.
KEY (OrderNum, ItemNum)
c.
PRIMARY KEY (OrderNum, ItemNum)
d.
PRIMARY (OrderNum, ItemNum)
23. Essentially, setting the value in a given field to ____ is similar to not entering a value in it at all.
a.
N/A
Cengage Learning Testing, Powered by Cognero

Page 2

Chapter 4: The Relational Model 3: Advanced Topics


b.
c.
d.

nil
null
0

24. Which of the following statement fragments will only allow a CreditLimit of $5,000, $7,500, or $15,000?
a.
(CreditLimit IN (5000, 7500, 15000))
b.
CHECK ((5000, 7500, 15000))
c.
CHECK (CreditLimit LIKE (5000, 7500, 15000))
d.
CHECK (CreditLimit IN (5000, 7500, 15000))
25. The CHECK clause can be included in the ____ command.
a.
SELECT TABLE
b.
ALTER TABLE
c.
DROP TABLE
d.
DELETE TABLE
26. In SQL, you use the CHECK clause to enforce ____ integrity.
a.
referential
b.
legal-values
c.
entity
d.
catalog
27. To insert a new field in a table, the ____ keyword should be used with the ALTER TABLE command.
a.
INSERT
b.
ADD
c.
INCLUDE
d.
ALTER
28. The SQL command for deleting the Storehouse field from the Item table is ____.
a.
ALTER TABLE Item DELETE Storehouse ;
b.
ALTER TABLE Item DROP COLUMN Storehouse ;
c.
ALTER Item DELETE Storehouse ;
d.
ALTER TABLE DELETE Storehouse ;
29. The statement, ____, removes the table Smaller from a DBMS.
a.
DELETE TABLE Smaller ;
b.
DROP TABLE Smaller ;
c.
REMOVE TABLE Smaller ;
d.
RID TABLE Smaller ;
30. In a client/server system, the database resides on a computer called the ____.
a.
index
b.
documenter
c.
server
d.
client
31. In a client/server system, users access the database through ____.
a.
triggers
b.
documenters
Cengage Learning Testing, Powered by Cognero

Page 3

Chapter 4: The Relational Model 3: Advanced Topics


c.
d.

servers
clients

32. If you anticipate running a particular query often, you can improve overall performance by saving the query in a special file called
a(n) ____.
a.
index
b.
stored procedure
c.
trigger
d.
view
33. A(n) ____ is a computer that is connected to a network and has access through the server to the database.
a.
client
b.
view
c.
index
d.
trigger
34. A(n) ____ is an action that occurs automatically in response to an associated database operation such as an INSERT, UPDATE, or
DELETE command.
a.
stored procedure
b.
trigger
c.
view
d.
index
35. A trigger is stored and compiled on the ____.
a.
b.
c.
d.

client
Web
index
server

Completion
36. Within relational model systems on both mainframes and personal computers, the main mechanism for increasing the efficiency
with which data is retrieved from the database is the ____________________.
ANSWER:
index
37. The field or combination of fields on which an index is built is called the ____________________ key.
ANSWER:
index
38. A(n) ____________________ index is an index with more than one key field.
ANSWER:
multiple-field

multiple field
multiple-column
multiple column
39. Within an organization, the ____________________ determines the types of access various users can have to the database.
ANSWER:
database administrator

DBA
40. ____________________ is the prevention of unauthorized access to the database.
ANSWER:
Security
41. The type of field for which you should never allow nulls is the ____________________.
ANSWER:
primary key
Cengage Learning Testing, Powered by Cognero

Page 4

Chapter 4: The Relational Model 3: Advanced Topics


42. In Access, you can restrict the legal values accepted by a field by entering an appropriate ____________________ that data
entered in the field must follow.
ANSWER:
validation rule
43. In a system catalog, the ____________________ table contains information about the tables known to SQL.
ANSWER:
Systables
44. Access has a tool called the ____________________, which allows you to easily print detailed documentation concerning any
table, query, report, form, or other object in the database.
ANSWER:
Documenter
45. In Access, a(n) ____________________ enables you to add logic to table events such as adding, changing, or deleting data
ANSWER:
data macro
Essay
46. What are the advantages of having views only contain the fields required by a given user?
ANSWER: This practice has two advantages. First, because the view will, in all probability, contain fewer fields than the

overall database and the view is conceptually a single table, rather than a collection of tables, it greatly
simplifies the users perception of the database. Second, views provide a measure of security. Fields that are
not included in the view are not accessible to the views user. Likewise, rows that are not included in the view
are not accessible.
47. Explain what is meant by a null value. Is a null value the same as a value of zero?
ANSWER: Essentially, setting the value in a given field to null is similar to not entering a value in the field at all. Nulls are used when a
value is missing, unknown, or inapplicable. It is not the same as a blank or zero value, both of which are actual values. For
example, a value of zero in the Balance field for a particular customer indicates that the customer has a zero balance. A
value of null in a customers Balance field, on the other hand, indicates that, for whatever reason, the customers balance is
unknown.
48. What is the difference between entity integrity and referential integrity?
ANSWER: Entity integrity is the rule that no field that is part of the primary key may accept null values. Entity integrity

guarantees that each record will indeed have its own identity. In other words, preventing the primary key from
accepting null values ensures that you can distinguish one record from another. Referential integrity is the rule
that if table A contains a foreign key that matches the primary key of table B, the values of this foreign key must
either match the value of the primary key for some row in table B, or be null.
49. Discuss what are validation rules and validation text.
ANSWER: In Access, you can restrict the legal values accepted by a field by entering an appropriate validation rule that

data entered in the field must follow. Along with the validation rule, you usually enter validation text to inform the
user of the reason for the rejection when the user attempts to enter data that violates the rule.
50. Discuss what you can do if you need to change a tables structure in ways that are beyond the capabilities of your

DBMS.
ANSWER: In some cases, you might need to change a tables structure in ways that are beyond the capabilities of your

DBMS. In these situations, you can use the CREATE TABLE command to describe the new table, and then
insert values into it using the INSERT command combined with an appropriate SELECT clause. If you are using
a version of SQL that supports the SELECT INTO command, as Access does, you can use it to create the new
table in a single operation.

Cengage Learning Testing, Powered by Cognero

Page 5

S-ar putea să vă placă și