Full-text Searching - Quiz Explanation
The answers you selected are indicated below, along with text that explains the correct answers.
1.
How are full-text indexes updated?
Please select the best answer.
A.
Automatically
B.
Manually
C.
They do not need to be updated
D.
Either automatically or manually
The correct answer is B.
Full-text indexes are updated manually. C is incorrect because full-text indexes need to be updated just as relational indexes do. D is incorrect because you do not have a choice; full-text indexes are updated manually.
2.
Fred would like to implement full-text searching on the Comments column in the History table, defined like this:
Column Name
Datatype
HistoryID
Int
ArchiveDate
Smalldatetime
ArchivedBy
Varchar(30)
Comments
Int
Please select the best answer.
A.
What happens when he defines the full-text index?
B.
The index is created. He only needs to add the Comments column to the full-text index and no errors are expected.
C.
The index is created. Nothing else needs to be done.
D.
The index is not created.
The correct answer is D.
The index is created, but there will be an error when adding the column because it is an integer datatype. A is incorrect because errors should be expected. B is incorrect because he does need to add the column to the full-text index. C is incorrect because the index is created without columns.
3.
Which command would you use to retrieve data in the WHERE clause that allows you to be less precise in your search?
Please select the best answer.
A.
FREETEXT
B.
FREETEXTTABLE
C.
CONTAINS
D.
CONTAINSTABLE
The correct answer is A.
The FREETEXT command allows you to retrieve less precise data in the WHERE clause of a Transact-SQL statement. B is incorrect because the FREETEXTTABLE command is used in the FROM clause. C is incorrect because the CONTAINS command is more precise. D is incorrect because the CONTAINSTABLE command also is used in the FROM clause.
4.
What system stored procedure must you execute before you can create the full-text catalog by using the sp_fulltext_catalog system stored procedure?
Please select the best answer.
A.
sp_fulltext_service
B.
sp_fulltext_database
C.
sp_fulltext_table
D.
sp_fulltext_column
The correct answer is B.
Before you can create a full-text catalog, you must enable the database for full-text searching with the sp_fulltext_database procedure. A is incorrect because the sp_fulltext_service procedure is not required to be used. It only configures the service. C is incorrect because the sp_fulltext_table procedure is used to enable a table for full-text searching. You cannot do this if the catalog is not created. D is incorrect because the sp_fulltext_column procedure is used to add a column to a full-text index that already exists within a catalog.
5.
How can you use the Key column that is returned from the FREETEXTTABLE and CONTAINSTABLE commands?
Please select the best answer.
A.
You can only return the value to the browser.
B.
You can use it to return the name of the column(s) that make up the primary key.
C.
It is for internal purposes only.
D.
You can use its value to join with the column(s) that make up the primary key.
The correct answer is D.
Values can be retrieved and joined with the columns that make up the primary key. The exercise was based on this principal. A is incorrect because, although you can return the Key value to the browser, it is not the ONLY thing you can do with it. B is incorrect because the Key column does not return the name of the columns, it returns the values. C is incorrect because it is not only for internal purposes.