Database Reference
In-Depth Information
subset of the repeated fields in the other path. A concrete schema can help
clarify this definition.
[
{"name": "a", "type": "string"},
{"name": "b", "type": "string", mode: "repeated"},
{"name": "c", "type": "string", mode: "repeated"},
{"name": "d", "type": "record", mode: "repeated",
"fields": [
{"name": "a", "type": "string"},
{"name": "b", "type": "string", mode:"repeated"}
]}
]
Given this schema, (b, c) and (c, d.a) are examples of independently
repeating fields while (a, b) , (a, d.b), and (d.a, d.b) are not
indepen-dently repeating. Trivially, a leaf field that is repeated is
independent with respect to any other field that repeats. Non-repeated leaf
fields (but potentially contained within one or more repeated records)
require inspection of the paths to the fields to determine independence.
With this understanding of independent repetition, now look at why it is
interesting for queries.
Now expand the relational tables so that you can continue the comparison to
traditional databases. Each log record in the sample data also contains a list
of visible wireless networks. These fields are not defined in the schema in
Chapter 8 and the data is not collected. They are only included in the sample
data for this chapter to support the examples.
[
. . .
{"name": "wireless", "type": "record", "mode":
"repeated", "fields": [
{"name": "ssid", "type": "string"},
{"name": "bssid", "type": "string"},
{"name": "connected", "type": "boolean"}
]},
]
Search WWH ::




Custom Search