Deck 9: Working With Xml and Databases

Full screen (f)
exit full mode
Question
In an XQuery variable declaration, text strings need to be enclosed within single or double quotes .
Use Space or
up arrow
down arrow
to flip the card.
Question
XQuery provides several tools to create formatted output.
Question
In an XQuery file, namespaces need to be declared in the query body .
Question
A path expression is usually more compact and easier to apply for simple queries compared to a FLWOR structure.
Question
You cannot sort the results of a query created using a path expression.
Question
XQuery comments can be nested within one another to provide more information to the user.
Question
In an XQuery file, the query body consists of a single expression that retrieves data from a source document based on criteria provided in the query expression.
Question
In an XQuery document, all string values and file references need to be enclosed within matching curly braces.
Question
The XSLT doc() function is not supported in XQuery.
Question
XQuery is a subset of XPath 2.0.
Question
In a FLWOR query, only one where clause is allowed per query, and it must be placed before all of the for and let clauses.
Question
With XQuery, the user can summarize data with aggregate functions.
Question
You cannot use XQuery in place of XSLT to transform a source document.
Question
Element values are enclosed within a set of square brackets .
Question
In general, a processor can run a where clause faster than it can run a predicate expression.
Question
When you import a library module, the module URI in the import statement must match the URI in the library module file.
Question
A(n) query function contains a collection of statements that can be referenced throughout the query document.
Question
In a FLWOR query, variables defined in a for or let clause act as local variables.
Question
Variables declared in a library module must be assigned to the module namespace.
Question
In the order by clause of a FLWOR query, the default is to sort items in descending order.
Question
One option to format query results is to add the declaration _____ to the XQuery prolog, which preserves all of the white space characters from the XQuery file and writes them to the result document.

A) declare boundary-space indent;
B) declare boundary-space preserve;
C) !indent=yes;
D) declare indent-space=yes;
Question
The prolog of an XQuery document contains a series of declarations with each declaration terminated with a _____.

A) colon
B) comma
C) semi-colon
D) backslash
Question
<strong>  In the FLWOR query shown in the accompanying figure, the box labeled _____ indicates the root element.</strong> A) A B) B C) D D) E <div style=padding-top: 35px>
In the FLWOR query shown in the accompanying figure, the box labeled _____ indicates the root element.

A) A
B) B
C) D
D) E
Question
If you do not specify a data type, XQuery applies the _____ data type, allowing the variable to contain any type of data.

A) xs:anyType
B) xs:blank
C) xs:xsType
D) xs:anyData
Question
The path expression _____ uses a predicate to select only those store elements from the gjc_stores.xml file that operate in the state of Colorado.

A) document() 'gjc_stores.xml') //store[state='CO']
B) doc('gjc_stores.xml') //state[store='CO']
C) doc('gjc_stores.xml') //store[state='CO']
D) document() 'gjc_stores.xml') //state[store='CO']
Question
XQuery files are usually saved with the file extension _____.

A) )xq
B) )xqy
C) )xquery
D) All of these are correct.
Question
In a FLWOR query structure, the _____ clause declares a variable and gives it an initial value.

A) for
B) let
C) where
D) order by
Question
XQuery is a _____ programming language like XSLT.

A) procedural
B) declarative
C) object-oriented
D) second-generation
Question
<strong>  In the FLWOR query shown in the accompanying figure, the box labeled _____ indicates the clause that sorts the query.</strong> A) A B) B C) C D) F <div style=padding-top: 35px>
In the FLWOR query shown in the accompanying figure, the box labeled _____ indicates the clause that sorts the query.

A) A
B) B
C) C
D) F
Question
You can automatically generate comments for your query through the use of _____ comments, which are a standard method for creating structured documentation.

A) XQuery
B) xqdoc
C) XML
D) xhtml
Question
You can add an element to a query through a(n) _____, which uses XML-like syntax to insert the element markup tags directly into the query expression.

A) indirect element constructor
B) root element constructor
C) direct element constructor
D) literal element constructor
Question
In XQuery, the _____ namespace is used for creating user-defined functions.

