1.3.2 Databases Flashcards
Database
A collection of data or information which is held together in an organised way
Flat file database
Consist of a single table which stores all the data within that database
Relational Database
A database that has a separate table for each entity.
Primary Key
A field in a table which is unique and allows you to identify every record
Foreign Key
Used to link tables together and create relationships
Compound/composite primary key
Combines more that one field to make a unique value
Secondary key
A key made on a field to be indexed for faster searches
Referential integrity
Making sure you cannot delete record that are used by other tables
Entity relationship modelling/diagram
A diagram that represents the relationships between entities in a database
Normalisation
A process used to come up with the best possible design for a relational database
Indexing
Creating a database index that improves the speed of data retrieval in a database
0NF
A table with no normalisation
1NF/ First Normal Form
A table containing no repeated attributes
2NF/ Second Normal Form
A table that’s is in first normal form and contains no partial dependencies
3NF / Third Normal Form
A table that is in 2NF and all non key elements are fully dependent on the primary key
Normal Forms
Ways for structuring data in a relational database according to formal rules
SQL / Structured Query Language
A declarative language used for querying and updating tables in a relational database
Database transaction
A set of operations that update one or more databases in some way
ACID
Atomicity
Consistency
Isolation
Durability
Atomic transaction
An atomic transaction is indivisible
Consistent transaction
Follows all of the established rules of the database
Isolated transaction
Cannot be interfered with while underway
Durable transaction
Is recorder is such a way that the result cannot be easily lost
Record locking
Preventing simultaneous access to record in a database
Redundancy
Having one or more copies of data in physically different locations