📜  物理和逻辑数据独立性之间的区别

📅  最后修改于: 2021-08-24 16:28:38             🧑  作者: Mango

先决条件:物理和逻辑数据独立

1.物理数据独立性:
物理数据独立性基本上用于将概念级别与内部/物理级别分开。易于实现物理数据独立性。通过这种独立性,用户可以更改对概念架构有影响的物理存储结构或设备。

物理数据独立性下的更改示例:

  • 它是通过使用新的存储设备(如硬盘驱动器或磁带)来实现的
  • 修改数据库中的文件组织技术
  • 切换到不同的数据结构。
  • 更改访问方式。
  • 修改索引。
  • 更改压缩技术或哈希算法。
  • 要将数据库的位置从“ C驱动器”更改为“ D驱动器”

2.逻辑数据独立性:
逻辑数据独立用于更改概念方案,而无需更改以下内容:

  • 外观图
  • 外部API或程序

逻辑数据独立下的更改示例:

  • 在不重写现有应用程序的情况下,可以添加/修改/删除新的属性,实体或关系
  • 将两个记录合并为一个
  • 打破现有记录,即将记录分为两个或多个记录

物理和逻辑数据独立性之间的区别:

Physical Data Independence Logical Data Independence
It mainly concern about how the data is stored into the system. It mainly concerned about the structure or the changing data definition.
It is easy to retrieve. It is difficult to retrieve because the data is mainly dependent on the logical structure of data.
As compared to the logical independence it is easy to achieve physical data independence. As compared to the physical independence it is easy to achieve logical data independence.
Any change at the physical level, does not require to change at the application level. The change in the logical level requires a change at the application level.
The modifications made at the internal level may or may not be needed to improve the performance of the structure. The modifications made at the logical level is significant whenever the logical structure of the database is to be changed.
It is concerned with the internal schema. It is concerned with the conceptual schema.
Example: Change in compression techniques, Hashing algorithms and storage devices etc. Example: Add/Modify or Delete a new attribute.