Topic 10 - Fundamentals of Databases Flashcards

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

What is a primary key?
What is a foreign key?

A

A primary key is an attribute that provides an unique identifier for every entity in a database table.
A foreign key is an attribute in a table which is the primary key in another, related, table.

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

How are tables with many-to-many relationships linked together?

A

A new ‘link table’ is created

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

What defines the First Normal Form of database normalisation?

A

A database contains no repeating attributes

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

What is database normalisation and why are databases normalised?

A

Ensuring that entities contain no redundant or repeated data.
So they can be more efficient without compromise to the integrity of their data. They are easier to maintain reducing update, insertion and delete anomalies

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

What defines the Second Normal Form of database normalisation?

A

It qualifies for First Normal Form.
Partial key dependencies are removed, attributes that only rely on certain other attributes.

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

What defines the Third Normal Form of database normalisation?

A

It qualifies for First and Second Normal Form.
It has no non-key dependencies

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

What is the structure for a SELECT command?

A

SELECT <attribute> FROM <table> WHERE <conditions> (ORDER BY ASC/DESC optional)</conditions></attribute>

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

What is the structure for a UPDATE command?

A

UPDATE <table> SET <attribute> = <value> WHERE <attribute> = <value></value></attribute></value></attribute>

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

What’s the structure for a DELETE command?

A

DELETE FROM <table> WHERE <condition></condition>

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

What’s the structure for an INSERT command?

A

INSERT INTO <table> VALUES (<value1>, <value2>, …)</value2></value1>

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