Topic 4: Database Flashcards
What is a database
A database is a collection of related or structured information held on a computer (e.g. doctor’s records, school roll etc.).
A flat file database is where all the information is stored in one table. These can be problematic as they:
Increase data redundancy - data is repeated unnecessarily.
Decrease data integrity - data is unreliable as the same data is stored several times increasing the likelihood of errors.
What is a Relational database
A relational database contains more than one table, and the tables are linked through common fields.
Relation database It is the more efficient database type as it reduces (Advantages of relational databases):
Data redundancy is reduced data that is repeated unnecessarily is reduced.
Data integrity is greater - data is more likely to be correct and reliable.
Queries and Reports - can be created using more than one table.
What is a table
A table consists of one or more records
What is a record
A record is a collection of data items, which may be of different data types, all relating to the individual or object that the record describes
What is a field
A field is part of a record designed to hold a single data item, of a specified type
What is a primary key field
A key field uniquely identifies a record
What is the foreign key
When the primary key from one table appears as a field in a second table, it is known as a foreign key of the second table.
What is a composite
A composite key is one that consists of two or more fields.
What is Data Validation
Validation is the automatic checking of data when it is entered into a computer system.
What is a data type
A data type is a formal description of the kind of data being stored or manipulated within a program or system
What is a relationship
The function of a relationship is to link tables.
Advantages of having links between tables:
⦁ Reduces data redundancy – data that is repeated unnecessarily.
⦁ Increases data integrity - data is more likely to be correct or is reliable as the same data is not stored/entered several times decreasing the likelihood of errors.
⦁ Reports/Queries can be created using data from more than one table.
⦁ Referential integrity is enabled – this ensures data is kept consistent in the tables. For example, when data is deleted from one table, the linked data in other table(s) is also deleted.
What is referential integrity
Referential integrity ensures that an entry cannot be made in one table with a foreign key, if the key field does not exist in the linked table.