简体   繁体   English

OrientDB中的INSERT和CREATE VERTEX有什么区别?

[英]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.

相关问题 在orientdb中sql批处理和事务有什么区别? - What is the difference between sql batch and transaction in orientdb? OrientDB GraphED - 两个(选择顶点RID)之间的SQL插入边缘? 或者非常大的导入的替代方法 - OrientDB GraphED - SQL insert edge between two (select vertex RID)s? Or alternative approach for very large import 如何在 OrientDB 中为数千个顶点创建边缘? - How to create edge in OrientDB for thousands of vertex? HiveQL/SQL:CREATE TABLE AS SELECT (CTAS) 和 CREATE EXTERNAL TABLE + INSERT INTO 有什么区别? - HiveQL/SQL: What is the difference between CREATE TABLE AS SELECT (CTAS) and CREATE EXTERNAL TABLE + INSERT INTO? Hibernate save和SQL insert有什么区别? - What is the difference between Hibernate save and SQL insert? insert语句与into和without之间有什么区别? - what is the difference between insert statement with into and without into? 如何遍历多个OrientDB顶点 - How to traverse multiple OrientDB vertex OrientDB在两个相关的顶点上选择 - OrientDB Select on two related vertex INSERT ... RETURNING和pl / pgsql RETURN有什么区别? - What is the difference between INSERT…RETURNING and pl/pgsql RETURN? 如何在 OrientDB 中的一个 SQL 查询中插入顶点后立即创建边? - How create edges right after vertex insertion in one SQL query in OrientDB?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM