SEM_MATCH Query Not Returning Results (Doc ID 1597030.1)

Last updated on FEBRUARY 08, 2017

Applies to:

Oracle Spatial and Graph - Version 11.2.0.3 and later
Information in this document applies to any platform.

Symptoms

The following SEM_MATCH query is not returning results:

Select m
from table (sem_match(
'(?m rdf:type :Male)',
SDO_RDF_Models('person'),
null,
SEM_ALIASES(SEM_ALIAS('', 'http://FamilyPerson/person/')),
null));

no rows selected

test case:

--rem create user
conn / as sysdba
create user rdfperson identified by rdfperson;
grant connect, resource, create table, create view, create sequence, create public synonym to rdfperson;
grant drop public synonym to rdfperson;
conn rdfperson/rdfperson

exec sem_apis.drop_entailment('rdfs_rix_family');
execute SEM_APIS.drop_rdf_model('person');
drop table tb_rdf_family;


-- Create the table to hold data for the model.

CREATE TABLE tb_rdf_family(id NUMBER, triple SDO_RDF_TRIPLE_S);

-- Create the model.

execute SEM_APIS.create_rdf_model('person', 'tb_rdf_family', 'triple');

INSERT INTO tb_rdf_family VALUES (14,SDO_RDF_TRIPLE_S('person','20000183000C','http://www.w3.org/1999/02/22-rdf-syntax-ns#type','Male'));
commit;

Select m
from table (sem_match(
'(?m rdf:type :Male)',
SDO_RDF_Models('person'),
null,
SEM_ALIASES(SEM_ALIAS('', 'http://FamilyPerson/person/')),
null));

no rows selected

We expect 20000183000C which is a Male

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms