Databases Flashcards
What is a data dictionary?
It is a simple table that defines the basic organisation of a database - the structure of the database. It contains info for managing the database but not the actual data itself.
What does a data dictionary contain?
Table names, field names, data types and keys
What does a length check do?
This forces the data to be a specific number of characters long
What does a range check do?
This forces the data to lie within a certain range of values
What does a restricted choice do?
It forces the user to select from a list of suitable options
What does a presence check do?
Checks that important data is present.
What does a unique check do?
Ensures that the data entered in the field is different from any other.
What is a relational database?
It stores the info in more than one table. The tables are linked by relationships.
What is a primary key?
This is a field that uniquely identifies each record in a table. the primary key does not allow duplicates and the field should never be left blank.
What is a foreign key?
They enable related tables to be linked together to form a relationship. The primary key of one table will be the foreign key in another.
What is a compound key?
When one field is not enough to uniquely identify a record, a compound key combines more than one field to make a unique key.
State the three kinds of relationships between tables.
One-to-one, one-to-many, and many-to-many.
What does the GROUP BY operation allow you to do?
It allows you to group the data.
What does the COUNT operation allow you to do?
To count the number of records in the table.
What does the operation SUM allow you to do?
It allows you to add the values in a numeric field.