postgresql RDBMS 和 ORDBMS 的区别

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/39060110/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-21 02:22:23  来源:igfitidea点击:

Difference between RDBMS and ORDBMS

sql-serverentity-frameworkpostgresqlrdbmsordbms

提问by RBT

It happened to me when I was reading about PostgreSQL on its wikipage where it refers to itself as an ORDBMS. I always knew about Microsoft SQL Server which is an RDBM system. Can someone help me understand the main differences between Relational Database Management System(RDBMS) and Object Relational Database Management System (ORDBMS) and in what scenarios should I use one of them?

当我在其wiki页面上阅读 PostgreSQL 时,它发生在我身上,它称自己为 ORDBMS。我一直都知道 Microsoft SQL Server,它是一个 RDBM 系统。有人可以帮助我了解关系数据库管理系统 (RDBMS) 和对象关系数据库管理系统 (ORDBMS) 之间的主要区别,我应该在哪些场景下使用其中之一?

Also, my key question is related to the fact that in the world of Microsoft SQL Server we often use a layer of Entity Framework (EF) to do the object relational mapping on the application side. So, in ORDBMS world are all the responsibilities of an ORM already fulfilled by the database itself in entirety or there could be use cases or scenarios where I would end up using an ORM like Entity Framework on top of ORDBMS as well? Do people really even use ORMs on top of an ORDBMS system?

此外,我的关键问题与这样一个事实有关,即在 Microsoft SQL Server 的世界中,我们经常使用一层实体框架 (EF) 在应用程序端进行对象关系映射。那么,在 ORDBMS 世界中,ORM 的所有职责是否已经由数据库本身完全履行,或者可能存在我最终在 ORDBMS 之上使用像实体框架这样的 ORM 的用例或场景?人们真的甚至在 ORDBMS 系统之上使用 ORM 吗?

采纳答案by Ajay

Most database players don't support it, or don't support it exclusively. It is complex, and not used broadly. Even if "data" is OO in nature, the databases existed decades ago, and they cannot take ORDBMS (or OODBMS). Learning curve also imposes problems.

大多数数据库播放器不支持它,或者不完全支持它。它很复杂,并且没有广泛使用。即使“数据”本质上是面向对象的,但数据库在几十年前就存在了,它们不能采用 ORDBMS(或 OODBMS)。学习曲线也会带来问题。

ORDBMS/OODBMS are like virtual registry view you see in Registry Editor. Contents are tree-styled objects. But internally they might be stored as flat/hierarchical or in relational manner. You really don't care - the APIs provide you the viewof registry information.

ORDBMS/OODBMS 就像您在注册表编辑器中看到的虚拟注册表视图。内容是树样式的对象。但在内部,它们可能以平面/分层或关系方式存储。您真的不在乎 - API 为您提供了注册表信息的视图

Similarly, even if major players don't support (and won't support) OO nature of database, they may provide some extensions. Or, you may have to craft your own framework for OO data. A movie database, having actors and directors can be represented using relations (tables). Actors, directors, shooting-locations would also be classes/objects, and can easily be represented using tables, and referential integrity imposed by database/DB designer.

同样,即使主要参与者不支持(也不会支持)数据库的 OO 性质,他们可能会提供一些扩展。或者,您可能必须为 OO 数据制定自己的框架。可以使用关系(表)表示具有演员和导演的电影数据库。演员、导演、拍摄地点也将是类/对象,并且可以很容易地使用表和数据库/数据库设计者强加的参照完整性来表示。

You, as a developer would make this relational nature of data to an object-oriented form having Movieas a class, referencingactors/directors (1:1 or 1:N). I am not aware how/what EEfacilitates this, but it would be doing mapping this way only.

作为开发人员,您会将数据的这种关系性质转化为具有Movie作为类的面向对象的形式,引用演员/导演(1:1 或 1:N)。我不知道如何/是什么EE促进了这一点,但它只会以这种方式进行映射。

Object-Relational Databases

对象关系数据库

  • Object oriented technology on top of relational technology and in the relational context.
  • Objects are stored in tables of objects rather than in tables of rows.
  • Support of major object oriented features: complex types, inheritance, aggregation, methods
  • Advantage: Extension of a well-known technology
  • Disadvantages: Mixture of both technologies may result in difficult to understand schemas
  • Has Performance problems
  • Object-relational systems include features such as complex object extensibility, encapsulation, inheritance, and better interfaces to OO languages.
  • ORDBMSs allow developers to embed new classes of data objects into the relational data model abstraction (and on top of SQL).
  • 关系技术之上和关系上下文中的面向对象技术。
  • 对象存储在对象表中,而不是在行表中。
  • 支持主要的面向对象特性:复杂类型、继承、聚合、方法
  • 优势: 对知名技术的延伸
  • 缺点:两种技术的混合可能导致难以理解的模式
  • 有性能问题
  • 对象关系系统包括诸如复杂对象可扩展性、封装、继承和更好的面向对象语言的接口等特性。
  • ORDBMS 允许开发人员将新的数据对象类嵌入到关系数据模型抽象中(并在 SQL 之上)。

