简体   繁体   中英

Alternatives for OrientDB Schema

The OrientDB documentation describes how to use their API enabled schema for Java graph databases in ways like the following..

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

Are there other possible alternatives for creating and enforcing a schema with OrientDB? (ie XML, JSON, XSD) Or is their API the only way?

you can do it from OrientDB Studio (web UI) or with simple SQL statements (executed from Studio, console, any programmatic API or from REST protocol http://orientdb.com/docs/last/OrientDB-REST.html ), eg.

 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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM