I'm currently doing migration from Oracle 10gR2 RDF to Oracle 11gR2 Semantic Technology.
I followed the steps on the documentation and successfully created the network using the following:
CREATE TABLE rdf_network_trace (id NUMBER, triple SDO_RDF_TRIPLE_S);
--Created SEQUENCE andTRIGGER FOR rdf_network_trace id
execute sem_apis.create_sem_model(model_name =>'rdf_nt', table_name => 'rdf_network_trace', column_name => 'triple');
CREATE INDEX nt_sub_idx2 ON rdf_network_trace (triple.GET_SUBJECT());
CREATE INDEX nt_prop_idx2 ON rdf_network_trace (triple.GET_PROPERTY());
CREATE INDEX nt_obj_idx2 ON rdf_network_trace (TO_CHAR(triple.GET_OBJECT()));
INSERT INTO mdsys.semr_rb_rdf_nt VALUES(
'(?x :connectedTo ?y)',
'(?x :connected ?y)',
,SEM_APIS.REACH_CLOSURE, null, 'USER_RULES=T'
CREATE TABLE path_link_rdf_nt
CREATE TABLE path_rdf_nt
CREATE OR REPLACE VIEW node_rdf_nt$
CREATE OR REPLACE VIEW link_rdf_nt$
CREATE OR REPLACE VIEW path_rdf_nt$
CREATE OR REPLACE VIEW path_link_rdf_nt$
INSERT INTO user_sdo_network_metadata(network, network_category, node_table_name, link_table_name, link_direction, path_table_name, path_link_table_name)
VALUES( 'rdf_nt_network', 'LOGICAL','node_rdf_nt$', 'link_rdf_nt$', 'UNDIRECTED', 'path_rdf_nt$','path_link_rdf_nt$');
SELECT sdo_net.validate_network('rdf_nt_network') FROM DUAL;
sdo_net.validate_network says that my network is Valid.
I inserted 3 records to my rdf_network_trace:
INSERT INTO rdf_network_trace (triple) VALUES (SDO_RDF_TRIPLE_S('rdf_nt','http://www.sample.com/rdf_nt/SPL01780','http://www.sample.com/rdf_nt/connectedTo','http://www.sample.com/rdf_nt/SEC06007'));
INSERT INTO rdf_network_trace (triple) VALUES (SDO_RDF_TRIPLE_S('rdf_nt','http://www.sample.com/rdf_nt/SEC06007','http://www.sample.com/rdf_nt/connectedTo','http://www.sample.com/rdf_nt/SEC05890'));
INSERT INTO rdf_network_trace (triple) VALUES (SDO_RDF_TRIPLE_S('rdf_nt','http://www.sample.com/rdf_nt/SEC05890','http://www.sample.com/rdf_nt/connectedTo','http://www.sample.com/rdf_nt/DP02702'));
Records were inserted successfully, but when I try to Read Network, Maximum node id is larger than the Java maximum integer value error occurs.
net_name varchar(100) := 'rdf_nt_network';
ORA-29532: Java call terminated by uncaught Java exception: oracle.spatial.network.NetworkDataException: oracle.spatial.network.NetworkDataException: Maximum node id is larger than the Java maximum integer value
ORA-06512: at "MDSYS.SDO_NETWORK_MANAGER_I", line 284
ORA-06512: at "MDSYS.SDO_NETWORK_MANAGER_I", line 114
ORA-06512: at line 4
when I looked at my Node Ids, they were like +635762253807433724+, +6118969225776891730+. The problem is, I am not the one who is assigning Node Ids, They were automatically generated when inserting TRIPLE data to the rdf table.
Am I doing something wrong here? or Did I miss something when I created my network?
It sounds like a known NDM issue. Are you using 220.127.116.11?
You may want to take a look at SemNetworkAnalyst API in the following document. Over there,
we integrated NDM APIs with RDF objects.
Hi Zhe Wu,
We are using Oracle 11gR2 18.104.22.168
Is it possible to use Jena Adapter in 22.214.171.124? I see that it requires version 126.96.36.199 and I think it is not possible for us to upgrade to that version at this time.
Or are there other workarounds for this?
Good News! I got a confirmation from NDM engineering team that NDM 11203 should work with Oracle 188.8.131.52 (apart from the power law graph partitioning). You will need to get the following BLR from Oracle Support.
BLR # 750465 Bug 13345969 - BLR backport on top of 184.108.40.206
Hi Zhe Wu,
I tried searching in Oracle Support, but this was the result: No Bug Number found by the number "13345969". Click Edit Search to search by Patch Name or Number.
We'll be testing 220.127.116.11 instead.
Hi Zhe Wu,
I have another question. I am confused regarding this Jena Adapter.
As I have said before, we are doing migration from Oracle 10gR2 to 11gR2 (18.104.22.168).
By installing Jena Adapter for Oracle, this will fix the issue Maximum node id is larger than the Java maximum integer value when I am executing SDO_NET_MEM.NETWORK_MANAGER.READ_NETWORK ?
I am actually not using SEM_MATCH functions in my Procedures/Packages.
Most of my Procedures and Packages are using SDO_NET_MEM subprograms (shortest path, reachable nodes, etc.).
Based on Jena Adapter for Oracle docs, queries were executed through SPARQL. Which is not applicable in our case.
You probably still want to use Jena Adapter's SemNetworkAnalyst to set things up before you can use
NDM on top of RDF data.
There is one fundamental difference between an RDF graph and a regular link table required by NDM.
In an RDF graph, links (predicates) can be shared while a regular link table requires every edge/link
to be distinct. So SemNetworkAnalyst actually does a mapping for the users. In addition, RDF graphs do
not come with edge/link weights. SemNetworkAnalyst allows one to assign weights to different links (predicates).
I would recommend you to start with SemNetworkAnalyst and get a concrete feeling about how these
pieces fit/work together.