Databases_Flashcards

(6 cards)

1
Q

What makes a good primary key in a database?

A

A good primary key is unique, not null, stable (unchanging), and minimal.

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

How do we prevent redundant data in a database?

A

By using normalisation, relational table design, and enforcing foreign key constraints.

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

What is normalisation, and why is it important?

A

Normalisation is the process of structuring a database to reduce data redundancy and improve data integrity.

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

What does each letter in ACID stand for?

A

Atomicity, Consistency, Isolation, Durability.

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

Why are ACID properties important?

A

They ensure reliable processing of database transactions, even in case of errors or failures.

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

How can we write SQL queries to search for specific data in a table?

A

By using SELECT statements with WHERE clauses, e.g., SELECT name FROM students WHERE grade = ‘A’;

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