<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Databases on Java &amp; Software Architecture Knowledge Hub</title><link>https://samirsahoo.github.io/design-patterns-hub/tags/databases/</link><description>Recent content in Databases on Java &amp; Software Architecture Knowledge Hub</description><generator>Hugo</generator><language>en-US</language><copyright>© 2026 Samir Kumar Sahoo (https://github.com/samirsahoo). All rights reserved.</copyright><atom:link href="https://samirsahoo.github.io/design-patterns-hub/tags/databases/index.xml" rel="self" type="application/rss+xml"/><item><title>Data Models and Query Languages</title><link>https://samirsahoo.github.io/design-patterns-hub/data-systems/data-models-and-query-languages/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://samirsahoo.github.io/design-patterns-hub/data-systems/data-models-and-query-languages/</guid><description>&lt;h2 id="simple-definition"&gt;Simple definition&lt;a class="heading-anchor" href="#simple-definition" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;A &lt;strong&gt;data model&lt;/strong&gt; is the shape in which an application stores and thinks about its data: tables of rows, nested documents, or a graph of vertices and edges. It is one of the most important design decisions because it shapes not only how the software is written but &lt;strong&gt;how we think about the problem&lt;/strong&gt;. Each layer of a system represents data in terms of the layer below (objects → JSON or tables → bytes → electrical signals), and each layer hides the complexity beneath it.&lt;/p&gt;</description></item><item><title>Storage Engines: Logs, LSM-Trees, B-Trees and Column Stores</title><link>https://samirsahoo.github.io/design-patterns-hub/data-systems/storage-engines/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://samirsahoo.github.io/design-patterns-hub/data-systems/storage-engines/</guid><description>&lt;h2 id="simple-definition"&gt;Simple definition&lt;a class="heading-anchor" href="#simple-definition" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;A &lt;strong&gt;storage engine&lt;/strong&gt; is the part of a database that decides how data is laid out on disk and in memory, and how it is found again. You rarely write one, but choosing and tuning a database requires knowing roughly what it does. Two families dominate transactional workloads:&lt;/p&gt;</description></item><item><title>Replication: Leaders, Followers, Lag and Quorums</title><link>https://samirsahoo.github.io/design-patterns-hub/data-systems/replication/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://samirsahoo.github.io/design-patterns-hub/data-systems/replication/</guid><description>&lt;h2 id="simple-definition"&gt;Simple definition&lt;a class="heading-anchor" href="#simple-definition" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;&lt;strong&gt;Replication&lt;/strong&gt; keeps a copy of the same data on several machines connected by a network. Reasons to do it:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;High availability:&lt;/strong&gt; keep working when a machine or a whole data centre fails.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Read scalability:&lt;/strong&gt; serve more reads from more copies.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Latency:&lt;/strong&gt; keep data geographically close to users.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;If data never changed, replication would be trivial: copy it once. All the difficulty comes from &lt;strong&gt;handling changes&lt;/strong&gt;. There are three main approaches: &lt;strong&gt;single-leader&lt;/strong&gt;, &lt;strong&gt;multi-leader&lt;/strong&gt; and &lt;strong&gt;leaderless&lt;/strong&gt;.&lt;/p&gt;</description></item><item><title>Choosing a Database: SQL, NoSQL, Indexes and Storage Types</title><link>https://samirsahoo.github.io/design-patterns-hub/system-design/building-blocks/choosing-a-database/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://samirsahoo.github.io/design-patterns-hub/system-design/building-blocks/choosing-a-database/</guid><description>&lt;h2 id="simple-definition"&gt;Simple definition&lt;a class="heading-anchor" href="#simple-definition" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;There is no best database, only the best fit for a &lt;strong&gt;workload&lt;/strong&gt;: the shape of the data, how it is queried, how much there is, how fast it changes, and which guarantees it needs. Choosing well means asking those questions first and naming the technology last.&lt;/p&gt;</description></item><item><title>Transactions and Isolation Levels: ACID, Anomalies and Serializability</title><link>https://samirsahoo.github.io/design-patterns-hub/data-systems/transactions-and-isolation/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://samirsahoo.github.io/design-patterns-hub/data-systems/transactions-and-isolation/</guid><description>&lt;h2 id="simple-definition"&gt;Simple definition&lt;a class="heading-anchor" href="#simple-definition" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;A &lt;strong&gt;transaction&lt;/strong&gt; groups several reads and writes into one logical unit: either all of them take effect (&lt;strong&gt;commit&lt;/strong&gt;) or none do (&lt;strong&gt;abort&lt;/strong&gt;, rollback). Transactions let applications ignore whole classes of problems — crashes halfway through, concurrent clients interfering — because the database handles them.&lt;/p&gt;</description></item></channel></rss>