OrientDB Schema的替代方案

时间:2015-07-09 15:38:19

标签: java xsd schema orientdb

OrientDB文档描述了如何使用API​​启用的API图形数据库模式,如下所示..

profile.createProperty("nick", OType.STRING).setMin("3").setMax("30").setMandatory(true).setNotNull(true);

使用OrientDB创建和实施模式还有其他可能的替代方案吗? (即XML,JSON,XSD)或者他们的API是唯一的方法吗?

1 个答案:

答案 0 :(得分:2)

您可以从OrientDB Studio(Web UI)或使用简单的SQL语句(从Studio,控制台,任何编程API或REST协议http://orientdb.com/docs/last/OrientDB-REST.html执行)来完成,例如。

 create class Person extends V
 create property Person.name STRING 
 alter property Person.name MANDATORY true

http://orientdb.com/docs/last/SQL-Create-Class.html

http://orientdb.com/docs/last/SQL-Create-Property.html