Author Archives: Stanislav_Panteleev

Java.DBMigrationTools.Can migration tools handle data migrations (not just schema)?

Yes — migration tools can handle data migrations, but here’s the senior-level nuance: They can, but you must be very careful about what kind of data migrations you put there. This is a classic interview question about judgment, not tooling. … Continue reading →

Posted in Без рубрики | Comments Off on Java.DBMigrationTools.Can migration tools handle data migrations (not just schema)?

Java.DBMigrationTools.Which is more beginner-friendly: Flyway or Liquibase?

Short answer (interview-ready): Flyway is more beginner-friendly than Liquibase. That’s the expected answer in 90% of interviews.Now let’s break it down like a senior. Why Flyway is more beginner-friendly 1. SQL-first, no abstraction With Flyway you write plain SQL: No … Continue reading →

Posted in Без рубрики | Comments Off on Java.DBMigrationTools.Which is more beginner-friendly: Flyway or Liquibase?

Java.DBMigrationTools.Can you use both Liquibase and Flyway in the same project?

Short answer: yes, technically you can — but in 99% of real projects you shouldn’t.In interviews, this is a trap question. What matters is why and how. Short interview answer (what you say in 20–30 seconds) “Technically it’s possible to … Continue reading →

Posted in Без рубрики | Comments Off on Java.DBMigrationTools.Can you use both Liquibase and Flyway in the same project?

Java.DBMigrationTools.How do you write a simple “create table” migration?

Short interview answer (what you say aloud) A simple CREATE TABLE migration is a versioned script that creates a table idempotently, defines primary key, types, constraints, and usually indexes.It should be deterministic, safe to run once, and easy to roll … Continue reading →

Posted in Без рубрики | Comments Off on Java.DBMigrationTools.How do you write a simple “create table” migration?

Java.DBMigrationTools.How do you test your migrations before deploying?

Short senior-level answer (what to say first) I test migrations in isolation and in realistic environments.I run them locally against a clean database, against a database with real historical data, and in CI using ephemeral databases. I also validate rollback … Continue reading →

Posted in Без рубрики | Comments Off on Java.DBMigrationTools.How do you test your migrations before deploying?

Java.DBMigrationTools.How does optimistic locking behave under high contention, and what failure modes appear?

Short answer (interview-ready) Under high contention, optimistic locking degrades by producing frequent conflicts, causing retries, increased latency, and potential livelock or starvation.It stops scaling not by blocking, but by wasting work. That sentence alone already sounds senior. Now let’s unpack … Continue reading →

Posted in Без рубрики | Comments Off on Java.DBMigrationTools.How does optimistic locking behave under high contention, and what failure modes appear?

What is optimistic locking?

Optimistic locking is a concurrency control strategy where: You assume conflicts are rare, so you don’t lock data upfront.Instead, you detect conflicts at write time and fail if data was changed by someone else. Key idea: Read without lock Verify … Continue reading →

Posted in Без рубрики | Comments Off on What is optimistic locking?

Java.DBMigrationTools.What is pessimistic locking, how it works?

What is pessimistic locking? Pessimistic locking is a concurrency control strategy where: You assume conflicts will happen, so you lock data before modifying it, preventing others from changing it until you’re done. In short: “I lock first, then read and … Continue reading →

Posted in Без рубрики | Comments Off on Java.DBMigrationTools.What is pessimistic locking, how it works?

Java.DBMigrationTools.UpsertVsPessimisticLock

Core idea (one-liner) Upsert → “Let the database resolve conflicts automatically.” Pessimistic locking → “Prevent conflicts by locking data in advance.” They solve different problems. Upsert What it is A single atomic write: Insert if row doesn’t exist Update if … Continue reading →

Posted in Без рубрики | Comments Off on Java.DBMigrationTools.UpsertVsPessimisticLock

Java.DBMigrationTools.What is upsert ?

Upsert = UPDATE + INSERT An upsert is a database operation that: INSERTS a row if it does not exist UPDATES the existing row if it already exists 👉 It is typically based on a unique key or primary key. … Continue reading →

Posted in Без рубрики | Comments Off on Java.DBMigrationTools.What is upsert ?