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
What is a record?
All the data stored about one person or object
What is a field?
One single piece of information
What is an entity?
Something that information will be recorded about
Examples include: Customer, airline passenger.
Objects such as a product, a flight
Something abstract such as a borrowing, booking.
What is an entity set?
A collection of entities of the same type and is represented as a table in a DB system.
What is a flat file database?
A database containing only one table
What is a relational database?
A database containing two or more tables
In order to create a many to many relationship, it is necessary to create what?
An intermediate table
A calculation within a database query will be
A predefined calculation
What makes entry of data into a database more efficient and more accurate?
Creating a form
What is a database query?
A method within a database for searching and/or sorting of a database within multiple tables
What is a flat file database?
A database containing only one table
What is a relational database?
A database containing two or more tables
In order to create a many to many relationship, it is necessary to create what?
An intermediate table
A calculation within a database query will be
A predefined calculation
What makes entry of data into a database more efficient and more accurate?
Creating a form
What is a database query?
A method within a database for searching and/or sorting of a database within multiple tables