5a Relational Database Terminology *** Flashcards

0
Q

Define the following terms used in relational database terminology.
Primary Key
Foreign Key

A

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)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
1
Q

The database contains tables, records and fields.

i) Describe how these database elements are related to each other. (3

A

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)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Describe, using examples, the role of referential integrity and attributes in databases. (i) Referential Integrity (2)
(ii) attributes (2)

A

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).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

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)

A

To uniquely identify each record (1) allow relationships (1) 3 between product and orders table (1)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Describe the following terms used in relational databases.
Foreign key (2)
Table (2)

A

 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)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Describe the role of the one to many relationship in a relational database. (2)

A

 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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly