(a) Relational database concepts Flashcards
What is a flat file database?
A database that only has 1 table
What is a relational database?
A database with multiple related tables connected through keys
What is a primary key?
A unique identifier for a record in a table.
What is a foreign key?
A field in one table that links to the primary key in another table which creates a relationship
What is a composite key?
A **type of primary key **which uses two or more fields from a table to create a unique value.
What is a secondary key?
An attribute used to search the database but not always unique.
What is an entity in databases?
People or things
What is entity-relationship modelling (ERM)?
A diagram for showing entities and the relationships between them
What is a 1:1 relationship in ER modelling?
One entity instance relates to one in another (e.g., Person → Passport).
What is a 1:M relationship in ER modelling?
One entity relates to many others (e.g., Customer → Orders).
What is a M:N relationship in ER modelling?
Many-to-many; must be broken into two 1:M with a linking table.
What is indexing in a database?
A technique for speeding up data retrieval, often using B-trees or hash tables.