170 likes | 298 Views
SPARQLing Constraints. Ming Fang 07/31/2009. Outlines. Motivation Preliminary Three Approaches SPARKLing Constraints. Motivation. Large amounts of data reside relational databases. Existing approaches to translating relational data into RDF mostly disregard relational constraints
E N D
SPARQLing Constraints Ming Fang 07/31/2009
Outlines • Motivation • Preliminary • Three Approaches • SPARKLing Constraints
Motivation • Large amounts of data reside relational databases. • Existing approaches to translating relational data into RDF mostly disregard relational constraints • SPARQL can be used as a constraint language to check primary key, foreign key, etc.
Preliminary • Key and foreign key • An RDF vocabulary V = (NC ,NP ), where NC is a finite set of classes and NP is a finite set of properties
Three Approaches • Naïve approach
Three Approaches • Naïve approach • Information about key and foreign key constraints is completely lost
Three Approaches • Modified approach • Instead of using literals, we should use URIs from the object domain to represent keys and foreign keys • URIs appear only once; foreign key and corresponding key node collapse
Three Approaches • The third approach • Key and FK information should be stated explicitly • Extend RDF vocabulary by a new namespace: rdfc • rdfc:Key, rdfc:Fkey, rdfc:ref • Keys and FKs may be built out of several components which are of type rdf:bag
Three Approaches • The third approach
Satifiability • Satisfiability of cardinality constraints, subproperty-chain and singleton constraints are undecidable. • Satisfiability of subclass, subproperty, property domain and property range, min- and max-cardinality, as well as unary foreign key and unary key constraints can be decided in ExpTime.
SPARQLing Constraints • Extract constraints
SPARQLing Constraints • Checking constraint violation • Key constraints
SPARQLing Constraints • Checking constraint violation • Foreign key constraints • (i) there is an object of C that does not reference an object of D through p1…pn • (ii) the referenced properties do not constitute a key
SPARQLing Constraints • Checking constraint violation • Cardinality constraints Max(c,n,p): Min (c,n,p):
SPARQLing Constraints • Checking constraint violation • SubProperty-chain constraints
SPARQLing Constraints • Checking constraint violation • Singleton constraints
SPARQLing Constraints • Checking constraint violation • Anti-key constraints