YEAR 1 CO1 WEEK 17-18 DATABASES AND NORMALISATION Flashcards

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

What is a data base?

A

Is a collection of related data stored in a logical and structured manner

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

State and describe the parts of a database.

A

Table/file : collection of related records which contain the same type of information as all the other records.
Record : all of data relating to one item or thing.
Field : stores one item of data in a record.

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

What is a file(table)?

A

A collection of related records which contain the same type of info as all other records
Eg info about all students in a class

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

What is a record?

A

All data relating to one item or thing
Eg info about one student in a class

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

What is a field?

A

Stores one item of data in a record
Eg a single characteristic about a student (DOB , surname)

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

What are the key points about flat file databases?

A

Only one table,
No links between them

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

What are the advantages of a flat file data base?

A

Easy to set up or understand

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

What are the disadvantages of a flat file data base?

A

May have redundant data (repeated).
Potential duplicated data.
Harder to update due to data duplication.
Records are not unique.
Security poor as once gained access all data is readily available.
Harder to perform more complex queries.
Easy to setup and understand.

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

What is a relational database?

A

Has more than one table which are linked together by primary and foreign keys

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

State the advantages of Relational Database and the one disadvantage.

A

Data only stored once.
Data integrity is maintained.
Easy to modify the format.
Security is better as sections of data can be individually protected using authorisation.
More future proof.
Hard to set up.

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

What is a primary key?

A

Unique identifier

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

what is A foreign key?

A

Is a primary key in one table which is used as an attribute in another table
/ repeating attribute

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

What is a compound key?

A

A combination of fields that makes a record unique

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

What is a secondary key?

A

Made on a field that you would like to be indexed for faster searching
May not be unique are used for sorting or searching

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

What is normalisation (databases)?

A

Data is split over multiple tables which are related / The process of refining structure of a database to minimise redundancy and improve integrity.
If not normalised potentially has repeated data or inconsistent data.

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

Describe First Normal Form.

A

Where there are no repeating attributes and data is atomic.
Atomic data is information which cannot be logically broken down into smaller parts.
Eg. fullname split into forename and surname

17
Q

Describe Second Normal Form.

A

If it is in 1NF.
There is no partial key dependencies.
If there is a compound primary key likely not to be in 2NF.

18
Q

Describe Third Normal Form.

A

If it is in 2NF.
All data has to be related to the primary key.

19
Q

What are the three types of integrity(databases)?

A

Entity integrity
Referential integrity
Domain integrity

20
Q

What is entity integrity?

A

Every table must have a primary key which must be unique and not empty

21
Q

What is referential integrity?

A

foreign keys must point to the primary of another table but cannot be empty meaning there is no relationship

22
Q

What is domain integrity?

A

all attributes in the database are related to the overall domain that the database is working on

23
Q

What is data redundancy?

A

refers to the unnecessary duplication of data

24
Q

what is data consistency?

A

When data is help in more that one file it should be stored in a consistent way

25
Q

What is data independence?

A

This means that users can view data with out having to be aware of the basic structure of the database
Refers to separation of data from program that uses it.

26
Q

What does ERD stand for?

A

Entity relationship diagram

27
Q

What are entities?

A

they are tables in a database which are made up of multiple attributes

28
Q

What are Attributes?

A

Describes the facts, details and characteristics of a entity

29
Q

What are the three types of relationships?

A

1 to 1
1 to many
many to many

30
Q

What is a one to one relationship?

A

relationships that are one to another and nothing else

31
Q

What is a one to many relationship?

A

an example of a one to many is a mother and her children

32
Q

What is a many to many relationship?
(give an example)

A

an example of a many to many relationship is a book can be loaned by multiple customers and a customer can loan many books

33
Q

how can you get rid of many to many relationships?

A

they can be removed by adding another entity which acts as a link table
-creates one to many relationships
-makes a relationship into 3NF
-reduces data inconsistencies