Category Archives: Без рубрики

Database.Middle.What is a hash join?

A hash join is a join algorithm used by database engines to efficiently combine rows from two tables based on a join condition, typically equality (e.g., A.id = B.id). 🧠 How a Hash Join Works It operates in two main … Continue reading →

Posted in Без рубрики | Comments Off on Database.Middle.What is a hash join?

Database.Middle.What is a star schema? How is it different from a snowflake schema?

A star schema and a snowflake schema are two common ways to design a data warehouse for analytical queries. They define how fact and dimension tables are organized and related. ⭐ Star Schema Structure: A central fact table with foreign … Continue reading →

Posted in Без рубрики | Comments Off on Database.Middle.What is a star schema? How is it different from a snowflake schema?

Database.Middle.How do you design a database for multi-tenant architecture?

Designing a multi-tenant database means creating a structure where multiple customers (tenants) share the same application and database (or parts of it), while keeping their data isolated and secure. There are 3 main strategies — each with trade-offs in isolation, … Continue reading →

Posted in Без рубрики | Comments Off on Database.Middle.How do you design a database for multi-tenant architecture?

Database.Middle.How would you handle schema migrations in a production database?

Handling schema migrations in a production database requires planning, safety, and automation to avoid downtime or data loss. Here’s a complete strategy: ✅ 1. Use a Schema Migration Tool Use a reliable tool to version and manage migrations: Java: Flyway, … Continue reading →

Posted in Без рубрики | Comments Off on Database.Middle.How would you handle schema migrations in a production database?

Database.Middle.How can you enforce referential integrity?

✅ What Is Referential Integrity? It’s the concept that: A foreign key must refer to a valid, existing primary key in the parent table. If a referenced record is deleted or updated, the database must handle the dependent records properly. … Continue reading →

Posted in Без рубрики | Comments Off on Database.Middle.How can you enforce referential integrity?

Database.Middle.What is optimistic vs. pessimistic locking?

Pessimistic and optimistic locks are two strategies for handling concurrent access to shared resources (usually data in a database or memory). They’re mainly used to ensure data consistency in multi-threaded or multi-user environments. 🔒 Pessimistic Locking Idea: Assume conflict is … Continue reading →

Posted in Без рубрики | Comments Off on Database.Middle.What is optimistic vs. pessimistic locking?

Database.Middle.What are surrogate keys ?

Surrogate keys are artificial, system-generated keys used to uniquely identify rows in a database table. They are not derived from application data and have no business meaning — typically auto-increment integers or UUIDs. 🧠 Definition A surrogate key is a … Continue reading →

Posted in Без рубрики | Comments Off on Database.Middle.What are surrogate keys ?

Database.Middle.Explain the difference between OLTP and OLAP.

OLTP and OLAP are two fundamental types of database systems, each optimized for different workloads and purposes. 🧾 Definitions Term Stands For Purpose OLTP Online Transaction Processing Fast, real-time operations (e.g. purchases, signups) OLAP Online Analytical Processing Complex analysis, reports, … Continue reading →

Posted in Без рубрики | Comments Off on Database.Middle.Explain the difference between OLTP and OLAP.

Database.Middle.Partitions and sharding, differenes

Partitioning and sharding are both techniques for splitting large datasets into smaller parts — but they solve different problems and work at different levels. Here’s a clear breakdown: ⚖️ Partitioning vs Sharding: Core Differences Feature Partitioning Sharding 📍 Level Within … Continue reading →

Posted in Без рубрики | Comments Off on Database.Middle.Partitions and sharding, differenes

Database.Middle.do i see different tables in some sql explorer like dataGrip, for example ?

🔍 In DataGrip (or pgAdmin, MySQL Workbench, etc.) When you’re using partitioning, you typically see: The main table (logical parent) Its child tables (actual partitions) Example (PostgreSQL): In your table list, you’ll see: You query the parent table (sales) The … Continue reading →

Posted in Без рубрики | Comments Off on Database.Middle.do i see different tables in some sql explorer like dataGrip, for example ?