1 Reply Latest reply: Aug 20, 2012 9:21 AM by JorgeB-Oracle RSS

    how to use SEM_RELATED & SEM_MATCH in a single query

    792262
      Hi,

      I am trying to combine RDF and RDBMS data using SEM_RELATED.

      Below sample is working fine but the requirement is i have to add few more conditions in SEM_MATCH

      Please suggest me how to combine sem_match and sem_related in a single query.

      Please provide me the example which use SEM_MATCH and SEM_RELATED in a single query.

      SELECT distinct dg_term_property.CONTEXT_NM FROM dg_term_property,dg_term
      WHERE SEM_RELATED ('<http://www.cs.com/mdm/data_glossary#Facilities>',
      '<http://www.w3.org/2000/01/rdf-schema#subClassOf>',
      '<http://www.cs.com/mdm/data_glossary#Reference_Data_Classes>',
      sem_models('GSR_PR_CURR'), sem_rulebases('owlprime')) = 1
      and DG_TERM.TERM_NM=DG_TERM_PROPERTY.TERM_NM;

      Let me know if you need any other details.

      Regards,
      Kavitha.
        • 1. Re: how to use SEM_RELATED & SEM_MATCH in a single query
          JorgeB-Oracle
          Hi Kavitha,

          I am not sure what exactly you are trying to accomplish with this query but the use of the SEM_RELATED is incorrect. To fulfill your requirement most likely you may not even need to combine SEM_RELATED with SEM_MATCH. Actually those two are not built to be used together.

          Take a look at the SEM_RELATED documentation and see if you can use it to get the results you need. The example that you are providing is not using the SEM_RELATED correctly.

          Here is the documentation:

          http://docs.oracle.com/cd/E11882_01/appdev.112/e25609/owl_concepts.htm#CHDJBGFI

          Go to:

          2.3 Using Semantic Operators to Query Relational Data

          Regards!
          Jorge

          Edited by: jbarba on Aug 20, 2012 10:20 AM

          Edited by: jbarba on Aug 20, 2012 10:21 AM