数据库模型中层次模型_层次数据库模型中的数据定义和完整性约束

数据库模型中层次模型

分层数据库模型 (Hierarchical database model)

In the database management system, a Hierarchical database model is a data model in which data are organized in a way of tree-like structure. The data in the database are stored in the form of records and are further connected through links to each other.

在数据库管理系统中, 分层数据库模型是一种数据模型,其中数据以树状结构的方式进行组织 。 数据库中的数据以记录的形式存储,并通过链接进一步相互连接。

Hierarchical database model


Image source: http://www.dbmsinternals.com/database-fundamentals/basic-architecture/hierarchical-data-model/

图片来源:http://www.dbmsinternals.com/database-fundamentals/basic-architecture/hierarchical-data-model/

Whenever we talk about Hierarchical schema, a number of built-in inherent constraints exist in Hierarchical database model. Following are the given constraints:

每当我们谈论分层模式时分层数据库模型中都会存在许多内置的固有约束。 以下是给定的约束:

  1. In the hierarchical data model, except the root records, no other record occurrences exist unless it is being related to a parent record occurrence. This has the following implications:

    分层数据模型中 ,除了根记录之外,不存在其他记录出现,除非它与父记录出现有关。 这具有以下含义:

    1. No child record can be inserted unless it is linked to a parent record.
    2. One can easily delete child record independently from the model but if the parent record is deleted, then the child record will get deleted automatically and descendent records.
    3. Above rules do not apply to the virtual child records and virtual parent records.
  2. The child record must be duplicated once under every parent record if a child record has two or more parent records from the same record type.

    如果子记录具有相同记录类型的两个或多个父记录,则子记录必须在每个父记录下重复一次。

  3. The above task can be performed by a child record having two or more parent records of different record types among which at most one parent record should be real and the other all parent records are virtual parents. Information Management System (a database and transaction management system) limits the number of virtual parents to one.

    可以通过具有两个或更多个不同记录类型的父记录的子记录来执行上述任务,其中最多一个父记录应该是真实的,而其他所有父记录是虚拟父记录。 信息管理系统(数据库和交易管理系统)将虚拟父母的数量限制为一个。

  4. A record type can be the virtual parent in only one VPCR type in IMS. That means the number of virtual children records can only be one in per record type in IMS.

    记录类型只能是IMS中一种VPCR类型中的虚拟父项。 这意味着虚拟子记录的数量只能是IMS中每种记录类型的一个。

翻译自: https://www.includehelp.com/dbms/data-definition-and-integrity-constraints-in-hierarchal-database-model.aspx

数据库模型中层次模型

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值