1.3.2 Databases Flashcards
Whats a database?
An organised collection of related data
What’s a flat file database?
A database in 0NF, where all data is stored in a single table, about a single entity. It’s useful for static (non-changing) data
What’s an entity
A category about which data needs to be recorded e.g. a person, or thing. (A table in the conceptional phase)
What’s a table
A Two-dimensional representation of data that is stored in rows and columns
What’s a field
A single piece of data about an entity
What’s a record?
A group of fields about a specific entity (AKA a row)
What’s a relational database?
Where data is held in multiple tables that are linked via relationships.
What’s a primary key?
A field used to uniquely identify each record in the table
What’s a feature of a primary key field?
It’s automatically indexed
What’s a composite primary key
When multiple fields are used to uniquely identify each record in the table
What are the three types of relationships between entities?
One-to-one,
One-to-many,
Many-to-many
What’s a foreign key?
A field that creates a relationship between two tables, appearing as the primary key in another table.
What are the benefits of foreign keys?
They maintain the relationship between tables
Why do we use junction tables?
To eliminate many-to-many relationships
What are junction tables?
A junction table contains the primary key columns of the two or more tables you want to relate.
What is data integrity
Maintaining and ensuring the reliability of data
What needs to be considered when reinforcing data integrity in a database
Accuracy, completeness, consistency over lifecycle
What is Entity integrity
Stipulating that every table must have a primary key
What is domain integrity
Ensuring every attribute in a relational database is associated with a domain
What’s a domain
The set of allowed values that an attribute can contain, e.g. numerical
What is referential integrity
It’s a data quality concept that prevents data redundancy and inaccuracies
It a rule that foreign keys in one table can only refer to primary keys in
another table.
What’s data validation?
The process of ensuring the accuracy and quality of data.
What’s data verification?
The process of checking data for inconsistencies after it has been moved
What are the two types of data verification?
Visual check and Double entry