Big Data Lecture 13 Graph Databases Flashcards

1
Q

What properties does a well-defined query language have? Why?

A

<div>It must be</div>

<ul><li>declarative (hidden what it does),</li><li>functional (composable).</li></ul>

So that we can parralelize the query, optimize behind the scenes. It makes it more concise and readable.<br></br>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Why do we use graph databases?

A

So that we can avoid expensive joins on multiple tables when we query!

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How are data linked in a graph database?

A

Using pointers, that is fast.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the two families of graph databases?

A

Labeled property graphs, and triple stores.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How can we represent graph connectivity in memory?

A

Using adjancency matrix, or incidence graph (nodes x edges: 1 = in, -1 = out, 0 = nothing).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How is data stored in Labeled Property Graphs?

A

Both edges and nodes can have properties (flat table) and labels.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What extra datatypes are in Cypher?

A

Node, Relationship and Path.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Is there order between types in neo4j?

A

Yes!

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What does Null mean in Neo4j?

A

Absent data!

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How do we query data on graphs?

A

We use pattern matching for values and edges!

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How is data sharded in Neo4j?

A

In overlapping shards, so that we have time to load them when chasing the pointers. But for all we know its all difficult and complicated.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How are edges for one node stored in memory?

A

As a linked list, which allows for fast querying.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are triple stores?

A

Data is stored in tripples (subject)-(property)-(object), where object can be left empty. And subject, or property cannot be literal.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What formats are there for triple store?

A

<ol><li>RDF/XML,</li><li>Turtle,</li><li>JSON-LD,</li><li>RDFa,</li><li>N-Triples.</li></ol>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are query languages for graph databases?

A

Cypher and SPARQL.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What were graph databases used for in AI historically?

A

We can build ontologies on top of them, on which we can run logical entailments. For example OWL, or OWL2.