如何在orientdb 3.0中确保唯一的顶点和边?

问题描述 投票:0回答:1

我正在使用OVertexOEdge存储数据点。我的数据点可能是重复的且不是唯一的,我如何确保orientdb将它们存储为唯一(基于特定属性)。我似乎在文档中找不到任何有用的信息。我正在使用orientdb 3.0。

java orientdb graph-databases
1个回答
0
投票

您可以在属性上创建UNIQUE索引:

CREATE INDEX Person.uuid on Person(uuid) UNIQUE

有关索引的完整文档在这里:http://orientdb.com/docs/3.0.x/sql/SQL-Create-Index.html

© www.soinside.com 2019 - 2024. All rights reserved.