What happenes to edges if I delete a vertex.

100 views
Skip to first unread message

Piotr Fraś

unread,
May 18, 2016, 11:23:19 AM5/18/16
to OrientDB
Does a concept of 'orphaned edges' exist? Do I need to delete edges manually if I delete a vertex which has links? OrientDB 2.12.2

Thanks

Luigi Dell'Aquila

unread,
May 18, 2016, 11:32:44 AM5/18/16
to orient-...@googlegroups.com
Hi Piotr,

If you delete vertices using Graph API (eg. DELEVE VERTEX statement) edges will be removed as well. If you force the delete using document API (eg. DELETE FROM ... UNSAFE) then you will have orphaned edges

Thanks

Luigi


2016-05-18 17:22 GMT+02:00 Piotr Fraś <piotre...@gmail.com>:
Does a concept of 'orphaned edges' exist? Do I need to delete edges manually if I delete a vertex which has links? OrientDB 2.12.2

Thanks

--

---
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.

Eric24

unread,
May 19, 2016, 8:42:43 AM5/19/16
to OrientDB
Luigi--
Just so I'm clear on this, you say delete using the Graph API, but it's my understanding that if I use SQL to delete a vertex that this also deletes any related edges. Correct or no?
--Eric

scott molinari

unread,
May 19, 2016, 4:00:16 PM5/19/16
to OrientDB
As I understand ODB, using the "Graph API" means you've created the database as a graph database and not as a document database. So, if you are using a graph database, then your SQL is automatically using the Graph API.

Scott

Eric Lenington

unread,
May 19, 2016, 6:04:23 PM5/19/16
to OrientDB
Thanks Scott. That makes sense. But it brings up another question that I've had for some time. I've never actually created an ODB document database. As I see it, there's really no reason to, since a graph database still retains all of the features of a document database (at least the ones that I care about). Is there any reason to create a document database, even if you don't plan to use graph features?

On Thu, May 19, 2016 at 3:00 PM, 'scott molinari' via OrientDB <orient-...@googlegroups.com> wrote:
As I understand ODB, using the "Graph API" means you've created the database as a graph database and not as a document database. So, if you are using a graph database, then your SQL is automatically using the Graph API.

Scott

--

---
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/oiMC63tHni4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to orient-databa...@googlegroups.com.

scott molinari

unread,
May 20, 2016, 3:23:22 PM5/20/16
to OrientDB
I don't know of any reason to use a document database either. It I wanted that, I'd use MongoDB. ;-)

Scott
Reply all
Reply to author
Forward
0 new messages