Both triplet stores and relational databases are used to store data but the nature of the data is different. Triplet stores are very useful to store complex type of data. Triplet stores are much more interesting than relational databases because of the flexibility they provide. The developer is not restricted to a particular schema and you can query multiple sources together in triplet stores.
There are many reasons to choose one over other. Following are the characteristics of each type of store that help you determine which one to select:
Triplet Data Stores:
- Data in triplet stores is saved in the format of subject-predicate-object and is stored as a flat file.
- Query languages include RDQL, SPARQL, RQL, SeRQL, Versa
- Triplet stores might use relational database as an underlying layer.
- Named graphs in triplet stores are used to represent views and stored procedures of traditional databases.
- One is to free as much information about an entity as required without requiring to change any particular schema
- One is free to add any additional meta data information in triplet stores. It’s very easy to store such information.
- Multiple sources can be used to answer a single query and as the resources are identified by URLs, same entity on multiple places can be identified using those URLs.
- Triplet store is quiet good at handling complex nature of data.
- XML for RDF format (format to represent triplets) is very verbose and difficult for developers. A new format, N3 has been developed to remedy this issue.
- Reasoning can be performed on triplet stores.
Relational Data Stores
- Each entity will have its own table.
- Query language used with relational databases is Structured Query Language (SQL)
- Relational databases are very mature and are ideal for data of tabular nature.
- Relational databases are not optimized for self joins which makes then difficult to be used for triplet stores.
In short, if you have enough ontologies and resources at hand, you can get any kind of information you like. That’s the reason big companies like Google and Facebook are always adding more resources to their stores. Triplet stores provide schema flexibility, is more adaptable for service oriented architecture (SOA). The downside is that triplet stores don’t support transactions and has higher cost per bit of information.