Semistructured Data Flashcards

1
Q

XML

A
  • A markup language that annotates documents with tags
  • The set of possible tags and their meanings is not fixed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

XML Elements

A
  • Typically of a begin and end tag
  • Can include nested child elements
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

XML Attributes

A
  • Specified within the element’s begin tag
  • Describe the element
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

ID, IDREF, and IDREFS

A
  • ID: an identifier that must be unique among all ID attributes
  • IDREF: a single value that is the value of an ID attribute elsewhere
  • IDREFS: a list of ID values from elsewhere
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Capturing XML Relationships

A
  • Option 1: store references from one element to other elements using ID, IDREF, and IDREFS
  • Option 2: use child elements
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

XML Documents as Trees

A
  • Root element = root node of the tree
  • Child element = child of node
  • Empty or childless elements = leaf nodes
  • Start tags are edge labels
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

XPath Expressions

A
  • Specify 1+ elements or attributes by providing a path to relevant nodes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

XPath /

A
  • Path starts at the root of the document
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

XPath //

A
  • Selects elements from anywhere in the document
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

XPath @

A
  • Attribute names are preceded by an @
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

XPath Predicates

A
  • Surrounded by square brackets
  • Applied to elements selected by the preceding path expression
  • Use . to represent nodes selected by the preceding path
  • Use .. to represent the parents of the nodes selected by the preceding path
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

FLWOR for

A
  • Similar to the FROM clause in SQL
  • Iterates over all combinations of values from its XPath expressions
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

FLWOR let

A
  • Applied to each combo from the for clause
  • Each variable gets the full set produced by its XPath expression
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

FLWOR where

A
  • Applied to the results of for and let
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

FLWOR order by

A
  • Use to sort the results
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

FLWOR return

A
  • Similar to the SELECT clause in SQL
  • Possible to reshape the output by constructing new elements