A) local
B) fn
C) xsi
D) xs
Question
The XQuery prolog declaration _____ specifies whether empty elements should appear last in any node ordering or first.

A) declare ordering
B) declare default collation
C) declare default function
D) declare default order
Question
Variables defined within the _____ have global scope and can be referenced throughout the query document.

A) root template
B) query body
C) query template
D) prolog
Question
If you do not specify an output file, Saxon will display the query result in _____.

A) the command window
B) the default browser
C) a file named readme.xq
D) a file named output.txt
Question
To declare an external variable, add the keyword _____ to the variable declaration.

A) global
B) external
C) source
D) imported
Question
In a FLWOR query structure, the _____ clause iterates through a sequence of values, calculating an expression for each item in the sequence.

A) for
B) let
C) where
D) order by
Question
For larger documents and more complicated search criteria, it is generally easier and more efficient to use _____ to transform a source document.

A) XQuery
B) XSLT 1.0
C) XSLT 2.0
D) XPath
Question
<strong>  In the FLWOR query shown in the accompanying figure, the box labeled _____ indicates the clause that displays the results of the query.</strong> A) B B) C C) D D) F <div style=padding-top: 35px>
In the FLWOR query shown in the accompanying figure, the box labeled _____ indicates the clause that displays the results of the query.

A) B
B) C
C) D
D) F
Question
XQuery is written in text format as a collection of _____.

A) declarations
B) expressions
C) sequences
D) templates
Question
The last statement in the FLWOR structure is always the _____ clause.

A) for
B) where
C) group by
D) return
Question
As with XSLT, many calculations and operations in XQuery can be performed using _____, in which the XQuery function calls itself repeatedly until a stopping condition is met.

A) recursion
B) looping
C) predicates
D) parameters
Question
You can use multiple _____ clauses in a FLWOR query structure to create nested sequences.

A) let
B) where
C) for
D) return
Question
A(n) _____ module is an external XQuery file that contains only the declarations for namespaces, variables, and user-defined functions.

A) storage
B) library
C) import
D) declaration
Question
<strong>  In the user-defined functions shown in the accompanying figure, the box labeled _____ indicates a function name.</strong> A) A B) B C) C D) D <div style=padding-top: 35px>
In the user-defined functions shown in the accompanying figure, the box labeled _____ indicates a function name.

A) A
B) B
C) C
D) D
Question
In a FLWOR query structure, variables defined in the for clause update their value at each step in the iteration, but a variable defined in the _____ clause has a single unchanged value.

A) let
B) where
C) group by
D) return
Question
Module library files are often saved with the file extension _____.

A) )xq
B) )xql
C) )xqm
D) )xml
Question
In a FLWOR query structure, the _____ clause specifies a condition by which the items in the iterated sequence are filtered.

A) for
B) let
C) where
D) order by
Question
When a query is based on elements in which there is no predefined set of unique values, you can construct a list of unique values using the XPath 2.0 _____ function.

A) distinct-values()
B) unique-values()
C) defined-values()
D) list-values()
Question
A query _____ contains a collection of statements that can be referenced throughout the query document.

A) module
B) function
C) prolog
D) header
Question
In XQuery, variables are assigned using the _____ symbol.

A) :=
B) =
C) ==
D) =:
Question
In a FLWOR query you can include the _____ keyword within the for clause to track the number of iterations.

A) at
B) count
C) track
D) iteration
Question
<strong>  In the user-defined functions shown in the accompanying figure, the box labeled _____ indicates a function parameter.</strong> A) A B) B C) C D) D <div style=padding-top: 35px>
In the user-defined functions shown in the accompanying figure, the box labeled _____ indicates a function parameter.

A) A
B) B
C) C
D) D
Question
The FLWOR structure needs to be enclosed within a set of _____ so that the XQuery processor evaluates the expression before writing the query result into its containing element.

A) square brackets
B) curly braces
C) parentheses
D) double quotes
Question
The _____ statement retrieves all of the variables and functions defined in a library module.

