基于图的数据库和面向对象的数据库有什么区别? [英] What is the difference between graph-based databases and object-oriented databases?

查看:479
本文介绍了基于图的数据库和面向对象的数据库有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

基于图表的数据库( http://neo4j.org/ )与面向对象的数据库数据库( http://www.db4o.com/ )?

What is the difference between graph-based databases (http://neo4j.org/) and object-oriented databases (http://www.db4o.com/)?

推荐答案

我会回答这个不同:对象和图形数据库操作在两个不同的抽象层次。

I'd answer this differently: object and graph databases operate on two different levels of abstraction.

对象数据库的主要数据元素是对象,我们从一种面向对象的编程语言中知道它们的方式。

An object database's main data elements are objects, the way we know them from an object-oriented programming language.

图形数据库的主要数据元素是节点和边。

A graph database's main data elements are nodes and edges.

对象数据库没有在具有自动参照完整性的两个事物之间的(双向)边缘。图形数据库不具有可以为NULL的指针的概念。 (当然可以想象杂交。)

An object database does not have the notion of a (bidirectional) edge between two things with automatic referential integrity etc. A graph database does not have the notion of a pointer that can be NULL. (Of course one can imagine hybrids.)

在模式方面,对象数据库的模式是在应用程序中的任何类的集合。图表数据库的模式(无论是隐式的,按照字符串标签的含义是隐含的,还是显式的,通过声明作为模型,我们在 InfoGrid )与应用程序无关。这使得它更简单,例如,使用图形数据库而不是对象数据库针对相同的数据写入多个应用程序,因为模式是与应用程序无关的。另一方面,使用图形数据库,你不能简单地取任意对象并持久化。

In terms of schema, an object database's schema is whatever the set of classes is in the application. A graph database's schema (whether implicit, by convention of what String labels mean, or explicit, by declaration as models as we do it in InfoGrid for example) is independent of the application. This makes it much simpler, for example, to write multiple applications against the same data using a graph database instead of an object database, because the schema is application-independent. On the other hand, using a graph database you can't simply take an arbitrary object and persist it.

不同的工作,我想的不同的工具。

Different tools for different jobs I would think.

这篇关于基于图的数据库和面向对象的数据库有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