Big Data Lecture 12 Querying Trees Flashcards
Why is not true that we should always build as many indices as possible?
Indexing on a certain attribute takes space, and computational resources. So even though it makes possibly the query on the attribute faster, it does not mean we should do it.
What is the goal of JSONiq?
We can query unstructured JSON data in data independent way.
What does RumbleDB actually do?
Rumble is an engine that connects the logical expressions of JSONiq to physical implementation underneath (HDFS, WCS, you name it!).
What kind of language is JSONiq?
<ul><li>Declarative (we say that we want, and it just happens),</li><li>functional (you can nest it like a boss),</li><li>set-based (everything is a sequence).</li></ul>
What is a data LakeHouse?
Datalake warehouse, something that can be queried from top-level, but at the lower level it is just a data lake.
How is data represented in JSONiq?
Everything is just a sequence of items, even nothing () and a single item (“lol”).
What happens when you enter valid JSON into JSONiq?
It evaluates to itself.
Can JSONiq item sequences be nested?
No, it naturally removes the nesting, e.g. ((1), 2) == (1, 2).
Are all types in JSONiq comparable like in MongoDB?
No.
Can we compare two arrays in JSONiq?
Yes, the predicate will be evaluated as an existential quantifier.
What are FLWOR expressions?
<ul><li>For,</li><li>Let,<br></br></li><li>Where,</li><li>Order by,</li><li>Return.</li></ul>
Typical pattern in JSONiq, under the hood they are nicely optimized.
What are tuple streams in JSONiq?
Formalism to explain combinations of operations, how they chain together, and how they are applied to each other and in order.
How are types formally expressed in JSONiq?
Using the given type, plus quantification (+/*/?/nothing if required).
How is query of JSONiq parsed in the background?
<ol><li>Abstract Syntax Tree is created,</li><li>using VisitorPattern converted to ExpressionTree,</li><li>the ExpressionTree is optimized for execution,</li><li>conversion to Iterator Tree (volcano iterators).</li></ol>
What are volcano iterators?
Objects that we can open(), ask hasNext(), next() and close().