A) load
B) import
C) retrieve
D) library
Question
When you import a library module, the module _____ in the import statement must match the one in the library module file.

A) namespace
B) prolog
C) template
D) URI
Question
One way to query data from several sources is to apply a _____ clause to each document source.

A) let
B) group by
C) for
D) return
Question
In a FLWOR query structure, the _____ clause sorts the items in the sequence based on a supplied expression.

A) for
B) let
C) where
D) order by
Question
The first expression in a FLWOR query structure is the _____ clause.

A) for
B) let
C) where
D) return
Question
<strong>  In the user-defined functions shown in the accompanying figure, the box labeled _____ indicates the data type returned by the function.</strong> A) A B) B C) C D) D <div style=padding-top: 35px>
In the user-defined functions shown in the accompanying figure, the box labeled _____ indicates the data type returned by the function.

A) A
B) B
C) C
D) D
Question
Agnes has been using XQuery to design queries using path expressions. Her next project will involve multiple source documents and require more complicated criteria. She has heard that a FLWOR structure could be effective for such cases, and comes to you for assistance in developing a FLWOR structure query. Agnes has heard that one of the clauses in a FLWOR structure is used to iterate through a sequence of nodes or atomic values. You tell her that she is describing the _____ clause.

A) for
B) let
C) where
D) return
Question
The _____ keyword allows the variable value to be set by the processor when the query is run.
Question
Essentially any text in the query that is not part of an expression is treated as _____ and displayed as part of the query result without modification.
Question
Agnes has been using XQuery to design queries using path expressions. Her next project will involve multiple source documents and require more complicated criteria. She has heard that a FLWOR structure could be effective for such cases, and comes to you for assistance in developing a FLWOR structure query. Agnes is confused by the rules about how many of each type of clause are required in a FLWOR structure. You tell her that in a FLWOR structure, there must be exactly only one _____ clause.

A) where
B) for
C) let
D) return
Question
Agnes has been using XQuery to design queries using path expressions. Her next project will involve multiple source documents and require more complicated criteria. She has heard that a FLWOR structure could be effective for such cases, and comes to you for assistance in developing a FLWOR structure query. Agnes is confused by the rules about how many of each type of clause are required in a FLWOR structure. You tell her that in a FLWOR structure, there must be at least one _____ clause.

A) where
B) for
C) order by
D) return
Question
Alfonso has been working with XQuery, and would like to create a library module to centralize the global variables and functions he's created. He has encountered some problems in implementing the library module, and comes to you for help. Alfonso has fixed the error in the query prolog, but now is encountering problems when he tries to reference a function he defined and added to the library module. In looking at his library module code, you remind him that he must include the _____ keyword when creating a user-defined function.

A) namespace
B) define
C) declare
D) library
Question
Alfonso has been working with XQuery, and would like to create a library module to centralize the global variables and functions he's created. He has encountered some problems in implementing the library module, and comes to you for help. Alfonso has fixed the errors found in the variable references contained in his new query module, but is still encountering errors. In looking at his code, you remind him to add a(n) _____ to the query prolog.

A) declare statement
B) import statement
C) absolute path
D) relative path
Question
Alfonso has been working with XQuery, and would like to create a library module to centralize the global variables and functions he's created. He has encountered some problems in implementing the library module, and comes to you for help. Alfonso has placed several global variables in his library module. However, when he references one of these variables in a query main module, an error occurs. In looking at his code, you suggest the problem is happening because he did not include the _____ when referencing the variable.

A) namespace prefix
B) absolute path
C) fully qualified name
D) relative path
Question
_____ variables are variables whose values are determined when the query is run by the processor.
Question
You can add comments to any part of the XQuery file using the statement _____.

A) (: comment :)
B) ( comment )
C) : comment :
D) :( comment ) :
Question
In an XQuery file, the _____ namespace is used for creating user-defined functions.
Question
To run a query, you need a(n) _____ that parses, analyzes, and evaluates the query.
Question
Agnes has been using XQuery to design queries using path expressions. Her next project will involve multiple source documents and require more complicated criteria. She has heard that a FLWOR structure could be effective for such cases, and comes to you for assistance in developing a FLWOR structure query. Agnes has heard that one of the clauses in a FLWOR structure filters the result of the query and can replace the long and complicated predicates found in path expressions. You tell her that she is describing the _____ clause.

