I have the feeling that I'm doing it all wrong. But anyway.
I have a sql database that has an essentially focused denormalized table that I created to facilitate this task, so I can just grab the material from one table.
I have a pairs table, something like this:
user_lo | user_hi | something_else | other stuff 1000 | 1234 | 1231251654 | 123 1050 | 1100 | 1564654 | 45648 1080 | 1234 | 456444894648 | 1
Etc.
So, for my db neo4j graph, I want each user id to be node, the other stuff is not too important, but it will be basic in the relationship.
I only need one node for each user, so I feel that if I do something like this:
while (rs.next()) { node_lo = db.createNode(); node_lo.setProperty("user_id", rs.getInt(1)); node_hi = db.createNode(); node_hi.setProperty("user_id", rs.getInt(2)); }
That when we add a node with user_id 1234 a second time, it will just create a new node, but I want it to just grab that node instead of creating it, so that I can add it to 1080 in this case.
So what is the way to do this?
source share