DataBases (Me) Flashcards
What is a flat file database?
A flat file database is a database with only one table
What is a relational database?
A relational database is a database with multiple relational tables that are connected through keys
What is a primary key?
A unique identifier for a record in a table
What is a secondary key?
An **attribute **used to search the database but not always unique
What is a foreign key?
A field in one table that links to the primary key in another table which forms a relationship
What is a composite key?
A specific type of primary key which uses two or more fields from a table to create a unique value
What is an entity?
People or things
What is an entity-relationship modelling (ERM)?
A diagram that shows entities and the relationships between them
What is indexing in a database?
It’s a technique for speeding up data retrieval
Give one advantage and one disadvantage of indexing in a database?
Advantage: searches can be performed quickly; Disadvantage: index takes up extra space in database
What is Normalisation?
It’s the process of dividing larger tables into smaller interlinked tables
What is transitive dependency?
Non-key attribute depends on another non-key attribute
What is referential integrity?
A** rule** to make sure the** foreign key matches a valid primary key** in another table
What happens if referential integrity isn’t maintained?
Orphan record can appear
What is an orphan record?
A record where foreign key value references a non-existent primary key value
How can referential integrity be enforced in SQL?
Declare foreign constraints
What is transaction processing?
Its ** executing a sequence of database operations** that are ** treated as a single logical unit**
What does ACID stand for?
Atomicity, Consistency, Isolation, Durability
What is Atomicity?
Ensuring all parts of the transaction are completed or none at all
What is Consistency?
Ensuring the database remains in a valid state before and after the transaction
What is Isolation?
Prevents interruptions from other ongoing transactions
What is Durability?
Ensures that after a transaction is committed it remains even in system failure
What is record locking?
A method to prevent simultaneous access to data
What is data redundancy?
It’s the duplication of data across the database