A) for
B) let
C) where
D) order by
Question
Agnes has been using XQuery to design queries using path expressions. Her next project will involve multiple source documents and require more complicated criteria. She has heard that a FLWOR structure could be effective for such cases, and comes to you for assistance in developing a FLWOR structure query. Agnes has heard that one of the clauses in a FLWOR structure defines a local variable that holds a single unchanged value. You tell her that she is describing the _____ clause.

A) for
B) let
C) where
D) return
Question
Agnes has been using XQuery to design queries using path expressions. Her next project will involve multiple source documents and require more complicated criteria. She has heard that a FLWOR structure could be effective for such cases, and comes to you for assistance in developing a FLWOR structure query. Agnes has heard that one of the clauses in a FLWOR structure can be used to display the results of the query. You tell her that she is describing the _____ clause.

A) for
B) where
C) order by
D) return
Question
A query can be written using a(n) _____, which is simply an XPath expression that retrieves element and attribute nodes from a source document based on specified criteria.
Question
In the for clause of a FLWOR query, the _____ attribute is optional.

A) expression
B) type
C) as
D) ID
Question
In an XQuery file, the _____ is an optional section that is placed at the beginning of the query and is used to set up fundamental properties of the query.
Question
Agnes has been using XQuery to design queries using path expressions. Her next project will involve multiple source documents and require more complicated criteria. She has heard that a FLWOR structure could be effective for such cases, and comes to you for assistance in developing a FLWOR structure query. Agnes is confused by the rules about how many of each type of clause are required in a FLWOR structure. You tell her that in a FLWOR structure, the _____ clause is optional.

A) where
B) for
C) let
D) return
Question
To calculate a summary statistic like a total, enclose the query expression within the _____ function.
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/91
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 9: Working With Xml and Databases
1
In an XQuery variable declaration, text strings need to be enclosed within single or double quotes .
True
2
XQuery provides several tools to create formatted output.
False
3
In an XQuery file, namespaces need to be declared in the query body .
False
4
A path expression is usually more compact and easier to apply for simple queries compared to a FLWOR structure.
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
5
You cannot sort the results of a query created using a path expression.
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
6
XQuery comments can be nested within one another to provide more information to the user.
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
7
In an XQuery file, the query body consists of a single expression that retrieves data from a source document based on criteria provided in the query expression.
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
8
In an XQuery document, all string values and file references need to be enclosed within matching curly braces.
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
9
The XSLT doc() function is not supported in XQuery.
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
10
XQuery is a subset of XPath 2.0.
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
11
In a FLWOR query, only one where clause is allowed per query, and it must be placed before all of the for and let clauses.
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
12
With XQuery, the user can summarize data with aggregate functions.
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
13
You cannot use XQuery in place of XSLT to transform a source document.
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
14
Element values are enclosed within a set of square brackets .
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
15
In general, a processor can run a where clause faster than it can run a predicate expression.
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
16
When you import a library module, the module URI in the import statement must match the URI in the library module file.
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
17
A(n) query function contains a collection of statements that can be referenced throughout the query document.
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
18
In a FLWOR query, variables defined in a for or let clause act as local variables.
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
19
Variables declared in a library module must be assigned to the module namespace.
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
20
In the order by clause of a FLWOR query, the default is to sort items in descending order.
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
21
One option to format query results is to add the declaration _____ to the XQuery prolog, which preserves all of the white space characters from the XQuery file and writes them to the result document.

A) declare boundary-space indent;
B) declare boundary-space preserve;
C) !indent=yes;
D) declare indent-space=yes;
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
22
The prolog of an XQuery document contains a series of declarations with each declaration terminated with a _____.

