我的编程空间,编程开发者的网络收藏夹
学习永远不晚

对象标识以及对象与文字

短信预约 -IT技能 免费直播动态提醒
省份

北京

  • 北京
  • 上海
  • 天津
  • 重庆
  • 河北
  • 山东
  • 辽宁
  • 黑龙江
  • 吉林
  • 甘肃
  • 青海
  • 河南
  • 江苏
  • 湖北
  • 湖南
  • 江西
  • 浙江
  • 广东
  • 云南
  • 福建
  • 海南
  • 山西
  • 四川
  • 陕西
  • 贵州
  • 安徽
  • 广西
  • 内蒙
  • 西藏
  • 新疆
  • 宁夏
  • 兵团
手机号立即预约

请填写图片验证码后获取短信验证码

看不清楚,换张图片

免费获取短信验证码

对象标识以及对象与文字

DBMS supports object-oriented data. It ensures direct correspondence between real-world objects and their representations in the database. This correspondence ensures that objects retain their integrity and identity. It enables easy identification and manipulation. Object Data Management System (ODMS) assigns unique identity to each independent object stored in the database.

这个独特的身份通过系统生成的对象标识符(OID)来实现。该OID作为系统分配给每个对象的独特值。它对外部用户不可见。然而,系统在内部利用它来确保每个对象的唯一标识,并建立和管理对象之间的引用。在需要时,系统将OID分配给适当类型的程序变量,以进行涉及对象的操作。

Immutability and Uniqueness

Primary requirement for an Object Identifier (OID) in an Object Data Management System (ODMS) is immutability. It is crucial that the OID value assigned to a specific object remains unchanged, ensuring the preservation of the object's identity in the real world. ODMS must incorporate mechanisms for generating OIDs and enforcing their immutability. It is desirable for each OID to be unique and used only once. Even if an object is removed from the database, its OID should not be reassigned to another object.

To fulfill these requirements, OID should not depend on any attribute values of the object. This is necessary because attribute values may change or be corrected over time. In the relational model, each relation requires primary key. If the value of the primary key is altered, tuple will consider new identity. In different relations, real-world object may have different names for its key attributes. It can create challenges in determining if the keys represent the same real-world object. For example, the object identifier may be represented as "Emp_id" in one relation and as "Ssn" in another relation.

使用对象标识符(OIDs)进行高效检索

Object Identifier (OID) on the physical address of the object in storage is deemed inappropriate in a Database Management System (DBMS). This is because the physical address can change following a physical reorganization of the database. However, some early Object Data Management Systems (ODMSs) have employed the physical address as the OID in order to enhance the efficiency of object retrieval.

为了适应物理地址发生变化的情况,可以利用涉及间接指针的机制。该指针放置在原始地址上,并提供对象的新物理位置。然而,在现代实践中,将长整数分配为OID更为常见。随后,使用哈希表或类似的数据结构将OID值映射到对象在存储中的当前物理地址。这种方法确保OID不受任何物理重组的影响,同时仍能实现高效的对象检索。

Early Approaches and Challenges with OIDs

In early Object-Oriented (OO) data models, there was a requirement that all entities, including simple values and complex objects, be represented as objects. Consequently, each basic value like an integer, string, or Boolean value was assigned an Object Identifier (OID). This approach allowed identical basic values to possess different OIDs, which could be advantageous in certain situations. For instance, the integer value 50 could represent the weight in kilograms in one context and the age of a person in another context. By creating two distinct basic objects with separate OIDs, both objects could represent the integer value 50. However, while this approach held theoretical value, it proved impractical as it resulted in the generation of a large number of OIDs.

为了解决这个限制,大多数面向对象数据库系统现在支持对象和字面量(或值)的表示。每个对象必须有一个不可变的OID分配给它,以确保其唯一标识。相比之下,字面量值没有OID,只是表示其自身的值。通常,字面量值存储在对象内部,不能被其他对象引用。此外,在许多系统中,如果需要,可以创建复杂的结构化字面量值而无需相应的OID。

免责声明:

① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。

② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341

对象标识以及对象与文字

下载Word文档到电脑,方便收藏和打印~

下载Word文档

猜你喜欢

对象标识以及对象与文字

DBMS supports object-oriented data. It ensures direct correspondence between real-world objects and their representation
2023-10-22

一文详解JavaScript数组对象和字符串对象

这篇文章主要介绍了JavaScript数组对象和字符串对象,文章中有详细的代码示例,对学习或工作有一定的帮助,需要的小伙伴可以参考一下
2023-05-17

面向对象以及三大特性

1.函数式编程和面向对象的对比    题目:开发一个消息提醒的功能(邮件/短信/微信)def email(em,text): """ 发送邮件 :return: """ print(em,text)def ms
2023-01-30

讲解Java中如何构造内部类对象以及访问对象

通过反射构造内部类对象 首先在 javalang 包下写一个包含内部类的类:package javalang;public class Outer {public static class Inner1{} }注意这个类是 public s
2022-05-28

JSP语法、指令、表达式以及对象的知识点整理

这篇文章主要讲解了“JSP语法、指令、表达式以及对象的知识点整理”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“JSP语法、指令、表达式以及对象的知识点整理”吧!JSP 语法。。。脚本程序脚本
2023-06-02

JavaScrip将数组转为对象与JSON对象字符串转数组方法详解

这篇文章主要介绍了JavaScrip将数组转为对象与JSON对象字符串转数组方法详解,需要的朋友可以参考下
2022-11-13

Python 类与对象简单理解及总结

类:  类,指一群具有相同属性和方法的对象的抽象。  类的更严格的定义是由某种特定的元数据所组成的内聚的包。它描述了一些对象的行为规则,而这些对象就被称为该类的实例。类有接口和结构。接口描述了如何通过方法与类及其实例互操作,而结构描述了一个
2023-01-31

编程热搜

目录