Questions About Databases Flashcards

1
Q

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

Why do databases treat null as a 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 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

How would you manage database schema migrations? That is, how would you automate changes to 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

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

The so called “N + 1 problem” is an issue that occurs when code needs to load the children of a parent-child relationship with 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

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

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

Continuous Integration’s technique is called Blue-Green Deployment: it consists in having two production environments, as identical as possible, and in performing the deployment in one of them while the other one is still operating, and then in 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
10
Q

What is eventual consistency in NoSQL?

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

Brewer’s Theorem, most commonly known as the CAP theorem, states that in the presence of a network partition (the P in CAP), a system’s designer has to choose between consistency (the C in CAP) and availability (the A in CAP). Can you think about examples of CP, AP and CA systems?

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

How would you explain the recent rise in interest in NoSQL?

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

How does NoSQL tackle scalability challenges?

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