A) colon
B) comma
C) semi-colon
D) backslash
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
23
<strong>  In the FLWOR query shown in the accompanying figure, the box labeled _____ indicates the root element.</strong> A) A B) B C) D D) E
In the FLWOR query shown in the accompanying figure, the box labeled _____ indicates the root element.

A) A
B) B
C) D
D) E
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
24
If you do not specify a data type, XQuery applies the _____ data type, allowing the variable to contain any type of data.

A) xs:anyType
B) xs:blank
C) xs:xsType
D) xs:anyData
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
25
The path expression _____ uses a predicate to select only those store elements from the gjc_stores.xml file that operate in the state of Colorado.

A) document() 'gjc_stores.xml') //store[state='CO']
B) doc('gjc_stores.xml') //state[store='CO']
C) doc('gjc_stores.xml') //store[state='CO']
D) document() 'gjc_stores.xml') //state[store='CO']
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
26
XQuery files are usually saved with the file extension _____.

A) )xq
B) )xqy
C) )xquery
D) All of these are correct.
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
27
In a FLWOR query structure, the _____ clause declares a variable and gives it an initial value.

A) for
B) let
C) where
D) order by
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
28
XQuery is a _____ programming language like XSLT.

A) procedural
B) declarative
C) object-oriented
D) second-generation
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
29
<strong>  In the FLWOR query shown in the accompanying figure, the box labeled _____ indicates the clause that sorts the query.</strong> A) A B) B C) C D) F
In the FLWOR query shown in the accompanying figure, the box labeled _____ indicates the clause that sorts the query.

A) A
B) B
C) C
D) F
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
30
You can automatically generate comments for your query through the use of _____ comments, which are a standard method for creating structured documentation.

A) XQuery
B) xqdoc
C) XML
D) xhtml
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
31
You can add an element to a query through a(n) _____, which uses XML-like syntax to insert the element markup tags directly into the query expression.

A) indirect element constructor
B) root element constructor
C) direct element constructor
D) literal element constructor
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
32
In XQuery, the _____ namespace is used for creating user-defined functions.

A) local
B) fn
C) xsi
D) xs
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
33
The XQuery prolog declaration _____ specifies whether empty elements should appear last in any node ordering or first.

A) declare ordering
B) declare default collation
C) declare default function
D) declare default order
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
34
Variables defined within the _____ have global scope and can be referenced throughout the query document.

A) root template
B) query body
C) query template
D) prolog
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
35
If you do not specify an output file, Saxon will display the query result in _____.

A) the command window
B) the default browser
C) a file named readme.xq
D) a file named output.txt
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
36
To declare an external variable, add the keyword _____ to the variable declaration.

A) global
B) external
C) source
D) imported
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
37
In a FLWOR query structure, the _____ clause iterates through a sequence of values, calculating an expression for each item in the sequence.

A) for
B) let
C) where
D) order by
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
38
For larger documents and more complicated search criteria, it is generally easier and more efficient to use _____ to transform a source document.

A) XQuery
B) XSLT 1.0
C) XSLT 2.0
D) XPath
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
39
<strong>  In the FLWOR query shown in the accompanying figure, the box labeled _____ indicates the clause that displays the results of the query.</strong> A) B B) C C) D D) F
In the FLWOR query shown in the accompanying figure, the box labeled _____ indicates the clause that displays the results of the query.

A) B
B) C
C) D
D) F
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
40
XQuery is written in text format as a collection of _____.

A) declarations
B) expressions
C) sequences
D) templates
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
41
The last statement in the FLWOR structure is always the _____ clause.

A) for
B) where
C) group by
D) return
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
42
As with XSLT, many calculations and operations in XQuery can be performed using _____, in which the XQuery function calls itself repeatedly until a stopping condition is met.

A) recursion
B) looping
C) predicates
D) parameters
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
43
You can use multiple _____ clauses in a FLWOR query structure to create nested sequences.

A) let
B) where
C) for
D) return
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
44
A(n) _____ module is an external XQuery file that contains only the declarations for namespaces, variables, and user-defined functions.

