<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Databases on CS Theorems</title><link>https://cs.lozic.me/areas/databases/</link><description>Recent content in Databases on CS Theorems</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Fri, 05 Nov 2027 12:00:00 +0100</lastBuildDate><atom:link href="https://cs.lozic.me/areas/databases/index.xml" rel="self" type="application/rss+xml"/><item><title>Codd's Theorem</title><link>https://cs.lozic.me/posts/t069-codds-theorem/</link><pubDate>Fri, 05 Nov 2027 12:00:00 +0100</pubDate><guid>https://cs.lozic.me/posts/t069-codds-theorem/</guid><description>&lt;h2 id="symptom"&gt;Symptom&lt;/h2&gt;
&lt;p&gt;You write:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-sql" data-lang="sql"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;FROM&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;users&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;WHERE&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;age&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;AND&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;city&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;Berlin&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You did not say whether to scan the table or use an index. You did not say which
of the two predicates to apply first. You did not say anything about join order,
because there is no join, but if there were you would not have said that either.&lt;/p&gt;</description></item><item><title>Paxos, Raft, and the Shape of Consensus</title><link>https://cs.lozic.me/posts/t064-paxos-raft-and-the-shape-of-consensus/</link><pubDate>Fri, 20 Aug 2027 12:00:00 +0100</pubDate><guid>https://cs.lozic.me/posts/t064-paxos-raft-and-the-shape-of-consensus/</guid><description>&lt;h2 id="symptom"&gt;Symptom&lt;/h2&gt;
&lt;p&gt;Your database has two nodes that both believe they are the primary.&lt;/p&gt;
&lt;p&gt;Each has been accepting writes. Each has a coherent log. Neither has crashed.
The old primary was declared dead by a health check that timed out during a GC
pause, a new one was elected, and then the old one woke up still holding what it
thinks is a valid lease. You now have two divergent histories of the same data
and no principled way to merge them, because both contain acknowledged writes
that customers were told had succeeded.&lt;/p&gt;</description></item><item><title>Quorum Intersection (R + W &gt; N)</title><link>https://cs.lozic.me/posts/t065-quorum-intersection/</link><pubDate>Fri, 13 Aug 2027 12:00:00 +0100</pubDate><guid>https://cs.lozic.me/posts/t065-quorum-intersection/</guid><description>&lt;h2 id="symptom"&gt;Symptom&lt;/h2&gt;
&lt;p&gt;You have three replicas of a value. A client writes &lt;code&gt;v2&lt;/code&gt; and gets an
acknowledgement. Another client reads and gets &lt;code&gt;v1&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Nothing crashed. No network partition healed badly. Both operations completed
successfully and reported success. The write went to one replica, the read came
from another, and the two never spoke.&lt;/p&gt;</description></item></channel></rss>