Question

Allegrograph is basically a RDF triple(actually five field) store. Then why can't we create a MySQL table with five columns and store the triples in them. ?

What features does AG have over such MySql table ?

Was it helpful?

Solution

Simply put it supports SPARQL

SPARQL is the query language for RDF and it has quite difference semantics to SQL, there are tools to convert SPARQL into SQL queries but performance is often very poor. Plus there are lots of features of the SPARQL specification (esp the built-in functions) which have no equivalent in MySQL and so would either have to be aped by stored procedures/user defined functions or done in code.

Evaluating SPARQL is quite different to evaluating SQL because SPARQL is far more reliant on lots of complex joins, SPARQL stores use optimizers that while work on the same principles as SQL optimizers but are designed to cope with very different kinds of queries to those a traditional RDBMS would usually handle.

In general a five column table is very naive because each column contains a complex item that has multiple parts to it and would be better stored using multiple tables. Also a single table approach will lead to massive storage requirements over a more normalized table design.

If all you care about is saving and loading RDF triples to/from an SQL database then a naive single table approach may be fine for you. If you actually want to do something useful then you need a more complex SQL database schema or a proper RDF store like AllegroGraph

OTHER TIPS

AllegroGraph sets the industry standard for ACID compliant RDF graph databases and is optimized for OLTP, reasoning and business intelligence applications that utilize semantic technology.

So if you decide to create a single five column table to simulate an RDF graph database, what will you be missing?

  • As described in the other response, you won't get SPARQL (the query language of the semantic world) or the ability to create your own SPARQL extensions.
  • mySQL is optimized for highly normalized database schemas, not a single table large table and multiple self-joins per query.
  • AllegroGraph supports several server side programming languages (Javascript, Prolog, Lisp) that are all optimized for this type of store.
  • AllegroGraph supports RDF data, and Geo extensions, Social Network Analysis extension all at the same time in the same data set.
  • AllegroGraph supports reasoning over RDF graph data sets (RDFS++)
  • AllegroGraph supports triple level security.
  • AllegroGraph supports the Java semantic libraries Jena and Sesame, and Python, C#, Clojure, Lisp, Ruby, REST interface
  • Like any enterprise database, AllegroGraph also supports online backups, replication, warm standby, point-in-time restore
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top