5a Relational Database Terminology *** Flashcards
Define the following terms used in relational database terminology.
Primary Key
Foreign Key
Primary Key:
Unique identifier (1) for a record (1)
Foreign Key:
Used to link tables (1) allowing relationships (1)
Field in one table (1) linked to a primary key in another table (1)
The database contains tables, records and fields.
i) Describe how these database elements are related to each other. (3
Tables contain columns each column contains field headings and fields (1)
Each record contains individual items of data (1)
Each item of data is [contained within] a field (1)
Describe, using examples, the role of referential integrity and attributes in databases. (i) Referential Integrity (2)
(ii) attributes (2)
Referential Integrity
For every foreign key must be a related primary key value (1) for a customer ID in hire table, must be the same customer in customer table
Attributes
Field name/identifies field (1) date of hire/customer ID (1).
A mail order company stores details on customers, products, suppliers and orders in its database.
(a) Explain the role of the primary key in the products table. (3)
To uniquely identify each record (1) allow relationships (1) 3 between product and orders table (1)
Describe the following terms used in relational databases.
Foreign key (2)
Table (2)
Foreign key: primary key in one table (1) that has the same data
type/links to a field in another table (1) allows tables to be linked (1)
relvant example (1)
Table: collection of records/data elements (1) organized by rows and columns (1). Contains fields/records with data (1)
Describe the role of the one to many relationship in a relational database. (2)
Allows one record in one table to be linked to many records in another
table/link tables (1) reduces data duplication (1)
Allows queries to be created that cross tables (1) using data from different