1. 数据安全:
数据安全是指防止未经授权的用户获取数据。仅允许授权用户访问数据。在数据库中,DBA 或部门负责人可以访问所有数据。一些用户只被允许检索数据,而其他用户被允许检索和修改数据。
2. 数据完整性:
数据完整性被定义为数据库中包含的数据既正确又一致。为此,存储在数据库中的数据必须满足某些类型的程序(规则)。数据库中的数据必须正确且一致。因此,存储在数据库中的数据必须满足某些类型的过程(规则)。 DBMS 提供了不同的方式来实现这种类型的约束(规则)。这提高了数据库中的数据完整性。
数据安全和数据完整性的区别:
S.No. | Data Security | Data Integrity |
---|---|---|
1. | Data security refers to the prevention of data corruption through the use of controlled access mechanisms. | Data integrity refers to the quality of data, which assures the data is complete and has a whole structure. |
2. | Its motive is the protection of data. | Its motive is the validity of data. |
3. | Its work is to only the people who should have access to the data are the only ones who can access the data. | Its work is to check the data is correct and not corrupt. |
4. | It refers to making sure that data is accessed by its intended users, thus ensuring the privacy and protection of data. | It refers to the structure of the data and how it matches the schema of the database. |
5. | Some of the popular means of data security are authentication/authorization, masking, and encryptions. | Some of the means to preserve integrity are backing up, error detection, designing a suitable user interface and correcting data. |
6. | It relates to the physical form of data against accidental or intentional loss or misuse and destruction. | It relates to the logical protection (correct, complete and consistence) of data. |
7. | It avoids unauthorized access of data. | It avoids human error when data is entered. |
8. | It can be implemented through :
|
It can be implemented by following rule :
|