Supervision 3 Questions

These are suggested questions that supervisors might want to use in their supervisions.

3.0. Download Neo4j. Some versions come with an example movie database, rather like the snapshot we've been using. Have a play with it. Note that neither details of Neo4j or Cypher syntax will be asked about in Tripos questions. DJG will put some get-started help on the course web page and do a quick demo in Lecture 8.

Questions to discuss with your supervisor

3.1. Suppose that we are presented with only the document database containing movies and people. Could we use this database to help us reconstruct an Entity-Relationship model of the data? Could you even consider automating this process?

3.2. Explain why concepts of fixed points and closure are relevant to finding the results of recursive SQL queries. The following function is a least-fixed point finder coded in ML. Give a non-recursive ML function that that uses it to find the lowest natural number equal to or above the square root of argument S:

let lfp f =
    let rec search n = if f(n)=n then n else search (n+1)
    in search 1 end
let int_sqroot S =  ... your code that uses lfp ...

~

3.3 Neo4j edges have a unique identifier, a type and attributes. Write 3 example Neo4j queries that each illustrate looking up on each of these.

[Repeat: Neither details of Neo4J or Cypher syntax will be asked about in Tripos questions.] [NB. Proper computerists will choke on the word 'type' above: they would be happier to say all edges have the same type and call this a field a 'kind'.]

3.4. Why does a graph database typically store just one graph?

3.5. Can a many-to-many relation easily be stored in a relational database? Does a graph database make it easier? Or is this just silly folklore?

3.6. You may have answered DRQ.3 for your second Assessed Exercise which was about finding keywords. Would this be possible to phrase in a graph film database?

3.7. What is a ternary relationship and can it be stored (easily) in a graph database? Distinguish between relationships between three different types of entity and 3-way relationships that relate fewer than three domains.

3.8. Why is it generally helpful if database updates are idempotent? Give an example schema before and after being modified so that more of its updates can be phrased idempotently. [NB. There's not much in this course about updates outside of the transaction topic, so don't worry if you cannot think of an answer: again, this is more of a topic for part Ib Concurrency.]

3.9. One further question might be added here ...

END. (C) TGG 2021 (C) 2022 DJG, University of Cambridge, Computer Laboratory.