Databases Flashcards

1
Q

Define entity, attribute and relationship

A

Entity = Object, person, event or thing of interest which data is to be recorded

Attribute = A property of an entity

Relationship = Link between two entities

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

3 types of relationships

A

One-to-one
One-to-many
Many-to-many

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

Define flat-file databases

A

Databases that use one entity

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

Disadvantages of flat-file databases

A

Data inconsistency
Data redundancy
Inefficiency
Difficult to maintain

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

Define relational databases

A

Databases with two or more linked tables

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

Define key terms for relational databases:
Primary key
Foreign key
Referential integrity
Composite key

A

Primary key - Attribute that uniquely represents a record
Foreign key - Attribute in one table that is primary key in another
Referential integrity - Value that appears in a foreign key in one table,
must be a primary key in another
Composite key - Combination of two or more attributes together
(instead of a singular primary key)

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

Define normalisation

A

Process of decomposing a flat-file into best relational database to minimise data redundancy

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

Summary of normalisation process

A
  1. Separate repeating groups into separate entities. Copy primary key as a foreign key
  2. All non-key attributes checked to see if only dependent on primary key (if not, create new entity)
  3. Tables with composite keys, ensure non-key attributes dependent on each part of the composite key (if not, create new entity)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly