Professional Documents
Culture Documents
Relational Database Overview
Relational Database Overview
Normalisation
o Structuring your database in a way that there is no redundant
information or anomaly
o It is a set of rules that ensure that databases are designed in
an optimal state
o No normalisation has taken place when no entities attribute or
relationships have been identified
Data Maintenance
o Adding, deleting and updating data to keep it current
o Much easier when a database is well-designed
Data integrity
o Maintaining the accuracy and consistency of data in a
database
o Split into Physical and Logical integrity
Physical integrity
o Overcoming practical issues such as natural disasters,
mechanical and power failure
o Physical storage and retrieval of data
o UPS and RAID
Logical integrity
o How correct data is in its context
o Enforced by ensuring unique primary keys (entity integrity)
and foreign keys (referential integrity)
A record can’t be deleted from the one side of a
one:many relationships without the other being entered
A record can’t be added on the many side of a one:many
relationship without the other being entered
Transaction
o An activity that involves creating, loading, editing saving or
deleting data managed by a DBMS
Transactional processing system
o Software system that captures and processes data
o Transactions that depend on each other are grouped
In terms of transactional processing DBMS
o The operation will only be completed if all of the individual
transactions are successful
o If errors occur in any one of the transactions, the transaction
processing DBMS will ‘reverse’ or ‘roll back’ all transactions of
the group, including the ones that were successful. i.e. It is
set to its previous state
o Partial completions of actions are prevented if any hardware
or software errors occur
o E.g. on Transferring Money from your savings account to your
credit account
o Data integrity is maintained
Transactional processing terms
o Record Lock – When a record is in use by a user, no other user
may access the record until changes are made or discarded
o Edit – When a record is locked and its data is loaded into
memory for editing. Changes ae only made when the edit is
posted
o Delete – When a record is removed from the database. It is
flagged as ‘deleted’
o Insert – When a new record is made in memory and saved
either manually or when a user moves to the next record.
Records flagged as ‘deleted’ are overwritten
o Commit/Post – When changes to a record are saved to storage
after being edited or inserted
o Refresh – When information is reloaded from storage to
memory. Usually done when viewing changes made by another
user to see the updated data
o Purge /Consolidate – Remove deleted records to compact the
file
o Navigation (Previous/Next) – Moving to another record after
an editor insert will Post the record
o Rollback – When the DBMS reverses a transaction, restoring
the data to its previous state
Data redundancy
Two concepts
o Unnecessary repetition of data across multiple fields, that
can cause update anomalies
o Mirroring the database across multiple storage media to
ensure data will always be available even if one storage
medium fails
Data independence
The separation between software that uses database applications
and data structures by DBMS servers
o Not possible with Access style databases
Advantages
o The user application will not change the structure of the
database
o Multiple applications can interface to the same data. Physical
structure is not a factor
o Database management is left to the DBMS software
Physical independence – It doesn’t matter what storage medium the
database is on. The application does not need different code for
the different media
Logical independence – When adding a table to the database or
making extra fields in an existing table will not affect the existing
applications
Data security