问题描述
如何像OrientDB中那样验证图形(顶点和边)数据?例如,如果我的图形的顶点/边的格式为
How to validate graph (vertices and edges) data like what happens in OrientDB?For example,If my graph has vertices/edges of format
{
"name": :any_name,
"age" : 13
}
如何将其与定义明确的架构(带有验证)关联?
How can I associate it with a well defined schema (with validations)?
在OrientDB中,还具有将数据存储在顶点和边中的功能,并且每个模式都定义良好.我如何在arangoDB中做到这一点?
In OrientDB, there is feature of storing data in vertices and edges also and each of the schemas are well defined. How can I do this in arangoDB?
推荐答案
开箱即用"的ArangoDB不支持架构实施.显然,在某些用例中,这可能是一个重大缺陷.
"Out-of-the-box" ArangoDB does not support schema enforcement. Clearly that is potentially a signficant drawback in some use-cases.
但是,ArangoDB的MaxNeunhöffer认为,只需做一些工作,就可以关闭标准数据库API,剩下一个基于ArangoDB的系统,该系统可以执行模式:
However, Max Neunhöffer of ArangoDB argues that with a bit of work, one can switch off the standard database API, leaving an ArangoDB-based system that does enforce schemas:
最后,当一个人为应用程序定制了整个API时,甚至可以关闭标准数据库API,从而进一步提高了安全性和整洁度.通过这一最后一步,我们得出了一种软件体系结构,该体系结构以特定于应用程序的方式直接在数据库服务器中实现了以数据为中心的微服务,这可以有效地防止错误,提高性能(复杂查询可以在数据附近运行),有利于简化应用程序设计,有利于可维护性.即使是开发人员也喜欢这样,因为微服务可以独立部署和更新.
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
这篇关于顶点和边的模型架构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!