Friday, 15 March 2013

How to programmatically create an OrientDB database of a given (json) schema? -


For the purposes of my dev workflow, I want to create a new orientable database given to a JSON schema on the fly. I do not believe it is fundamentally supported in ORDB, is there any existing solution that does this - provide a JSON schema and point to an oriented example, and it automatically builds the database (edges, Upper, indexed and maybe some sample data)

I create a .sh script to make DB on the fly Lee The .sh file looks like this:

  # (file: createmydb.sh) # To make the script to my script declaratively declare the truth to resonate #Use it to ignore errors and continue For, if necessary, create the database to create #Trade Undertaker IRRS True # Database: ./ Database / MyDB Root Root Multidimensional Graph # Create User Create Virtual Class User Create User Property Users are E-mails create property properties of STRING. First name STRING ...  

And then call it like this:

  /usr/local/src/orientdb/bin/console.sh createmydb .sh  

It works well DB creation script is very easy for my purposes, it can be easily modified. And I am convinced that very backwards compatible (which can not be in the case of importing the exported JSON version of DB Schema).


No comments:

Post a Comment