SPARQL - learning by example


In short, if someone instructs me, "Get a list of databases which include Oracle, Mysql, DB2, MSSQL, etc.," how can I actually establish which fields and information I need to create the query? I downloaded DBpedia and grepped the triples, e.g.,

$ `grep 'Oracle' * | grep 'Database' article_categories_en.nt:<http://dbpedia.org/resource/Oracle_Database> <http://purl.org/dc/terms/subject> <http://dbpedia.org/resource/Category:Relational_database_management_systems> .`

How do I create a SPARQL query from that initial question? Using that snippet above, I know Oracle is a company and one of its products is an RDBMS by the same name. I tried the lookup tool and searching the web but did not get far enough with this and need some direction.


In this particular case, I'd start by visiting the DBpedia page corresponding to one of the things that you know you'd like in your result. A good instance is <a href="http://dbpedia.org/page/MySQL" rel="nofollow">http://dbpedia.org/page/MySQL</a>. On that page, you can start to look for properties that might help you find other related systems. One property listed on the page is

dbpedia-owl:genre dbpedia:Relational_database_management_system

Then I'd go the <a href="http://dbpedia.org/sparql" rel="nofollow">DBpedia SPARQL endpoint</a> and try searching for other things that have this same property and value. In this case, I can run the following query:

SELECT * WHERE { ?rdbms dbpedia-owl:genre dbpedia:Relational_database_management_system . }

<a href="http://dbpedia.org/sparql?default-graph-uri=http%3A%2F%2Fdbpedia.org&query=SELECT+%2a+WHERE+%7B+%0D%0A++%3Frdbms+dbpedia-owl%3Agenre+dbpedia%3ARelational_database_management_system+.%0D%0A%7D&format=text%2Fhtml&timeout=30000&debug=on" rel="nofollow">SPARQL results</a>

The results are pretty promising; there are 38 results. The first few are:

rdbms http://dbpedia.org/resource/MySQL_Cluster http://dbpedia.org/resource/MSQL http://dbpedia.org/resource/OpenEdge_Advanced_Business_Language http://dbpedia.org/resource/Adaptive_Server_Enterprise …

In general, I find it much easier to locate an instance of the sort of thing that I'm looking for in Wikipedia, then visit the corresponding DBpedia page and look at the properties, and then formulate some exploratory queries based on that.


  • SVG to Bitmap to ImageView
  • xmllint failing to properly query with xpath
  • How to get the relationship between United Kingdom and England from DBpedia?
  • Filtering based on a URI in SParQL [duplicate]
  • active directory findone() method
  • how to cast an anonymous type to IQueryable in C#?
  • Jena Sparql Error java.lang.Integer
  • dc.js: Reducing rows in data table
  • web shop (shopping cart) on google app engine
  • How to get ID of changed file on Google Drive
  • IIS 7.5 404 Error for .PDF files
  • wrong item changes in recyclerview
  • Spring Boot OAuth2 SSO with access/refresh tokens is not stored in a database correctly
  • What is “PHP-standardized” version number strings?
  • What does a hyphen at end of a term mean
  • How to start server for Selenium grid Java Maven setup
  • How to use ResourceDictionary in Windows Phone class library project
  • How to get the url of a file of google drive to download in android
  • android-support-v7-appcompat has same attrs as actionbarsherlock library
  • How many Vertica Databases can run on a Host in the same time?
  • Angular page doesn't refresh after data is added or removed
  • How to map Request parameter in Spring?
  • Can XOR be expressed using SKI combinators?
  • Python getting common name from URL using ssl.getpeercert()
  • Where these are stored?
  • In Java, how can I construct a File from a resource?
  • JBoss External Properties Files in Classpath
  • dc-js disable selecting slices on click for pie chart
  • Launch Runnable Jar from Web Start
  • In LanguageTool, how do you create a dictionary and use it for spell checking?
  • Which linear programming package should I use for high numbers of constraints and “warm starts” [clo
  • Alternatives to the OPTIONAL fallback SPARQL pattern?
  • Turn off referential integrity in Derby? is it possible?
  • JaxB to read class hierarchy
  • costura.fody for a dll that references another dll
  • Observable and ngFor in Angular 2
  • How to Embed XSL into XML
  • UserPrincipal.Current returns apppool on IIS
  • Conditional In-Line CSS for IE and Others?
  • java string with new operator and a literal