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

📅  最后修改于: 2021-09-09 10:48:34             🧑  作者: 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 not 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.