Reputation: 11725
I've recreated my database as a graph
instead of a document
database, as it represents a social network. However, I'm unsure as to what the difference is between a vertex and an ordinary record. I'm still able to use INSERT
, which is very useful because of the UPSERT
option, and the CREATE VERTEX
options doesn't have that option.
Additionally, I'm wondering if I do, in fact, need to use CREATE VERTEX
, if an UPDATE VERTEX
will be available.
Upvotes: 3
Views: 3093
Reputation: 643
While using Pyorient 1.4.9 and OrientDB 2.2.17,
I found that if you have a Generic Class, you can only insert new records using INSERT INTO MyGenericClass ...
. If you try to use CREATE VERTEX MyGenericClass ...
the pyorient client hangs and becomes unresponsive. Despite pyorient being unresponsive, the bottom line I would said is that you cannot insert a Vertex in a class that does not inherits the V
class.
Upvotes: 0
Reputation: 527
There's no so much difference between CREATE VERTEX, and INSERT in the underling implementation but is strictly suggested to use CREATE VERTEX, because it can do additional check! as well as all specific sql operation like DELETE VERTEX!
for the UPSERT in the CREATE VERTEX will be really nice submit a feature request :)
Upvotes: 4