This module covered techniques for controlling transactions within PL/SQL block.
You added transaction controls to a package and llearned about locking modes and levels. You studied a special variation on the cursor declaration that allows you to lock rows immediately to prevent others from using them before your procedure can.
Data integrity can be compromised in PL/SQL in a number of ways. Some examples include:
- SQL injection: This occurs when malicious code is inserted into a SQL statement, allowing an attacker to access or modify data in the database.
- Unauthorized access: If a user is able to gain access to the database without proper authentication, they may be able to view or modify data.
- Concurrency issues: If multiple users are able to access and modify the same data simultaneously, it can lead to data inconsistencies and integrity issues.
- Incorrect data validation: If the data validation is not implemented properly, it can lead to data integrity issues.
- Data corruption: Data can be corrupted due to hardware failure, software bugs, or other issues, leading to integrity issues.
- Lack of proper backup and recovery procedures can also lead to data integrity issues in case of a disaster.
It's important to implement security and validation measures, such as using prepared statements and parameterized queries, to prevent these types of issues and maintain data integrity in PL/SQL.