Following diagram shows how data can be accessed.

下图显示了如何访问数据。

enter image description here

在此处输入图片说明

回答by Ranjana Ghimire

Taken from http://www.aspfree.com/c/a/database/introduction-to-rdbms-oodbms-and-ordbms/:

取自http://www.aspfree.com/c/a/database/introduction-to-rdbms-oodbms-and-ordbms/

RDBMS

The main elements of RDBMS are based on Ted Codd's 13 rules for a relational system, the concept of relational integrity, and normalization. The three fundamentals of a relational database are that all information must be held in the form of a table, where all data are described using data values. The second fundamental is that each value found in the table columns does not repeat. The final fundamental is the use of Standard Query Language (SQL).

Benefits of RDBMS are that the system is simple, flexible, and productive. Because the tables are simple, data is easier to understand and communicate with others. RDBMS are flexible because users do not have to use predefined keys to input information. Also, RDBMS are more productive because SQL is easier to learn. This allows users to spend more time inputting instead of learning. More importantly, RDBMS's biggest advantage is the ease with which users can create and access data and extend it if needed. After the original database is created, new data categories can be added without the existing application being changed.

There are limitations to the relational database management system. First, relational databases do not have enough storage area to handle data such as images, digital and audio/video. The system was originally created to handle the integration of media, traditional fielded data, and templates. Another limitation of the relational database is its inadequacy to operate with languages outside of SQL. After its original development, languages such as C++ and JavaScript were formed. However, relational databases do not work efficiently with these languages. A third limitation is the requirement that information must be in tables where relationships between entities are defined by values.

ORDMS

Object-Relational database (ORDBMS) is the third type of database common today. ORDBMS are systems that “attempt to extend relational database systems with the functionality necessary to support a broader class of applications and, in many ways, provide a bridge between the relational and object-oriented paradigms.”

ORDBMS was created to handle new types of data such as audio, video, and image files that relational databases were not equipped to handle. In addition, its development was the result of increased usage of object-oriented programming languages, and a large mismatch between these and the DBMS software.

One advantage of ORDBMS is that it allows organizations to continue using their existing systems, without having to make major changes. A second advantage is that it allows users and programmers to start using object-oriented systems in parallel.

There are challenges in implementing an ORDBMS. The first is storage and access methods. The second is query processing, and the third is query optimization.

关系型数据库管理系统

RDBMS 的主要元素基于 Ted Codd 的 13 条关系系统规则、关系完整性概念和规范化。关系数据库的三个基本原则是所有信息都必须以表格的形式保存,其中所有数据都使用数据值来描述。第二个基本原则是在表列中找到的每个值都不会重复。最后一个基础是标准查询语言 (SQL) 的使用。

RDBMS 的好处是系统简单、灵活且高效。因为表格很简单,数据更容易理解和与他人交流。RDBMS 很灵活,因为用户不必使用预定义的键来输入信息。此外,RDBMS 的效率更高,因为 SQL 更容易学习。这允许用户花更多的时间输入而不是学习。更重要的是,RDBMS 的最大优势是用户可以轻松创建和访问数据,并在需要时对其进行扩展。创建原始数据库后,可以在不更改现有应用程序的情况下添加新的数据类别。

关系数据库管理系统存在局限性。首先,关系数据库没有足够的存储空间来处理图像、数字和音频/视频等数据。该系统最初是为处理媒体、传统现场数据和模板的集成而创建的。关系数据库的另一个限制是它无法使用 SQL 之外的语言进行操作。经过最初的发展,形成了C++、JavaScript等语言。但是,关系数据库不能有效地使用这些语言。第三个限制是要求信息必须位于表中,其中实体之间的关系由值定义。

订单管理系统

对象关系数据库 (ORDBMS) 是当今常见的第三种数据库类型。ORDBMS 是“尝试使用支持更广泛的应用程序类别所需的功能来扩展关系数据库系统的系统,并在许多方面提供关系范式和面向对象范式之间的桥梁。”

ORDBMS 的创建是为了处理关系数据库无法处理的新型数据,例如音频、视频和图像文件。此外,它的发展是越来越多地使用面向对象的编程语言以及这些语言与 DBMS 软件之间的巨大不匹配的结果。

ORDBMS 的优势之一是它允许组织继续使用其现有系统,而无需进行重大更改。第二个优点是它允许用户和程序员开始并行使用面向对象的系统。

实施 ORDBMS 存在挑战。首先是存储和访问方法。二是查询处理,三是查询优化。