1.3.2 DATABASES Flashcards

1
Q

Define entity

A

an item of interest about which information is stored.

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

Relational database

A

A database which recognizes the differences between entities by creating different tables for each entity.

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

Flat file

A

A database that consists of a single file. Will most likely be based around a single entity and its attributes. Typically listed like:

ENTITY(Attribute1,Attribute2,…)

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

Primary key

A

A unique identifier for each record in the table.

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

Foreign key

A

The attribute which links two tables together. Will exist in one table as the primary key and act as the foreign key in another.

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

Secondary key

A

Allows a database to be searched quickly. It is an alterative way to find or sort data, not using the main primary key. Helps to locate records when the primary key isn’t known, sort data differently, or ensure uniqueness like email addresses.

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

ONE-TO-ONE ENTITY MODELLING

A

ONE-TO-ONE: each entity canbe liked to one other entity, such as the relationship between a husband and wife (NO POLYAMORY, NO CHEATING). The husband can ONLY BE ASSOCIATED WITH ONE WIFE (forget about arabs) and vice versa.

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

ONE-TO-MANY ENTITY MODELLING

A

One table can be assorted with many other tables, like an arabic man having multiple wives but each wife only has one husband. Multiple wife entities can be linked to the same arab husband.

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

MANY-TO-MANY ENTITY MODELLING

A

One entity can be associated with many other entities and the same applies the other way around. For example people living in a post-modern, socially liberal world who are all polyamorous. Everyone has many different partners.

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