顶点和边的模型架构
Model Schema for vertices and edges
如何像 OrientDB 中那样验证图(顶点和边)数据?
例如,
如果我的图表具有 vertices/edges 格式
{
"name": :any_name,
"age" : 13
}
如何将它与定义明确的架构(通过验证)相关联?
在OrientDB中,也有将数据存储在顶点和边中的特性,并且每个模式都有很好的定义。我如何在 arangoDB 中执行此操作?
“开箱即用”ArangoDB 不支持架构实施。显然,这在某些用例中可能是一个重大缺陷。
然而,ArangoDB 的 Max Neunhöffer 认为,通过一些工作,可以关闭标准数据库 API,留下一个基于 ArangoDB 的系统来执行模式:
Therefore, ArangoDB can then be turned into a strict schema-enforcing persistence engine, because its HTTP API can be extended by user code written in JavaScript that is executed in the database server with direct access to the data. One can gradually evolve the way the data store is used by client code and move it slowly over to special, user defined routes that enforce the by now stable database schema, in particular for the write operations. As a consequence, a lot of client code can be simplified, because suddenly one can rely on a strict schema that is enforced by the API, once all write operations are covered.
In the end, when one has customized the whole API for the app, one can even switch off the standard database API, which further increases security and cleanliness. With this final step one has arrived at a software architecture that implements data-centric microservices in an application-specific way directly in the database server, which is good against bugs, good for performance (complex queries can be run close to the data), good for the simplicity of the application design and good for maintainability. Even the devops like this because the microservices can be deployed and updated independently.
https://www.arangodb.com/2015/03/agile-development-vs-schema-enforcement
如何像 OrientDB 中那样验证图(顶点和边)数据? 例如, 如果我的图表具有 vertices/edges 格式
{
"name": :any_name,
"age" : 13
}
如何将它与定义明确的架构(通过验证)相关联?
在OrientDB中,也有将数据存储在顶点和边中的特性,并且每个模式都有很好的定义。我如何在 arangoDB 中执行此操作?
“开箱即用”ArangoDB 不支持架构实施。显然,这在某些用例中可能是一个重大缺陷。
然而,ArangoDB 的 Max Neunhöffer 认为,通过一些工作,可以关闭标准数据库 API,留下一个基于 ArangoDB 的系统来执行模式:
Therefore, ArangoDB can then be turned into a strict schema-enforcing persistence engine, because its HTTP API can be extended by user code written in JavaScript that is executed in the database server with direct access to the data. One can gradually evolve the way the data store is used by client code and move it slowly over to special, user defined routes that enforce the by now stable database schema, in particular for the write operations. As a consequence, a lot of client code can be simplified, because suddenly one can rely on a strict schema that is enforced by the API, once all write operations are covered.
In the end, when one has customized the whole API for the app, one can even switch off the standard database API, which further increases security and cleanliness. With this final step one has arrived at a software architecture that implements data-centric microservices in an application-specific way directly in the database server, which is good against bugs, good for performance (complex queries can be run close to the data), good for the simplicity of the application design and good for maintainability. Even the devops like this because the microservices can be deployed and updated independently.
https://www.arangodb.com/2015/03/agile-development-vs-schema-enforcement