A) storage
B) library
C) import
D) declaration
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
45
<strong>  In the user-defined functions shown in the accompanying figure, the box labeled _____ indicates a function name.</strong> A) A B) B C) C D) D
In the user-defined functions shown in the accompanying figure, the box labeled _____ indicates a function name.

A) A
B) B
C) C
D) D
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
46
In a FLWOR query structure, variables defined in the for clause update their value at each step in the iteration, but a variable defined in the _____ clause has a single unchanged value.

A) let
B) where
C) group by
D) return
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
47
Module library files are often saved with the file extension _____.

A) )xq
B) )xql
C) )xqm
D) )xml
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
48
In a FLWOR query structure, the _____ clause specifies a condition by which the items in the iterated sequence are filtered.

A) for
B) let
C) where
D) order by
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
49
When a query is based on elements in which there is no predefined set of unique values, you can construct a list of unique values using the XPath 2.0 _____ function.

A) distinct-values()
B) unique-values()
C) defined-values()
D) list-values()
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
50
A query _____ contains a collection of statements that can be referenced throughout the query document.

A) module
B) function
C) prolog
D) header
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
51
In XQuery, variables are assigned using the _____ symbol.

A) :=
B) =
C) ==
D) =:
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
52
In a FLWOR query you can include the _____ keyword within the for clause to track the number of iterations.

A) at
B) count
C) track
D) iteration
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
53
<strong>  In the user-defined functions shown in the accompanying figure, the box labeled _____ indicates a function parameter.</strong> A) A B) B C) C D) D
In the user-defined functions shown in the accompanying figure, the box labeled _____ indicates a function parameter.

A) A
B) B
C) C
D) D
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
54
The FLWOR structure needs to be enclosed within a set of _____ so that the XQuery processor evaluates the expression before writing the query result into its containing element.

A) square brackets
B) curly braces
C) parentheses
D) double quotes
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
55
The _____ statement retrieves all of the variables and functions defined in a library module.

A) load
B) import
C) retrieve
D) library
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
56
When you import a library module, the module _____ in the import statement must match the one in the library module file.

A) namespace
B) prolog
C) template
D) URI
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
57
One way to query data from several sources is to apply a _____ clause to each document source.

A) let
B) group by
C) for
D) return
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
58
In a FLWOR query structure, the _____ clause sorts the items in the sequence based on a supplied expression.

A) for
B) let
C) where
D) order by
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
59
The first expression in a FLWOR query structure is the _____ clause.

A) for
B) let
C) where
D) return
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
60
<strong>  In the user-defined functions shown in the accompanying figure, the box labeled _____ indicates the data type returned by the function.</strong> A) A B) B C) C D) D
In the user-defined functions shown in the accompanying figure, the box labeled _____ indicates the data type returned by the function.

A) A
B) B
C) C
D) D
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
61
Agnes has been using XQuery to design queries using path expressions. Her next project will involve multiple source documents and require more complicated criteria. She has heard that a FLWOR structure could be effective for such cases, and comes to you for assistance in developing a FLWOR structure query. Agnes has heard that one of the clauses in a FLWOR structure is used to iterate through a sequence of nodes or atomic values. You tell her that she is describing the _____ clause.

A) for
B) let
C) where
D) return
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
62
The _____ keyword allows the variable value to be set by the processor when the query is run.
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
63
Essentially any text in the query that is not part of an expression is treated as _____ and displayed as part of the query result without modification.
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
64
Agnes has been using XQuery to design queries using path expressions. Her next project will involve multiple source documents and require more complicated criteria. She has heard that a FLWOR structure could be effective for such cases, and comes to you for assistance in developing a FLWOR structure query. Agnes is confused by the rules about how many of each type of clause are required in a FLWOR structure. You tell her that in a FLWOR structure, there must be exactly only one _____ clause.

A) where
B) for
C) let
D) return
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
65
Agnes has been using XQuery to design queries using path expressions. Her next project will involve multiple source documents and require more complicated criteria. She has heard that a FLWOR structure could be effective for such cases, and comes to you for assistance in developing a FLWOR structure query. Agnes is confused by the rules about how many of each type of clause are required in a FLWOR structure. You tell her that in a FLWOR structure, there must be at least one _____ clause.

