Moving from MongoDB to OrientDB

143 views
Skip to first unread message

ismet ozalp

unread,
Mar 21, 2015, 8:02:45 PM3/21/15
to orient-...@googlegroups.com
Hi,
Is there guide for moving from mongodb to orientdb like how should we transform mongodb references to orientdb edges and how should we handle mongodb's objectid's. If anyone has any resource on this matter I would really appropriate sending it to me.  We are very interested on orientdb so we want give it a shot but we have questions about data transformation. Thank you.

Regards,
Ismet

Luca Garulli

unread,
Mar 22, 2015, 7:05:56 AM3/22/15
to orient-database
Hi Ismet,
Take a look at our ETL, in particular to the import from Parse (Facebook) that is using MongoDB under the hood:


Lvc@


--

---
You received this message because you are subscribed to the Google Groups "OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orient-databa...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

ismet ozalp

unread,
Mar 30, 2015, 11:54:22 AM3/30/15
to orient-...@googlegroups.com
Thanks Luca,
It's a nice example, I understand the concept and I guess before importing extracted data from Parse i need to import the users first and it's ok.
But what if i have circular (back) references, we have some collections that have documents with circular references, how do we proceed with them?

Regards,
Ismet

Patrick Hoeffel

unread,
Mar 30, 2015, 4:10:22 PM3/30/15
to orient-...@googlegroups.com
A strategy that I have found useful (if you have a field in your documents that you can use as a Primary Key field, such as "UserId") is to query for the user object you want to link to, and if it exists, create the edge/link. If it does not exists, then just create a "stub" vertex of type "User" with Id = <UserId>. That will give you something to link to. Later, when the actual User object shows up for insert into the database, you can just update the existing node with the rest of the User data, and you won't disturb your already-existing links. If you need to be able to specifically identify these "stub" nodes, you can always add a second property called "Temporary=true" or something like that, so you'll always be able to pick them out later if necessary.

Good luck,

Patrick

ismet ozalp

unread,
Mar 30, 2015, 4:18:38 PM3/30/15
to orient-...@googlegroups.com

Later tonight i found this which explains my question http://www.orientechnologies.com/docs/last/Import-from-JSON.html 
unresolvedLinkAction is what i am looking for i guess
You received this message because you are subscribed to a topic in the Google Groups "OrientDB" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/orient-database/M_RuZLM_A_k/unsubscribe.
To unsubscribe from this group and all its topics, send an email to orient-databa...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
With Best Regards
Ismet Ozalp
Reply all
Reply to author
Forward
0 new messages