Chapter 17 - Relational databases and normalisation Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

Where are data held in a relationship data base?

A

» Tables - also called relations

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

What is a relational databse?

A

» Collection of tables in which relationships are modelled by shared attributes

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

What does a row represent?

A

» One record

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

What does a column represent?

A

» One attribute

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

How would you describe a table?

A

» Entity name - shown outside the brackets
» Attributes - listed inside the brackets
» Primary key is underlined

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

What is the purpose of the primary key?

A

» Unique identifer to identify a particular record in the table

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

What is the purpose of indexing a primary key?

A

» So that a record with a particular primary key can be quickly located in a database

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

What is the foreign key?

A

» Attribute which is a primary key of one of the tables - links tables together

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

What is normalisation?

A

» Technique for designing a relational database to minimise duplocation of information and eliminates redunant data

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

What are the 4 features of normalisation?

A

» No data is unncessarily duplicated
» Data is consistent
» Structure of each table is flexible enough to allow you to enter as much as you want
» Structure should enable a user to make all kind of compelx queuries

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

How many normalisations are there?

A

» 4

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

What are the 3 features of the first normal form (1NF)?

A

» Each data tem cannot be broken down any further
» Each row record has a primary key
» There are no repeating data

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

What is the main thing to remember when some entities have a many-to-many relationship?

A

» You will always need a link table in the middle

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

What are the features of the second normal form? (2NF)

A

» If it is in the 1NF
» Contains no partial dependencies

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

What is a partial dependency?

A

» Mean that one or more of the attributes depends on only part of the primary, which can only occur if the primary key is a composite key

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

What are the features in the third normal form (3NF)?

A

» It is in the 2NF
» Contains no non-key depedencies

17
Q

What is a non-key depedency?

A

» Where one value of an attribute is determined by the value of another attribute which is not part of the key

18
Q

What is the main principle in 3NF?

A

» All attributes are dependent on the key, the whole key, and nothing but the key

19
Q

What is an entity?

A

» A category of object of something or interest

20
Q

What is the one of the main aims of normalising data?

A

» Remove the possibility of redundant data from any of the tables

21
Q

What is redundant data?

A

» Data that appears in more than one database table
» Which can cause inefficiencies and inconsistencies in data

22
Q

What is mantained in a normalised database?

A

» Data integrity

23
Q

How can normalisation lead do faster sorting and searching?

A

» Normalisation will produce smaller tables, with fewer fields
» Leads to greater efficiency, as there is less data involved

24
Q

What are the 3
benefits of normalisation?

A

» No unecessary duplication of data
» Data integrity is maintained
» Fewer fields - faster searches

25
Q

What is atomic?

A

» Data cannot be broken down any further