Datebase Flashcards

1
Q

DB Migrations:

How would you migrate an application from a database to another, for example from MySQL to PostgreSQL? If you had to manage that project, which issues would you expect to face?

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

NULL is special:

Why do databases treat null as a so special case? For example, why does SELECT * FROM table WHERE field = null not match records with null field in SQL?

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

ACID:

ACID is an acronym that refers to Atomicity, Consistency, Isolation, and Durability, 4 properties guaranteed by a database transaction in most database engines. What do you know about this topic? Would you like to elaborate?

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

Schema Migrations:

How would you manage database schema migrations? That is, how would you automate changes to the database schema, as the application evolves, version after version?

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

Lazy Loading:

How is lazy loading achieved? When is it useful? What are its pitfalls?

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

N+1 Problem:

The so-called “N + 1 problem” is an issue that occurs when code needs to load the children of a parent-child relationship with an ORMs that have lazy-loading enabled, and that therefore issue a query for the parent record, and then one query for each child record. How to fix it?

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

Slowest Queries:

How would you find the most expensive queries in an application?

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

Normalization:

In your opinion, is it always needed to use database normalization? When is it advisable to use denormalized databases?

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

Blue/Green Deployment:

Of of the Continuous Integration’s techniques is called Blue-Green Deployment: it consists in having two production environments, as identical as possible, and performing the deployment in one of them while the other one is still operating, and then safely switching the traffic to the second one after some convenient testing. This technique becomes more complicated when the deployment includes changes to the database structure or content. I’d like to discuss this topic with you.

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