Section 9.4
9 Databases
9.4 Security And Integrity Issues
9.4.1 Multi-Access Databases
If the database is installed on a shared network drive then more than one person
can work with the data.
9.4.2 Database Integrity
The aim is to ensure that no data is accidentally lost or corrupted.
- Locking
- Operation in exclusive mode.
- Lock other users from tables been modified.
- Lock out the record been edited.
- No locks. Users are informed of conflicts.
- Ordinary users can only open tables in read-only mode.
- Refreshing
- Resolving a deadly embrace
Deadly Embrace
If two users attempt to update two records at the same time then the
following can happen:
User 1
|
User 2
|
Accesses and locks record 1
|
Accesses and locks record 2
|
Attempts to access record 2
|
Attempts to access record 1
|
waits...
|
waits...
|
and waits...
|
and waits...
|
and waits...
|
and waits...
|
The DBMS must resolve this conflict.
When database queires are made it is important to give users a fast response
time. Furthermore if users are locked out of records they will become frustrated
and disgruntled.
Improving Database Performance
- Use the least restrictive locking viable.
- Educate the users to: schedule disk intensive operations and update
records promptly.
- Index attributes that are frequently used in searches and queries.
- Install the database software onto local machines.
- Re-schedule other network jobs.
- Upgrade the hardware.
Database security can be promoted by:
- Regular backups
- Transaction logging
- Checkpoints
- All updates are stored in transaction log.
- When the database is permantly updated a checkpoint
is placed in the transaction log and the old version
of the database is kept as a backup.
- If failure occurs then all the updates up to the last
check point can be applied to the old database.
- Passwords
- The DBMS can assign priviledges to users or groups of users.
- Encrypting the data.