better handle relations with rdf database