Posed the following question to myself:
How do you install and use the Virtuoso JDBC Driver, bearing in mind the sophisticated data access it offers to JDBC-compliant applications?
Here is the reply I constructed and have decided to share with the public via this post:
Note the JDBC Driver Name if your are familiar with the JDBC Driver Manager: virtuoso.jdbc4.Driver .
Explore the Virtuoso 8.2 Release description page and then follow-your-nose to information about the Virtuoso JDBC Drivers.
Alternatively, you can follow either of the paths provided below.
Installer Archives
- Download Virtuoso Server + Client Connectivity Bundle or Client Connectivity Only Installer for Windows, Linux, or macOS
- Obtain Free Evaluation License if you are connecting to an Virtuoso 8.2 Commercial Edition Server for Linux, macOS, or Windows
- Run the Installer
- Perform post-installation steps
- Download JDBC Demo Applications ZIP Archive
- Read guidelines outlined in this Sample JDBC Applications Document
JAR File
- Download this JAR file, courtesy of the Virtuoso JDBC 4.1 Driver JAR Archive Description Document
- Perform post-installation steps
- Download JDBC Demo Applications ZIP Archive
- Read guidelines outlined in this Sample JDBC Applications Document
Running Sample JDBC Application using the following command from your operating system’s command-line interface, once you situate yourself in the folder into which the contents JDBC demo application’s zip archive have been extracted:
Basic
java -cp .:./virtjdbc4.jar JDBCDemo
or simply
java JDBCDemo
SSL/TLS
java -cp .:./virtjdbc4_2ssl.jar JDBCDemo
To ensure you have some sample data in place for SQL interactions please install at least one of the following VAD packages via Viruoso’s HTML-based Admin UI (a/k/a “The Conductor”) or its command-line ISQL interface :
For SPARQL interactions, you can use Virtuoso’s SPASQL (SQL extended using SPARQL) Language to issue the following Federated SPARQL Query against the publicly accessible DBpedia SPARQL Query Service endpoint:
SPARQL
SELECT DISTINCT *
WHERE {
SERVICE <http://dbpedia.org/sparql>
{
SELECT *
WHERE {
?webid a foaf:Person;
foaf:name ?name .
FILTER (isIRI(?webid))
FILTER (?name != '')
FILTER (! contains(str(?webid),"uriburner"))
FILTER (! contains(str(?webid),"mates"))
FILTER (! contains(str(?webid),"urn:"))
}
LIMIT 100
}
}
Related
- Medium hosted Blog Post about our LOD Connectivity Licenses that provide ODBC and/or JDBC access to the LOD Cloud
- ODBC C++ Demo Application