-
Notifications
You must be signed in to change notification settings - Fork 1
Use cases
Some use cases in which SPARQLFederator may be of interest:
This use case happens when there's the need to query data distributed across several relational databases. For instance, say that each branch of a bank has one database instance, and you need to get the balance of all of them. All databases contain similar information, however it could follow different modellings.
First you define the Global Ontology, which is how you want to view the consolidated information from all databases. Create a domain ontology with all concepts used. Then, for each one of the different database models, a mapping is established, mapping artifacts in the database to the classes defined in the Domain Ontology. The language of the mapping depends on the OBDA (Ontology Based Database Access) tool which will be used. D2Rq and OntoP are excellent OBDA software.
Once one OBDA instance is configured and running for each database, SPARQLFederator can be used. Create a federation ontology, listing all your OBDA instances and linking them to the applicable classes and properties (check the SPARQLFederator Semantics page to see all axioms supported by SPARQLFederator).
Sometimes there's information that can be inferred from a database. For instance, in a bank database, all clients with more than a U$ 1,000,000 invested, or with monthly transactions above U$ 500,000 for more than 12 months may be eligible to get a platinum card. Representing this knowledge in a database view is possible, however that would require an database expert, and it would be too tightly coupled to that particular database implementation.
When the database is mapped to an ontology by an OBDA layer, these rules can be expressed as axioms. If there are classes such as CostumerWithMoreThan1MInvested, CostumerWithMoreThan500KWorthTransactions and CostumerForMoreThan12Months, this business rule can be expressed as:
- CostumerWithMoreThan1MInvested SubClassOf CostumerEligibleForPlatinumCard
- CostumerWithMoreThan500KWorthTransactions and CostumerForMoreThan12Months SubClassOf CostumerEligibleForPlatinumCard
Those axioms, when present on the domain ontology, will expand queries that include the class CostumerEligibleForPlatinumCard, substituting this class (which is not defined directly in the database) for an expression with the classes CostumerWithMoreThan1MInvested, CostumerWithMoreThan500KWorthTransactions and CostumerForMoreThan12Months.
There are several SPARQL endpoints avaliable in the internet, however not all of them provide inference capabilities. SPARQLFederator may be used in these cases to fill that gap. Any endpoint can be referred as a data source.