Database Revision Flashcards

1
Q

A compound key is an example of a primary key.

Describe what is meant by a compound key in a relational database

A

A key comprising two or more attributes which are foreign/primary
keys from other tables

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

What is an entity occurence

A

A specific example of an entity is called an instance or entity occurrence. For example:

John Smith, Mary McLeod and Omar Shaheed are all entity occurrences found in the Studententity

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

What is an entity

A

An entity is a person, place, thing.

E.g. in a school, possible entities might be Student, Teacher, Class and Subject.

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

What is an attribute

A

An entity is described by its attributes. Each attribute is a characteristic of the entity.

For example, attributes of the Student entity would include:
studentID 
firstname 
surname 
dateOfBirth.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a primary key

A

A combination of attributes that uniquely identifies one, and only one, entity occurrence .

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

What is a foreign key

A

An attribute in one table that uniquely identifies a row of another table.

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