Database Design & Development Flashcards

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

What is referential integrity

A

Every non-null foreign key value must match an existing primary key value

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

Why is referential integrity important?

A

Helps to ensure that the database contains valid and usable records. Without it, the relationships between tables could quickly become meaningless and the queries on the data would return unreliable results.

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

What is entity integrity?

A

Ensures that there are no duplicate records within the table and that the primary key within the table is unique and never null.

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

What is a primary key?

A

A constraint that uniquely identifies each record in a table
Cannot contain NULL values
A table can have only ONE primary key; and in the table, this primary key can consist of single or multiple columns

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

What is a foreign key?

A
A constraint that is used to prevent actions which would destroy links between tables
A field (or collection of fields) in one table, that refers to the PRIMARY KEY in another table
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How do you resolve many to many relationships?

A

By introducing a junction table into your model. It will resolve the many-to-many relationship into multiple one-to-many relationships

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

What is a ternary relationship?

A

When three entities participate in the relationship

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

What is the first normal form?

A

A relation that contains no multivalued attributes

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

What is normalization?

A

Data analysis technique to design a database system into tables and columns by applying a series of refinements to groups of data items to produce normal forms

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

What is the second normal form?

A

A relation that is in first normal form and every non-primary-key attribute is fully functionally dependent on the primary key.

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

What is the third normal form?

A

A relation that is in second normal form, and in which no non-primary-key attribute is transitively dependent on the primary key

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

What are the steps of normalization?

A

Select the data source and convert it into an unnormalised table (UNF)
Transform the unnormalised data into the first normal form (1NF)
Transform data in first normal form (1NF) into second normal form (2NF)
Transform data in second normal form (2NF) into third normal form (3NF)
Transform third normal form to Boyce-Codd normal form (BCNF)*
Transform Boyce-Codd normal form to fourth normal form (4NF)*
Transform fourth normal form to fifth normal form (5NF)*

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

What are the 3 types of anomalies?

A

Insertion anomalies
Deletion anomalies
Modification anomalies

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

Why are ACID transactions a good thing to have?

A

ensure the highest possible data reliability and integrity

ensure that your data never falls into an inconsistent state because of an operation that only partially completes

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

Benefits of normalization

A

allows the database designer to understand the current data structures within an organisation
aids any future changes and enhancements to the system

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

Why do we normalize?

A

To minimise data redundancy

17
Q

What are transactions?

A

a logical unit of work that must be either entirely completed or aborted

18
Q

What is data concurrency?

A

Users can access data at the same time

19
Q

What is data consistency?

A

Each user sees a consistent view of the data