Big Data Management Question Paper

profileMagnum_1993
F21BD_AUG_P2019-2020_TakeHomeExamBigDataManagement.pdf

SCHOOL OF MATHEMATICAL AND COMPUTER SCIENCES

Department of Computer Science

F21BD

Big Data Management

Semester 2 2019/20 (August)

Duration: 24 Hours

ANSWER BOTH QUESTIONS

In line with the University’s plagiarism policy, answers provided based on sources other than the lecture material must be cited.

F21BD

Page 2 of 5

Q1 (a) Explain what metadata means, why it is important, and give 4

attributes that should be stored with spatial metadata.

(2 marks) (b) Joseph Berry said that ‘Raster is faster but vector is corrector’.

Explain what this quote means with reference to how these spatial data formats are used and suited to different applications (include examples).

(4 marks) (c) Complete the Dimensionally Extended 9 Intersection Model matrix

for line A and polygon B given below – showing the relationship for DE-9IM(A,B). You must give the interaction type (-1,0,1,2) in each case rather than T or F.

(6 marks) (d) Topological maps distort geography but maintain three important

properties. Which properties are maintained?

(3 marks) (e) How is consistency tuned on a distributed database such as

Amazon Dynamo DB or Cassandra?

(3 marks) (f) (i) Explain the following CYPHER queries in English.

MATCH (a1:ACTOR)-[:ACTED_IN]->(m:MOVIE)<-[:ACTED_IN]-(a2:ACTOR) WITH a1,a2,COUNT(m) AS moviecount WHERE moviecount > 8 RETURN a1.name,a2.name,moviecount

(3 marks) (ii) MATCH (m:movie)-[:DIRECTED_BY]- (d:director)

MATCH (m:movie)-[:WRITTEN_BY]-(w:writer) MATCH (a:actor) WHERE d.name=w.name AND d.name=a.name AND NOT (a)-[:ACTED_IN]-(m) RETURN COUNT(DISTINCT m)

(4 marks)

QUESTION CONTINUES ON NEXT PAGE

F21BD

Page 3 of 5

(g) (i) Write out how a column-orientated database store would save this

table to disk, in ID order. ID Firstname Lastname Email 001 Fred Flintstone [email protected] 004 Wilma Flintstone [email protected] 002 Bart Simpson [email protected] 003 Lisa Simpson [email protected]

(4 marks) (ii) Give three benefits of column-orientated relational database

management systems.

(1 marks) (Question 2 on next page)

F21BD

Page 4 of 5

Q2 (a) (i) State the five stars of linked open data. (1 mark) (ii) How does Linked Open Data enable data integration? (3 marks) (b) Consider the following RDF:

BASE <http://example.org/BDMExam#> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> PREFIX schema: <http://schema.org/>

:alasdair a foaf:Person ; foaf:givenName "Alasdair" ; foaf:familyName "Gray" ; schema:worksFor :HeriotWatt ; foaf:mbox <mailto:[email protected]> ; foaf:knows :hind, :phil .

:hind a foaf:Person ; foaf:givenName "Hind" ; foaf:familyName "Zantout" ; schema:worksFor :HeriotWattDubai ; foaf:knows :alasdair .

:phil a foaf:Person ; foaf:name "Phil Bartie" ; foaf:givenName "Phil" ; foaf:familyName "Bartie" ; schema:worksFor :HeriotWatt .

:HeriotWatt a foaf:Organization ; foaf:name "Heriot-Watt University" ; schema:subOrganization :HeriotWattDubai .

:HeriotWattDubai a foaf:Organization ; foaf:name "Heriot-Watt University Dubai" .

(i) Assume the above is part of a larger dataset.

Write a SPARQL query to find the given and family names of people in the dataset together with their email address if it exists.

(4 marks) (ii) Write a SPARQL query to calculate the number of people who

work in each organization.

(5 marks) (iii) Write a SPARQL query to find the given and family names of all

people who can be reached from :hind through the knows relationship. State the number of answer bindings based on the above sample data.

(5 marks) QUESTION CONTINUES ON NEXT PAGE

F21BD

Page 5 of 5

(c) Consider the following OWL ontology defined using Manchester Syntax (assume appropriate prefixes have been declared). Ontology: <http://example.org/BDMUni>

ObjectProperty: residentOf Domain: Student Range: Country

ObjectProperty: studies Domain: Student Range: Course

Class: Country

Class: Course

Class: EUCountry SubClassOf: Country DisjointWith: NonEUCountry

Class: NonEUCountry SubClassOf: Country DisjointWith: EUCountry

Class: Student

DisjointClasses: Country,Course,Student

(i) What would be inferred by an OWL reasoner from the following

addition to the ontology? Give an explanation as to how the reasoner reached this conclusion. Individual: HappyLand Types: EUCountry, NonEUCountry

(4 marks) (iii) Use Manchester Syntax to extend the ontology with a class

InternationalStudent which is a Student who studies at least 4 courses and must be a resident of a non-European country.

(4 marks) (d) Define the terms folksonomy and ontology, highlighting the

difference between the two.

(2 marks) (e) State and explain two advantages of using OWL to represent your

data versus a relational database?

(2 marks) END OF PAPER