<?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 Nalar</title>
    <link>https://nalar.dev/tags/databases/</link>
    <description>Recent content in Databases on Nalar</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Tue, 01 Sep 2026 00:00:00 +0700</lastBuildDate>
    <atom:link href="https://nalar.dev/tags/databases/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Keyset Pagination in SQL for Fast, Stable APIs</title>
      <link>https://nalar.dev/keyset-pagination-sql/</link>
      <pubDate>Tue, 01 Sep 2026 00:00:00 +0700</pubDate>
      <guid>https://nalar.dev/keyset-pagination-sql/</guid>
      <description>&lt;p&gt;Pagination looks simple until a table becomes large or new rows are inserted while a client is paging through results. &lt;code&gt;LIMIT&lt;/code&gt; and &lt;code&gt;OFFSET&lt;/code&gt; are easy to understand, but deep offsets can become expensive and changing data can make rows appear twice or disappear between requests.&lt;/p&gt;&#xA;&lt;p&gt;Keyset pagination, also called seek pagination, avoids those problems by asking for rows after a known position instead of asking the database to skip a number of rows.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Safe Database Migrations with the Expand-and-Contract Pattern</title>
      <link>https://nalar.dev/safe-database-migrations-expand-contract/</link>
      <pubDate>Tue, 01 Sep 2026 00:00:00 +0700</pubDate>
      <guid>https://nalar.dev/safe-database-migrations-expand-contract/</guid>
      <description>&lt;p&gt;A schema migration can be syntactically correct and still cause an outage. Production deployments often run old and new application versions at the same time, background workers may lag behind, and a large table can turn a simple-looking DDL statement into a long lock.&lt;/p&gt;&#xA;&lt;p&gt;The expand-and-contract pattern reduces those risks by splitting an incompatible change into compatible stages.&lt;/p&gt;&#xA;&lt;h2 id=&#34;why-one-step-schema-changes-are-risky&#34;&gt;Why one-step schema changes are risky&lt;/h2&gt;&#xA;&lt;p&gt;Suppose an application wants to rename &lt;code&gt;users.full_name&lt;/code&gt; to &lt;code&gt;users.display_name&lt;/code&gt;.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
