# Towards Interactive Analytics over RDF Graphs
## 3 Background  
### Principles of Resource Description Framework (RDF)  
**Resource Description Framework (RDF)** The Resource Description Framework (RDF) [37; 38] is a graph-based data model for linked data interchanging on the web. It uses triples i.e., statements of the form \(subject-predicate-object\), where the \(subject\) corresponds to an entity (e.g., a branch, a product, etc. ), the \(predicate\) to a characteristic of the entity (e.g., name of branch) and the \(object\) to the value of the predicate for the specific subject (e.g., \"\(branch_{1}\)\"). The triples are used for relating Uniform Resource Identifiers (URIs) or anonymous resources (blank nodes) with other URIs, blank nodes or constants (Literals). Formally, a \(triple\) is considered to be any element of \(T=(U\cup B)\times(U)\times(U\cup B\cup L)\), where \(U,B\) and \(L\) denote the sets of URIs, blank nodes and literals, respectively. Any finite subset of \(T\) constitute an \(RDF\)_graph_ (or \(RDF\)_data set_). **RDF Schema**. RDF Schema ([[https://en.wikipedia.org/wiki/RDF_Schema](https://en.wikipedia.org/wiki/RDF_Schema)]([https://en.wikipedia.org/wiki/RDF_Schema](https://en.wikipedia.org/wiki/RDF_Schema))) (RDFS) is a special vocabulary which comprises a set of classes with certain properties using the RDF extensible knowledge representation data model. Its intention is to structure RDF resources, since even though RDF uses URIs to uniquely identify resources, it lacks semantic expressiveness. It uses classes to indicate where a resource belongs, as well as properties to build relationships between the entities of a class and to model constraints. A class \(C\) is defined by a triple of the form \(<\)C rdf:type rdfs:Class\(>\) using the predefined class \"rdfs:Class\" and the predefined property \"rdf:type\". For example, the triple \(<\)ex:Product rdf:type rdfs:Class\(>\) indicates that \"Product\" is a class, while the triple \(<\)ex:product1 rdf:type ex:Product\(>\) that individual \"\(product1\)\" is an instance of class \(Product\). A property can be defined by stating that it is an instance of the predefined class \"rdf:Property\". Optionally, properties can be declared to apply to certain instances of classes by defining their domain and range using the predicates \"rdfs:domain\" and \"rdfs:range\", respectively. For example, the triples \(<\)ex:hasProduct rdf:type rdf:Property\(>\), \(<\)ex:hasProduct rdfs:domain ex:Branch\(>\), \(<\)ex:hasProduct rdfs:range ex:Product\(>\), indicate that the domain of the property \"hasProduct\" is the class \"Branch\" and its range the class \"Product\". RDFS is also used for defining hierarchical relationships among classes and properties. The predefined property \"rdfs:subclassOf\" is used as a predicate in a statement to declare that a class is a specialization of another more general class, while the specialization relationship between two properties is described using the predefined property \"rdfs:subPropertyOf\". For example, the triple \(<\)ex:Branch rdfs:subClassOf ex:Store\(>\) denotes that the class \"Branch\" is subclass of \"Store\", while the triple \(<\)ex:hasDrinkProduct rdf:subPropertyOf ex:hasProduct\(>\) that the property \"hasDrinkProduct\" is sub-property of \"hasProduct\". Moreover, RDFS offers inference functionality ([[https://www.w3.org/standards/semanticweb/inference](https://www.w3.org/standards/semanticweb/inference)]([https://www.w3.org/standards/semanticweb/inference](https://www.w3.org/standards/semanticweb/inference))) as additional information (i.e., discovery of new relationships between resources) about the data it receives. For example, if \(<\)ex:Coca-Cola rdf:type ex:Drink\(>\) and \(<\)ex:Drink rdf:type ex:Product\(>\), then it can be deduced that \"ex:Coca-Cola rdf:type ex:Product\". We shall use the example of Figure 2 as our running example throughout the paper. It is an RDF Graph containing information about invoices and related information about them. Each invoice has a URI, e.g., the invoice with URI ex:ID4.