Databases Flashcards

(17 cards)

1
Q

Whats an Entity

A

An entity is a real-world object or concept about which information is stored in a relational database.

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

What is a relational database?

A

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

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

Example of entity and attribute model

A

Entity: Doctor and Patient
Attributes: DoctorID,Firstname,Patient ID

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

How does a relational database recognises the differences between entities

A

The tables have different names. Each table has a different primary key

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

Whats an attribute?

A

A Characteristic of an Entity

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

Whats a flatfile

A

Database that consists of a single file

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

What’s a primary Key

A

A unique identifier for each record in a table

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

What’s a foreign Key

A

An attribute which links two tables together. It exists as a primary key in one table and a foreign key in another

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

What’s a secondary Key

A

A key which is slightly unique and can make searching faster

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

What’s a one to one model

A

Each entity can be linked to one entity
Such as husband to Wife

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

What’s a one to many model

A

One table can be associated to many other tables
Like a teacher and students

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

Many To Many model

A

One entity can be associated with many other entities and the other way round

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

How would you draw/model it

A

Single link is just a straight line
Many link is a line with a branch

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

What’s normalisation

A

Process of coming up with the best layout

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

Attributes of normalisation

A

No Redundancy
Consistent Data throughout linked datas
Records can be added and removed without issues
Complex Queries can be carried out

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

What is required for it to be a first normal form?

A

There must be no attribute that contains more than a single value