The semantic web is the next level of Web Searching where data is more important and it should be well defined. The semantic web is needed for making the web search more intelligent and intuitive to get the user’s requirement. You all can find some interesting point on the Semantic Web here.
Triples is an atomic entity in RDF. It is composed of subject-predicate-object. It is used for linking the object (Subject & Object) with the help of Predicate. You all can find some interesting point on the Triples here.
RDF stands for Resource Description Framework, It is a framework which is used for representing all information about the source into the graph. RDF store is used for storing the triples and uses SPARQL query to run it where in RDF store it creates some tables and on the basis of those tables it converts SPARQL query into the normal SQL queries and for that, it uses Quetzal.
Now there will be some questions and one of them is: What are we doing here?
We are trying to store the Triples into Cassandra as Quetzal stores into Postgres after creating the tables. Quetzal creates lots of table for storing the Triples on the basis of certain conditions. Tables which is created by the Quetzal:
For more information of these tables, you can visit here.
We are trying to implement kb_direct_preds & kb_dph tables on the Cassandra and fetch the object with the help of subject and predicate.
Table kb_direct_preds is used for storing the location of the predicate in the kb_dph table while kb_dph stores every value of the triples along with subject, predicate & object.
Ingest Data into Cassandra
We have to follow these steps to insert the data into the table:
- Apache Cassandra running on default port [i.e. 9042]
sbt "runMain com.knoldus.TripleLoader /PATH/TO/TRIPLE/FILE"
Fetch Data From Cassandra
We have to follow these step to fetch out the data from the Cassandra table:
- Run project using the command:
- After running the project, hit the endpoint from your browser:
You can find more information from the wiki of the project.
We have submitted the template of the project. You can find template with this command:
sbt new knoldus/triple-manipulation.g8
These are the steps for storing triples into a kb_dph table with the help of kb_direct_preds.
If You have any questions you can comment us here or contact us on:
Github: Triple Manipulation