Structures And Links (Databases) Flashcards
What is a primary key?
A field in a table used to uniquely identify each record
What is a compound key?
Two fields combined in order to uniquely identify each record as in some tables one field is not enough to uniquely identify each record
Why are both primary and foreign keys necessary in a relational database?
To allow a relationship to be created between the two tables
Give two advantages of linking tables
Data replication is avoided
Smaller, easier to manage tables can be created
A one to one relationship is useful in a database when…
Information not accessed regularly is to be stored. Two smaller tables can be created and therefore accessed faster.
Two items needed to create a one to many relationship?
Primary and foreign key
Explain the difference between a flat file and original database
A flat file database only has one table. A relational database contains more than one table which are linked via primary and foreign keys.
The advantages of using relational databases are
Data is only stored once
Complex queries carried out
Better security
Cater for future requirements
What is the purpose of a foreign key?
Allows a field to be linked to a unique key in another table
State the differences between one-to-one, one-to-many and many-to-many relationships
One-to-one; Each row is related to one row in the other table
One-to-many; Each row is related to many rows in the other table
Many-to-many; One or more rows are related to one or more rows in the other table
The purpose and uses of a table?
Subject based lists that contain data arranged in records
The purpose and uses of a form?
Used to create a user interface for a database
The purposes and uses of a report?
Used to present the information in the database for;
Displaying or distributing a summary of data
Providing a snapshot of data
Provide details about individual records
Create labels
What is meant by a relationship in a database?
When two relational databases are linked because one table has a foreign key which references a primary key of another table
What is a calculated field?
One which is created using a formula from one or more existing fields