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.

Note: You can deny users access to the Batch Delete menu command by using a System Commands Access Control group.

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.

For system administrators, soft deleted records:
  • Can be restored using Restore Deleted Records in iBase.
  • Can be permanently removed using Purge Deleted Records in iBase.
If soft delete is not enabled, then deleting records is a permanent and irreversible operation.
To check the setting of soft delete:
  1. In iBase Designer, select File > Database Properties.
  2. On the Advanced page, view the Soft Deletesetting.

Batch Delete

To delete batches of records:
  • In iBase, select Edit > Batch Delete.
The deletion can take a while to complete if you are deleting many records. The speed of the deletion depends on several factors:
  • 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
The following information describes these factors.

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.

This table summarizes how Batch Delete works when Data Access Control is used with access restrictions on the entities at each end of the link and on the link itself:

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
Note: Any restriction includes making a table or field read-only, hiding a table or field, or applying a Security Classification (SC) code to deny access to a record.

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

How Batch Delete works in an SQL Server database depends on the audit level of the database. Batch Delete runs fastest with the audit level set to 1, 2 or 3:
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.