This content has been marked as final. Show 3 replies
The structure of the type sdo_rdf_triple_s was changed a bit in 11g. The attribute rdf_t_id no longer exists. To see a list of attributes of the type sdo_rdf_triple_s use the 'describe' command:
SQL> desc mdsys.sdo_rdf_triple_s;
Note that we generally encourage using methods to access object attributes (instead of directly accessing an attribute) since attribute names can change. (further note that if an application had data in 10g the upgrade process would take care of moving the data to the modified type in 11g).
If you had wanted to get the triple_id of a given triple, you can use procedure sem_apis.get_triple_id(...). See chapter 3 in the documentation for more details.
thank you very much.
but, In face, I want to know what is the best way to query ontologies with the known subject, property and object.
such as the following query:
select a.triple() from TABLE_NAME
where a.triple.get_subject() = 'SUBJECT_NAME' and
a.triple.get_property() = 'PROPERTY_NAME' and
to_char(a.triple.get_object()) = 'OBJECT_NAME';
can it get the highest performance?
Yes, it can get good performance if you build the right indexes. See section 1.8 of the documentation. For the family_rdf_table example used in the documentation, indexes can be built as follows:
-- Create indexes on the subjects, properties, and objects
-- in the FAMILY_RDF_DATA table.
CREATE INDEX family_sub_idx ON family_rdf_data (triple.GET_SUBJECT());
CREATE INDEX family_prop_idx ON family_rdf_data (triple.GET_PROPERTY());
CREATE INDEX family_obj_idx ON family_rdf_data (TO_CHAR(triple.GET_OBJECT()));