DataBases (Me) Flashcards

1
Q

What is a flat file database?

A

A flat file database is a database with only one table

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

What is a relational database?

A

A relational database is a database with multiple relational tables that are connected through keys

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

What is a primary key?

A

A unique identifier for a record in a table

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

What is a secondary key?

A

An **attribute **used to search the database but not always unique

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

What is a foreign key?

A

A field in one table that links to the primary key in another table which forms a relationship

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

What is a composite key?

A

A specific type of primary key which uses two or more fields from a table to create a unique value

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

What is an entity?

A

People or things

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

What is an entity-relationship modelling (ERM)?

A

A diagram that shows entities and the relationships between them

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

What is indexing in a database?

A

It’s a technique for speeding up data retrieval

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

Give one advantage and one disadvantage of indexing in a database?

A

Advantage: searches can be performed quickly; Disadvantage: index takes up extra space in database

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

What is Normalisation?

A

It’s the process of dividing larger tables into smaller interlinked tables

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

What is transitive dependency?

A

Non-key attribute depends on another non-key attribute

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

What is referential integrity?

A

A** rule** to make sure the** foreign key matches a valid primary key** in another table

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

What happens if referential integrity isn’t maintained?

A

Orphan record can appear

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

What is an orphan record?

A

A record where foreign key value references a non-existent primary key value

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

How can referential integrity be enforced in SQL?

A

Declare foreign constraints

17
Q

What is transaction processing?

A

Its ** executing a sequence of database operations** that are ** treated as a single logical unit**

18
Q

What does ACID stand for?

A

Atomicity, Consistency, Isolation, Durability

19
Q

What is Atomicity?

A

Ensuring all parts of the transaction are completed or none at all

20
Q

What is Consistency?

A

Ensuring the database remains in a valid state before and after the transaction

21
Q

What is Isolation?

A

Prevents interruptions from other ongoing transactions

22
Q

What is Durability?

A

Ensures that after a transaction is committed it remains even in system failure

23
Q

What is record locking?

A

A method to prevent simultaneous access to data

24
Q

What is data redundancy?

A

It’s the duplication of data across the database