Quick example of RDF that shows structured data. Example of triples using this ontology:
:WallyWorld a :Company ;
rdfs:label "Wally World Amusements" .
:Bill a :Employee ;
:employedBy :WallyWorld ;
:hasEmployeeRecord [
:fullName "Bill Lund" ;
:employeeType :PartTimeEmployee ;
:employeeRating "27.2"^^xsd:decimal ;
:yearsWorked "6"^^xsd:int ;
] .
Those triples assert the following facts:
Bill is employed by Wally World Amusements. Bill has an employee record with the following information:
- His full name is "Bill Lund"
- He's a part time employee
- His employee rating is 27.2
- He's worked at Wally World for 6 years
- The ontology (employee_ontology.trig) describes the classes and properties being used
- The data (employee_data.trig) contains some sample data that uses those properties and classes
- A sample query (average_years_worked_query.sparql) averages years worked by company
- Another query (full_time_employees_aggregate_years_worked.sparql) that restrict the query to full-time employees and does average, min, max, and count for years worked
If you want to get up and running quickly:
- download Blazegraph (https://www.blazegraph.com/download/)
- run it (java -server -Xmx4g -jar blazegraph.jar)
- open the local server web page, go to the update page
- upload both of the files (choose type RDF Data and format TriG)
- go to the query page, paste in one of the queries and run it