java - Storing all data of a website on Apache Jena as RDF?


I am trying to build a web site build on semantic technologies. It is a CMS, to make it simple lets say it's a blog. I need to be able to do simple CRUD operations. All data will be saved on Jena like blog posts, user informations, blog categories etc.

I have a php system. Here is the path what i am planing to follow:

  1. Use Apache Jena as RDF Store
  2. Use Apache Jena for storing and retrieving the data.
  3. Write a web service on java
  4. Communicate through web service with PHP in JSON format to view, control the data.

My main focus is to build a web site on semantic technologies. Is there anything wrong with my approach?

If not the main question is when a user made a blog post how will i create a relation with the blog post and user. With mysql it was just a froeign key. How can i make a relations on Jena between new blog post and existing user?




I can't see anything wrong with your approach. Maybe I would suggest to use JSON-LD as an interchange format, because Jena can read it and write it directly instead of having to create your own converters to RDF (see

Regarding the modeling question, I strongly recommend to have a look at the SIOC vocabulary (, which aims to represent exactly what you are looking for, and more.




Another hardcore solution would be to create the pages of the website in RDF (serialized in RDF/XML), and use XSL to generate the HTML version on demand for each page. It really depends on the size of your website.

People are also looking for solutions to the problem: PHP/MYSQL: Update Query where value is missing from WHERE clause


Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.