Download Chapter 10 Review Questions and Answers

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Concurrency control wikipedia , lookup

DBase wikipedia , lookup

Open Database Connectivity wikipedia , lookup

Microsoft SQL Server wikipedia , lookup

SQL wikipedia , lookup

Functional Database Model wikipedia , lookup

Database wikipedia , lookup

Ingres (database) wikipedia , lookup

Entity–attribute–value model wikipedia , lookup

Microsoft Jet Database Engine wikipedia , lookup

Relational algebra wikipedia , lookup

Clusterpoint wikipedia , lookup

Extensible Storage Engine wikipedia , lookup

Versant Object Database wikipedia , lookup

Join (SQL) wikipedia , lookup

Relational model wikipedia , lookup

Database model wikipedia , lookup

Transcript
Chapter 10 Review Questions and Answers
1. Explain how validation rules can help maintain the integrity of a database.
Spelling errors, typos, and other mistakes in data entry will render a database untrustworthy.
Validation rules check entries against specified values to help maintain the integrity of a
database.
2. Explain the difference between a validation rule and an input mask.
A validation rule checks entries against specified values and an input mask controls how data is
entered.
3. List the relational operators and logical operators that can be used to form a validation rule.
Relational Operators:
< less than
> greater than
<= less than or equal to
>= greater than or equal to
<> not equal to
Logical Operators:
And
Or
Not
4. Can validation rules be applied to a database that already contains data? If so, what should be done
to ensure that existing data meets the validation rules?
Yes, data validation rules can be applied after the database has been populated. Click Design >
Test Validation Rules to verify that existing data meets validation rules. If existing data violates a
rule, a warning dialog box is displayed.
5. a) Why is an input mask useful?
An input mask is useful when entries should follow a certain format.
b) What are placeholders?
Placeholders are characters that help define the format of an entry.
c) What are two digits commonly used for placeholders?
Two digits commonly used for placeholders are 0 and 9.
d) What is the difference between placeholders and placeholder characters?
Placeholders, such as the digits 0 and 9, indicate that a digit is expected for that place. A 9
means that a digit is optional. Whereas, placeholder characters, such as a hyphen (-), are used to
force the entry to follow a certain format.
6. What types of fields are used to form a relationship between tables?
Fields of the same data type are used to form a relationship between tables.
7. What is a foreign key?
A foreign key is a field in a table that is a primary key in another table.
8. Explain a one-to-many relationship.
A one-to-many relationship means that there is one and only one record in the primary key
table that relates to zero, one, or more records in the related table.
9. Will the relationship between two tables need to be defined if one of the tables contains a lookup
field and the other table contains the data used by the lookup field?
No, because Access automatically defines a relationship between the table containing the
lookup field and the table containing the data.
10. a) What is a subdatasheet?
A subdatasheet displays records from another table that are related to the current record.
b) When is a subdatasheet available?
A subdatasheet is available when relationships have been defined.
c) How is a subdatasheet viewed?
Click the plus sign to expand the subdatasheet for a record.
d) How is a displayed subdatasheet removed from view?
A plus sign changes to a minus sign when a subdatasheet is displayed. Click the minus sign to
remove the subdatasheet.
11. a) What is a select query?
A select query is a database object which is used to retrieve or “select” data that matches
specified criteria.
b) What is the design grid?
The design grid is the part of the Query window where fields and criteria are entered.
12. Compare and contrast filters (from Chapter 9) and select queries.
Answers will vary. Filters and select queries both display records that meet specified criteria. A
select query can include any number of fields from related tables in a database, whereas, a filter
is applied to individual tables.
13. a) List the steps required to create and run a select query.
1. Click Create > Query Design.
2. In the dialog box, select a table name and then select Add.
3. Repeat this for every table with fields needed by the query and then select Close.
4. Drag fields into the design grid and specify criteria by typing the entry to match.
5. Click a Sort box, click the arrow, and then select a sort order.
6. Click Design > Run.
b) How is an existing query run?
Double-click the query name in the Navigation Pane.
14. Consider the Gadgets Sales database. The stock manager needs to know which items have less than
50 in stock.
a) Which fields should be used in the query?
The Product ID, the Product Name, and Stock fields should be used in the query.
b) Which tables store the fields?
The Products table stores the fields.
c) What is the criteria expression?
Stock box<50.
15. In Design view, can a field be added between existing fields in the design grid of a select query? If so,
how?
Yes. To add a field between two existing fields, place the insertion point in the column where
the new field should appear and then click Design > Insert Columns. A new column is added and
existing columns are moved to the right.
16. List the steps required to delete a column from the design grid of a select query.
1. Place the insertion point in the column to be deleted.
2. Click Design > Delete Columns.
17. A query similar to an existing query is needed. What is the most efficient approach to creating the
new query? Explain.
The most efficient approach to creating a query similar to an existing query is to modify the
existing query and then select Office Button > Save As to create the new query. This is the most
efficient approach because less work is needed to create the query.
18. a) What is a range query?
A range query is a select query with criteria that matches a range of values.
b) What kind of operators are used to create the criteria for a range query.
Relational operators, <, >, <=, >=, and <>, are used to create the criteria for a range query.
19. How can the And operator be implied in the criteria of a complex query?
The AND operator is implied in a complex query if criteria is specified in the same row.
20. What is the or row of a select query design grid used for? How is this different from criteria involving
And?
The or row of a select query design grid is used to create complex queries using OR. Using OR
requires data to match one criteria, while using AND requires data to match both criteria.
21. List two criteria wildcards that can be used in a select query and explain when each would be used.
Two criteria wildcards that can be used in a select query are the asterisk (*) and the question
mark (?). The * wildcard would be used to match any number of characters or no characters at
all. The ? wildcard would be used to match any one character or no character at all.
22. What does the Like operator in the design grid of a select query indicate?
The Like operator in the design grid of a select query indicates that the criteria includes
wildcards.
23. How would a reference to the Grade field in the Student table be typed in the criteria?
A reference to the Grade field in the Student table would be typed in the criteria as
[Student]![Grade].
24. a) What is mail merge?
Mail merge is the process of integrating an Access database with a document to create
personalized form letters.
b) What is a form letter?
A form letter is a Word document with merge fields.
c) What are merge fields?
Merge fields are placeholders for data in a Word document from an Access table or query.
25. a) What feature of Word is used to generate labels?
The mail merge feature is used to generate labels.
b) Are labels typically printed on plain paper? Explain.
No. Mailing labels are typically printed on adhesive paper with multiple labels to a page.
26. a) Validation rules can help preserve the integrity of a database.
True.
b) When used in a validation rule, the And logical operator requires an entry to match one criteria
or another, but not both.
False. The And logical operator requires an entry to match both criteria.
c) When used in a validation rule, the Or logical operator requires an entry to match one criteria or
another or both.
True.
d) An input mask is used for restricting entries in numeric fields.
False. An input mask is used to control how data is entered.
e) A table does not need to be related to any other table in a relational database.
False. Every table in a relational database is relate to at least one other table.
f)
A foreign key is never used to define a relationship between two tables.
False. The primary key in one table and the foreign key in another table are often used to define
a relationship.
g) A one-to-many relationship means that there are many records in the key table that match
many records in the related table.
False. A one-to-many relationship means that there is one and only one record in the primary
key table that relates to zero, one, or more records in the related table.
h) Tables in a relational database must form one-to-many relationships.
True.
i)
Subdatasheets are available before relationships are defined.
False. Subdatasheets are only available after relationships have been defined.
j)
A select query limits the data displayed to that which meets certain criteria.
True.
k) The > relational operator is used to specify criteria that is greater than a particular value.
True.
l)
In a select query, the And operator requires a record to match both criteria in order to be
displayed.
True.
m) In a select query, the Or operator requires that a record not match any criteria in order to be
displayed.
False. The Or operator requires that a record match one criteria in order to be displayed.
n) The ? wildcard matches any number of characters.
False. The ? wildcard matches any one character or no character at all.
o) Mail merge documents allow multiple personalized documents to be created quickly.
True.
p) Addresses for mailing labels must be individually typed, even when a database of the names and
addresses exist.
False. Mailing labels are created in a document that includes merge fields, which indicate where
data from an Access table or query will go.
q) A parameter query displays a dialog box at run time so that criteria can be varied.
True.
r) An update query cannot be reversed after it is run.
True.
27. 100% Markup Query
a) List the tables used in the SELECT.
Products
b) List the join used in the FROM.
There is not a join here because there is only one table: FROM Products
c) List the criteria in the WHERE.
The criteria is that the product price must be greater than the cost multiplied by 2:
(((Products.Price)>[Products]![Cost]*2))
d) If there is an additional clause to the SELECT statement, list that clause and describe what it
does.
There is an additional clause used to sort the records in ascending order by Product Name:
ORDER BY Products.[Product Name]
Brush Items Query
a) List the tables used in the SELECT.
Departments, Products
b) List the join used in the FROM.
The records are joined when the Product Department is the same:
FROM Departments INNER JOIN Products ON Departments.[Department
Name]=Products.Department
c) List the criteria in the WHERE.
The criteria is that the product name must contain the word ‘brush’:
(((Products.[Product Name]) Like "*brush*")) OR (((Products.[Product Name]) Like "*brush*"))
d) If there is an additional clause to the SELECT statement, list that clause and describe what it
does.
There is an additional clause used to sort the records in ascending order by Department Name:
ORDER BY Departments.[Department Name]