1.3.2 Databases Flashcards
(152 cards)
What is a database?
An organized collection of data that allows easy adding, modification, deletion, and searching of data.
What benefits do electronic databases offer compared to paper-based ones?
Electronic databases are easier and quicker to update, easier to back up and copy, and can be accessed by multiple people simultaneously from different locations.
How is data stored in a database?
Data is stored in tables (also called entities or files), which contain records (rows or tuples) and fields (columns or attributes).
What terms does the exam board use for table
record
What is a flat file database?
A flat file database contains only a single table and is simple to set up, requiring little expertise; often saved as a CSV file.
What are typical uses for flat file databases?
Storing small amounts of data like contact details, small product databases, or personal collections.
What are the drawbacks of flat file databases?
They contain a lot of repetitive data, take up unnecessary space, become slow to query, and difficult to maintain as data grows.
What is a relational database?
A database that splits information into multiple related tables to reduce redundancy and improve efficiency.
How do humans instinctively link data across tables in a relational database?
By visually matching related data, for example matching a tutor group ID in one table to student records in another.
What is a relationship in database terms?
A link between tables that allows them to be connected logically.
What is a one-to-many relationship?
One record in a table relates to many records in another table, e.g., one tutor group has many students.
What field is required for a relationship between two tables?
A common field (column) that appears in both tables to link them.
What is a primary key?
A field in a table that uniquely identifies each record.
What is a foreign key?
A field in one table that refers to the primary key in another table, used to establish relationships.
What are the three types of relationships in a relational database?
One-to-one, one-to-many, and many-to-many.
What is an entity relationship diagram (ERD)?
A visual representation of tables (entities) and their relationships using boxes and lines.
Give an example of a one-to-one relationship
One student has one student planner, or one student planner belongs to one student.
Give an example of a one-to-many relationship
One tutor group contains many students, or many students belong to one tutor group.
Give an example of a many-to-many relationship
One student can be taught by many teachers, and one teacher can teach many students.
Why is a many-to-many relationship considered poor database design?
Because it complicates data structure and should be resolved through normalization.
What is the purpose of indexing in a database?
To allow quick retrieval of records by maintaining an index of primary keys.
What is a secondary key?
A field that is indexed besides the primary key, often used for frequent search criteria, like a student’s surname.
Why might a secondary key be used instead of the primary key for searches?
Because users often remember fields like surnames rather than unique ID numbers.