[英]What is the difference between INSERT and CREATE VERTEX in OrientDB?
I've recreated my database as a graph
instead of a document
database, as it represents a social network. 我将我的数据库重新创建为graph
而不是document
数据库,因为它代表了一个社交网络。 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. 我仍然可以使用INSERT
,由于UPSERT
选项非常有用,而CREATE VERTEX
选项没有该选项。
Additionally, I'm wondering if I do, in fact, need to use CREATE VERTEX
, if an UPDATE VERTEX
will be available. 另外,我想知道我是否确实需要使用CREATE VERTEX
,如果UPDATE VERTEX
可用。
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! 在底层实现中CREATE VERTEX和INSERT之间没有那么大的区别,但严格建议使用CREATE VERTEX,因为它可以做额外的检查! as well as all specific sql operation like DELETE VERTEX! 以及DELETE VERTEX等所有特定的SQL操作!
for the UPSERT in the CREATE VERTEX will be really nice submit a feature request :) 对于CREATE VERTEX中的UPSERT将非常好提交功能请求:)
While using Pyorient 1.4.9 and OrientDB 2.2.17, 在使用Pyorient 1.4.9和OrientDB 2.2.17时,
I found that if you have a Generic Class, you can only insert new records using INSERT INTO MyGenericClass ...
. 我发现如果你有一个Generic Class,你只能使用INSERT INTO MyGenericClass ...
插入新的记录INSERT INTO MyGenericClass ...
If you try to use CREATE VERTEX MyGenericClass ...
the pyorient client hangs and becomes unresponsive. 如果您尝试使用CREATE VERTEX MyGenericClass ...
pyorient客户端挂起并变得无响应。 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. 尽管pyorient没有响应,但我要说的底线是你不能在不继承V
类的类中插入Vertex。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.