Fundamentals of Databases Flashcards
Why is normalisation done?
- No redundant data
- data consistency
- Make databases more efficient
- Faster searching and sorting
- Fewer update/insertion/deletion anomalies
First normal form
No repeated groups of attributes / data is atomic
Second normal form
No partial key dependencies
Third normal form
No non-key dependencies
Define concurrent access
When different users attempt to access the same field at the same time
What is the result of concurrent access
Data can be lost if 2 users edit a record at the same time
Record Locks
- User accesses a record
- The record is immediately locked
- Other users are blocked from accessing it until it is unlocked
Serialisation
- Requests from the user are put into a queue
- Once the first request has been executed, the next is and so on
Time stamp ordering
- Each command has a timestamp
- Commands are carried out in the order of the timestamps
Commitment ordering
- An algorithm is used to work out an optimum order to execute commands
- It takes into account the impacts of them on other parts of the database and prioritises minimisation of issues
Database
A persistent, organised store of data (NOT MEMORY)
Explain the concept of a relational database.
A relational database stores data in multiple relations that are linked together using relationships. Relations have fields and records.
Entity
An object that can be distinguished from other objects. Can be a physical object or a concept. (In a database, this would be a table)
Field / Attribute
A characteristic or a feature of an entity. (columns)
Record
An instance of an entity. (rows)