Exam Flashcards
Explain the main difference between document database and key-value stores. In what circumstances are a document database and a key-value store essentially the same
The main difference is that documents are transparent while the values in a key value store are opaque. Thus we can “query into” the document structure, retrieve parts of a document, update parts of a document, and search based on fields of a document having particular values. Some key-values stores allow metadata about the value, (allowing indexing)
Documents in a document database often have an ID field and we can ask “give me the thing with that ID”; the ID here is effectively the same as a key in a key-value store.
Suppose you are a part of a university IT team and have been asked to help improve campus safety by implementing automatic number plate recognition technology to monitor vehicles on campus. Discuss whether there are ethical issues that need to be considered (3 points)
Good solutions identify several stakeholders (e.g university, students driving on campus, others driving on campus, etc.), list some examples of possible benefits and harm (if any) for each, then argue whether any harm seems sufficiently serious to give concern about implementing the system



A is slow since we have to iterate over every Person in order to figure out which of the persons are students (but the lookup of each student is fast since pid is indexed).
B and C are roughly equal in performance, we are iterating over Students and can look up persons and teachers by the indexed
attributes pid and tid.
D is far slower than the other plans, since we can’t easily go from a teacher to the corresponding students (since supervisor isn’t indexed).
Suppose we want to model these relations using Semantic Web technology. Give RDFS or OWL 2 statements that model the metadata. Students and teachers should be modelled as subclasses of persons.




- SELECT* name, division
- FROM* Persons, Students, Teachers
- WHERE* pid=sid AND supervisor=tid
















Give RDFS or OWL 2 statements that model the metadata describing the relationships in this example.


Based on the triples in your answer to part (b), and assuming many other similar triples, write a SPARQL query that finds the forenames of teachers who give a lecture in room HA3 on Wednesday.





2*90 + 30*10 = 480
4*90 + 6*10 = 420






