A) where
B) for
C) order by
D) return
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
66
Alfonso has been working with XQuery, and would like to create a library module to centralize the global variables and functions he's created. He has encountered some problems in implementing the library module, and comes to you for help. Alfonso has fixed the error in the query prolog, but now is encountering problems when he tries to reference a function he defined and added to the library module. In looking at his library module code, you remind him that he must include the _____ keyword when creating a user-defined function.

A) namespace
B) define
C) declare
D) library
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
67
Alfonso has been working with XQuery, and would like to create a library module to centralize the global variables and functions he's created. He has encountered some problems in implementing the library module, and comes to you for help. Alfonso has fixed the errors found in the variable references contained in his new query module, but is still encountering errors. In looking at his code, you remind him to add a(n) _____ to the query prolog.

A) declare statement
B) import statement
C) absolute path
D) relative path
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
68
Alfonso has been working with XQuery, and would like to create a library module to centralize the global variables and functions he's created. He has encountered some problems in implementing the library module, and comes to you for help. Alfonso has placed several global variables in his library module. However, when he references one of these variables in a query main module, an error occurs. In looking at his code, you suggest the problem is happening because he did not include the _____ when referencing the variable.

A) namespace prefix
B) absolute path
C) fully qualified name
D) relative path
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
69
_____ variables are variables whose values are determined when the query is run by the processor.
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
70
You can add comments to any part of the XQuery file using the statement _____.

A) (: comment :)
B) ( comment )
C) : comment :
D) :( comment ) :
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
71
In an XQuery file, the _____ namespace is used for creating user-defined functions.
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
72
To run a query, you need a(n) _____ that parses, analyzes, and evaluates the query.
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
73
Agnes has been using XQuery to design queries using path expressions. Her next project will involve multiple source documents and require more complicated criteria. She has heard that a FLWOR structure could be effective for such cases, and comes to you for assistance in developing a FLWOR structure query. Agnes has heard that one of the clauses in a FLWOR structure filters the result of the query and can replace the long and complicated predicates found in path expressions. You tell her that she is describing the _____ clause.

A) for
B) let
C) where
D) order by
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
74
Agnes has been using XQuery to design queries using path expressions. Her next project will involve multiple source documents and require more complicated criteria. She has heard that a FLWOR structure could be effective for such cases, and comes to you for assistance in developing a FLWOR structure query. Agnes has heard that one of the clauses in a FLWOR structure defines a local variable that holds a single unchanged value. You tell her that she is describing the _____ clause.

A) for
B) let
C) where
D) return
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
75
Agnes has been using XQuery to design queries using path expressions. Her next project will involve multiple source documents and require more complicated criteria. She has heard that a FLWOR structure could be effective for such cases, and comes to you for assistance in developing a FLWOR structure query. Agnes has heard that one of the clauses in a FLWOR structure can be used to display the results of the query. You tell her that she is describing the _____ clause.

A) for
B) where
C) order by
D) return
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
76
A query can be written using a(n) _____, which is simply an XPath expression that retrieves element and attribute nodes from a source document based on specified criteria.
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
77
In the for clause of a FLWOR query, the _____ attribute is optional.

A) expression
B) type
C) as
D) ID
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
78
In an XQuery file, the _____ is an optional section that is placed at the beginning of the query and is used to set up fundamental properties of the query.
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
79
Agnes has been using XQuery to design queries using path expressions. Her next project will involve multiple source documents and require more complicated criteria. She has heard that a FLWOR structure could be effective for such cases, and comes to you for assistance in developing a FLWOR structure query. Agnes is confused by the rules about how many of each type of clause are required in a FLWOR structure. You tell her that in a FLWOR structure, the _____ clause is optional.

A) where
B) for
C) let
D) return
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
80
To calculate a summary statistic like a total, enclose the query expression within the _____ function.
Unlock Deck
Unlock for access to all 91 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 91 flashcards in this deck.