Batch delete
Users can delete records from the database either individually or in batches. When an entity record is deleted, all links to that entity are also deleted - the link end entities are not deleted.
Deleting records is a permanent and irreversible operation unless soft delete is enabled for your database. When soft delete is enabled, deleted records, whether deleted individually or in batches, are removed from the user's view of the database but you have an opportunity to undo the deletion.
You can use Batch Delete with or without soft delete.
Soft delete
Soft deleted records do not appear in search results or in record lists (when listing and browsing records), but are not removed from the database.
- Can be restored using Restore Deleted Records in iBase.
- Can be permanently removed using Purge Deleted Records in iBase.
- In iBase Designer, select .
- On the Advanced page, view the Soft Deletesetting.
Batch Delete
- In iBase, select .
- Whether Data Access Control is used and is restricting access to the records selected for deletion.
- The format of the database (Microsoft™ Access or SQL Server)
- The audit level if the database is in SQL Server format
Batch Delete and Data Access Control
The actual records that are deleted depend on whether Data Access Control restricts access to the records selected for deletion.
Consider this example: there are a 1000 telephone entities in the database with many telephone call links between them. A user has permission to view all 1000 telephone records but has restricted access to the telephone call links. In fact, of the 1000 telephone entities, only 200 of them have unrestricted telephone call links. This means that although the user has full access to all the telephone entities, they can only delete the 200 telephone entities with unrestricted telephone call links.
Entity 1 access restriction |
Link access restriction |
Entity 2 access restriction |
Delete entity 1 and/or link? |
---|---|---|---|
None | None | None | Yes |
None | None | Read-only table | Yes |
None | None | Hidden table | No |
None | None | Record is restricted (using an SC code) | Yes |
None | Any restriction | Any restriction | No |
Any restriction | Any restriction | Any restriction | No |
If Batch Delete encounters a record with restricted access, iBase skips that record. It does not report that it encountered a record that it could not delete. At the end of the operation, it reports on the number of records that it successfully deleted.
Batch Delete in Access databases
After batch deletion starts in an Access database, you can press the Esc key to stop the deletion but you cannot cancel the deletion of records already deleted. A message is then displayed that tells you how many records have been deleted.
Batch Delete in SQL Server databases
- Audit level 1, 2 or 3
- After batch deletion starts, you can press the Esc key to cancel the deletion and, provided that Esc is pressed before the deletion finishes, no records are deleted.
- Audit level 4 or 5
- After batch deletion starts, you can press the Esc key to stop the deletion— you cannot cancel the deletion of records that have already been removed. A message is then displayed that tells you how many records have been deleted. An entry is made in the audit log for each deleted record.