<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: SysLayer</title>
    <description>The latest articles on DEV Community by SysLayer (@syslayer).</description>
    <link>https://dev.to/syslayer</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2241465%2F35aa80d6-8789-4cf4-8540-6ebb0f9ce877.png</url>
      <title>DEV Community: SysLayer</title>
      <link>https://dev.to/syslayer</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/syslayer"/>
    <language>en</language>
    <item>
      <title>Coding Cat Oran S2 Ep6 — The Abstract Table and the Gateway</title>
      <dc:creator>SysLayer</dc:creator>
      <pubDate>Fri, 15 May 2026 17:18:57 +0000</pubDate>
      <link>https://dev.to/syslayer/coding-cat-oran-s2-ep6-the-abstract-table-and-the-gateway-lk5</link>
      <guid>https://dev.to/syslayer/coding-cat-oran-s2-ep6-the-abstract-table-and-the-gateway-lk5</guid>
      <description>&lt;p&gt;&lt;em&gt;While three departments argued about column names,&lt;br&gt;
IT built the thing anyway.&lt;br&gt;
It passed the audit. Barely.&lt;br&gt;
Barely is enough.&lt;/em&gt;&lt;/p&gt;



&lt;p&gt;Day 87. Three days before re-audit.&lt;/p&gt;

&lt;p&gt;In Conference Room B, the departments were in a meeting&lt;br&gt;
about whether the report should show defect count or defect rate.&lt;br&gt;
This meeting had been running, in various forms,&lt;br&gt;
for eleven days.&lt;/p&gt;

&lt;p&gt;Oran was not in the meeting.&lt;/p&gt;

&lt;p&gt;He was in the server room&lt;br&gt;
with his two developers —&lt;br&gt;
Marcus, who knew SQL,&lt;br&gt;
and Kevin, who was very enthusiastic —&lt;br&gt;
and a whiteboard&lt;br&gt;
covered in three tables.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Three tables,&lt;/em&gt; Oran had said on Day 60.&lt;br&gt;
&lt;em&gt;That's all we're building.&lt;br&gt;
Everything else is a column.&lt;/em&gt;&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;The design.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The problem with every schema they had tried&lt;br&gt;
was the same problem:&lt;br&gt;
it assumed the data had a fixed shape.&lt;/p&gt;

&lt;p&gt;Fixed columns. Fixed relationships. Fixed definitions.&lt;/p&gt;

&lt;p&gt;But the data didn't have a fixed shape.&lt;br&gt;
QA's data had a different shape than Engineering's.&lt;br&gt;
Product A's data had a different shape than Product B's.&lt;br&gt;
The shape kept changing because the specs kept changing&lt;br&gt;
because the products kept evolving&lt;br&gt;
because that's what trial production to mass production actually looks like.&lt;/p&gt;

&lt;p&gt;You cannot design a fixed schema for a moving target.&lt;/p&gt;

&lt;p&gt;So Oran stopped trying to design for the data.&lt;br&gt;
He designed for the &lt;em&gt;events.&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="c1"&gt;-- Table 1: Something happened.&lt;/span&gt;
&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="n"&gt;production_events&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="n"&gt;event_id&lt;/span&gt;      &lt;span class="nb"&gt;BIGINT&lt;/span&gt;        &lt;span class="k"&gt;PRIMARY&lt;/span&gt; &lt;span class="k"&gt;KEY&lt;/span&gt; &lt;span class="k"&gt;IDENTITY&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="n"&gt;batch_id&lt;/span&gt;      &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;   &lt;span class="k"&gt;NOT&lt;/span&gt; &lt;span class="k"&gt;NULL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;event_type&lt;/span&gt;    &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;   &lt;span class="k"&gt;NOT&lt;/span&gt; &lt;span class="k"&gt;NULL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;   &lt;span class="c1"&gt;-- 'inspection', 'process', 'output', 'material_intake'&lt;/span&gt;
  &lt;span class="n"&gt;occurred_at&lt;/span&gt;   &lt;span class="nb"&gt;DATETIME&lt;/span&gt;      &lt;span class="k"&gt;NOT&lt;/span&gt; &lt;span class="k"&gt;NULL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;recorded_by&lt;/span&gt;   &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="k"&gt;source&lt;/span&gt;        &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;   &lt;span class="k"&gt;NOT&lt;/span&gt; &lt;span class="k"&gt;NULL&lt;/span&gt;    &lt;span class="c1"&gt;-- 'csv', 'excel', 'api', 'manual'&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;-- Table 2: Here's what we know about it.&lt;/span&gt;
&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="n"&gt;event_attributes&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="n"&gt;attribute_id&lt;/span&gt;  &lt;span class="nb"&gt;BIGINT&lt;/span&gt;        &lt;span class="k"&gt;PRIMARY&lt;/span&gt; &lt;span class="k"&gt;KEY&lt;/span&gt; &lt;span class="k"&gt;IDENTITY&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="n"&gt;event_id&lt;/span&gt;      &lt;span class="nb"&gt;BIGINT&lt;/span&gt;        &lt;span class="k"&gt;NOT&lt;/span&gt; &lt;span class="k"&gt;NULL&lt;/span&gt; &lt;span class="k"&gt;REFERENCES&lt;/span&gt; &lt;span class="n"&gt;production_events&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;event_id&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="k"&gt;key&lt;/span&gt;           &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="k"&gt;NOT&lt;/span&gt; &lt;span class="k"&gt;NULL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;value&lt;/span&gt;         &lt;span class="n"&gt;NVARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;MAX&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="n"&gt;unit&lt;/span&gt;          &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;-- Table 3: Here's what each key means — and when that meaning changed.&lt;/span&gt;
&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="n"&gt;attribute_definitions&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="n"&gt;definition_id&lt;/span&gt; &lt;span class="nb"&gt;BIGINT&lt;/span&gt;        &lt;span class="k"&gt;PRIMARY&lt;/span&gt; &lt;span class="k"&gt;KEY&lt;/span&gt; &lt;span class="k"&gt;IDENTITY&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="n"&gt;event_type&lt;/span&gt;    &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;   &lt;span class="k"&gt;NOT&lt;/span&gt; &lt;span class="k"&gt;NULL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="k"&gt;key&lt;/span&gt;           &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="k"&gt;NOT&lt;/span&gt; &lt;span class="k"&gt;NULL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;label&lt;/span&gt;         &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="n"&gt;data_type&lt;/span&gt;     &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="n"&gt;valid_from&lt;/span&gt;    &lt;span class="nb"&gt;DATE&lt;/span&gt;          &lt;span class="k"&gt;NOT&lt;/span&gt; &lt;span class="k"&gt;NULL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;valid_to&lt;/span&gt;      &lt;span class="nb"&gt;DATE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;                     &lt;span class="c1"&gt;-- NULL = currently valid&lt;/span&gt;
  &lt;span class="n"&gt;added_by&lt;/span&gt;      &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="n"&gt;notes&lt;/span&gt;         &lt;span class="nb"&gt;TEXT&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Three tables.&lt;br&gt;
Every department's data fits.&lt;/p&gt;

&lt;p&gt;QA's inspection: a &lt;code&gt;production_event&lt;/code&gt; of type &lt;code&gt;inspection&lt;/code&gt;,&lt;br&gt;
with attributes for &lt;code&gt;stage&lt;/code&gt;, &lt;code&gt;result&lt;/code&gt;, &lt;code&gt;defect_type&lt;/code&gt;, &lt;code&gt;defect_count&lt;/code&gt;, &lt;code&gt;inspector_id&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Engineering's process data: a &lt;code&gt;production_event&lt;/code&gt; of type &lt;code&gt;process&lt;/code&gt;,&lt;br&gt;
with attributes for &lt;code&gt;temperature&lt;/code&gt;, &lt;code&gt;pressure&lt;/code&gt;, &lt;code&gt;spec_version&lt;/code&gt;, &lt;code&gt;compliance&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Manufacturing's output: a &lt;code&gt;production_event&lt;/code&gt; of type &lt;code&gt;output&lt;/code&gt;,&lt;br&gt;
with attributes for &lt;code&gt;quantity&lt;/code&gt;, &lt;code&gt;shift&lt;/code&gt;, &lt;code&gt;line_id&lt;/code&gt;, &lt;code&gt;operator_id&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;New column needed? Add a new key to &lt;code&gt;event_attributes&lt;/code&gt;. No migration.&lt;br&gt;
Spec changed? Add a new row to &lt;code&gt;attribute_definitions&lt;/code&gt; with a new &lt;code&gt;valid_from&lt;/code&gt;. Old data stays valid under the old definition.&lt;br&gt;
New product line in Q3 with completely different parameters? Same three tables. Different keys.&lt;/p&gt;

&lt;p&gt;Kevin said: &lt;em&gt;"This is like... a database inside a database."&lt;/em&gt;&lt;br&gt;
Marcus said: &lt;em&gt;"It's EAV. Entity-Attribute-Value. It has tradeoffs."&lt;/em&gt;&lt;br&gt;
Kevin said: &lt;em&gt;"What tradeoffs?"&lt;/em&gt;&lt;br&gt;
Marcus said: &lt;em&gt;"Querying is slower. You have to pivot the attributes to get a report format.&lt;br&gt;
You lose type safety at the column level.&lt;br&gt;
It's harder to write ad-hoc queries."&lt;/em&gt;&lt;br&gt;
Kevin said: &lt;em&gt;"So why are we doing it?"&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Oran looked at the whiteboard.&lt;br&gt;
He thought about the spec that changed eleven months ago with no documentation.&lt;br&gt;
He thought about QA's four inspection stages that might become five.&lt;br&gt;
He thought about the new product line in Q3.&lt;br&gt;
He thought about Conference Room B, where the meeting was still running.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;"Because the alternative,"&lt;/em&gt; he said,&lt;br&gt;
&lt;em&gt;"is redesigning the schema every time something changes.&lt;br&gt;
And something always changes."&lt;/em&gt;&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;The gateway.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The schema solved the storage problem.&lt;br&gt;
The gateway solved the input problem.&lt;/p&gt;

&lt;p&gt;Three departments. Three data formats. Three ways of working&lt;br&gt;
that were not going to change just because IT asked nicely.&lt;/p&gt;

&lt;p&gt;Manufacturing would never use an API.&lt;br&gt;
Their shift supervisors had been using Excel since 2009&lt;br&gt;
and would continue using Excel until they retired.&lt;/p&gt;

&lt;p&gt;QA had fourteen Excel templates. Different ones for different products.&lt;br&gt;
They were not going to consolidate them.&lt;br&gt;
Oran had stopped asking.&lt;/p&gt;

&lt;p&gt;Engineering's test equipment could output to CSV automatically&lt;br&gt;
but the engineers had also written some internal tools&lt;br&gt;
that could call an HTTP endpoint if one existed.&lt;/p&gt;

&lt;p&gt;So Oran built three doors to the same room.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[ Manufacturing Excel files ]  →  CSV drop folder  ┐
[ QA Excel templates        ]  →  Excel endpoint   ├→ Gateway → production_events
[ Engineering test equipment]  →  HTTP API         ┘            event_attributes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The gateway parsed each format,&lt;br&gt;
validated the data against &lt;code&gt;attribute_definitions&lt;/code&gt;,&lt;br&gt;
rejected rows that didn't match,&lt;br&gt;
logged everything,&lt;br&gt;
and wrote clean events and attributes to the database.&lt;/p&gt;

&lt;p&gt;Each department thought they were using their own system.&lt;br&gt;
They were using the same system.&lt;br&gt;
They didn't need to know.&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;Day 89. 11:47pm.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Marcus pushed the last fix.&lt;br&gt;
Kevin ran the import script for the sixth time.&lt;br&gt;
It finished without errors.&lt;/p&gt;

&lt;p&gt;Oran ran the audit report query.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt;
  &lt;span class="n"&gt;pe&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;batch_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;pe&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;occurred_at&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="k"&gt;MAX&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;CASE&lt;/span&gt; &lt;span class="k"&gt;WHEN&lt;/span&gt; &lt;span class="n"&gt;ea&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;key&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'output_qty'&lt;/span&gt;     &lt;span class="k"&gt;THEN&lt;/span&gt; &lt;span class="n"&gt;ea&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="k"&gt;END&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;output_qty&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="k"&gt;MAX&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;CASE&lt;/span&gt; &lt;span class="k"&gt;WHEN&lt;/span&gt; &lt;span class="n"&gt;ea&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;key&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'defect_count'&lt;/span&gt;   &lt;span class="k"&gt;THEN&lt;/span&gt; &lt;span class="n"&gt;ea&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="k"&gt;END&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;defect_count&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="k"&gt;MAX&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;CASE&lt;/span&gt; &lt;span class="k"&gt;WHEN&lt;/span&gt; &lt;span class="n"&gt;ea&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;key&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'final_result'&lt;/span&gt;   &lt;span class="k"&gt;THEN&lt;/span&gt; &lt;span class="n"&gt;ea&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="k"&gt;END&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;inspection_result&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="k"&gt;MAX&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;CASE&lt;/span&gt; &lt;span class="k"&gt;WHEN&lt;/span&gt; &lt;span class="n"&gt;ea&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;key&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'material_lot'&lt;/span&gt;   &lt;span class="k"&gt;THEN&lt;/span&gt; &lt;span class="n"&gt;ea&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="k"&gt;END&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;material_lot&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="k"&gt;MAX&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;CASE&lt;/span&gt; &lt;span class="k"&gt;WHEN&lt;/span&gt; &lt;span class="n"&gt;ea&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;key&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'spec_version'&lt;/span&gt;   &lt;span class="k"&gt;THEN&lt;/span&gt; &lt;span class="n"&gt;ea&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="k"&gt;END&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;spec_version&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;production_events&lt;/span&gt; &lt;span class="n"&gt;pe&lt;/span&gt;
&lt;span class="k"&gt;JOIN&lt;/span&gt; &lt;span class="n"&gt;event_attributes&lt;/span&gt; &lt;span class="n"&gt;ea&lt;/span&gt; &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;ea&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;event_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;pe&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;event_id&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;pe&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;batch_id&lt;/span&gt; &lt;span class="k"&gt;LIKE&lt;/span&gt; &lt;span class="s1"&gt;'PA-%'&lt;/span&gt;
  &lt;span class="k"&gt;AND&lt;/span&gt; &lt;span class="n"&gt;pe&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;occurred_at&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="s1"&gt;'2024-01-01'&lt;/span&gt;
&lt;span class="k"&gt;GROUP&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;pe&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;batch_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;pe&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;occurred_at&lt;/span&gt;
&lt;span class="k"&gt;ORDER&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;pe&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;occurred_at&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It returned 847 rows.&lt;br&gt;
Each one traceable from raw material to finished goods.&lt;br&gt;
Each one stamped with the spec version that was in effect at the time.&lt;br&gt;
Each one showing which system it came from, which operator recorded it, when.&lt;/p&gt;

&lt;p&gt;Oran saved the result as a PDF.&lt;/p&gt;

&lt;p&gt;He did not celebrate.&lt;br&gt;
He had learned not to celebrate before the audit.&lt;/p&gt;

&lt;p&gt;He closed his laptop.&lt;br&gt;
He went home.&lt;br&gt;
He slept four hours.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Day 90.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Ms. Chen arrived at 9am.&lt;br&gt;
She opened her iPad.&lt;br&gt;
She ran through the checklist.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Single source of truth:&lt;/em&gt; pass.&lt;br&gt;
&lt;em&gt;Traceability, raw material to finished goods:&lt;/em&gt; pass.&lt;br&gt;
&lt;em&gt;Audit trail for changes:&lt;/em&gt; pass.&lt;br&gt;
&lt;em&gt;Data in non-editable, auditable system:&lt;/em&gt; pass.&lt;br&gt;
&lt;em&gt;Report format matches customer requirements:&lt;/em&gt; pass.&lt;/p&gt;

&lt;p&gt;She closed her iPad.&lt;/p&gt;

&lt;p&gt;"This is sufficient for certification," she said.&lt;br&gt;
"For now."&lt;/p&gt;

&lt;p&gt;&lt;em&gt;For now.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The CEO shook Oran's hand.&lt;br&gt;
The VP of Manufacturing said: &lt;em&gt;"See? We told you we'd cooperate."&lt;/em&gt;&lt;br&gt;
The VP of QA was already asking about new fields for Phase 2.&lt;br&gt;
The VP of Engineering wanted to know about the Q3 product line.&lt;/p&gt;

&lt;p&gt;Oran opened his notebook.&lt;br&gt;
He wrote the date.&lt;br&gt;
He drew a line under &lt;em&gt;Phase 1.&lt;/em&gt;&lt;br&gt;
Below it, he wrote: &lt;em&gt;Phase 2.&lt;/em&gt;&lt;br&gt;
Below that: &lt;em&gt;?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;He walked back to his desk.&lt;/p&gt;

&lt;p&gt;On the production floor, he passed the QA station.&lt;br&gt;
He passed the line supervisor's workstation.&lt;br&gt;
He passed the shift handover desk.&lt;/p&gt;

&lt;p&gt;On the shift handover desk,&lt;br&gt;
open on the screen,&lt;br&gt;
was a new Excel file.&lt;/p&gt;

&lt;p&gt;It had three columns.&lt;br&gt;
Someone had just started filling in the second row.&lt;/p&gt;

&lt;p&gt;Oran looked at it for a moment.&lt;/p&gt;

&lt;p&gt;Then he kept walking.&lt;/p&gt;

&lt;p&gt;He had work to do.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;The audit was passed.&lt;/em&gt;&lt;br&gt;
&lt;em&gt;The system was live.&lt;/em&gt;&lt;br&gt;
&lt;em&gt;The data was clean.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;And somewhere in the factory,&lt;/em&gt;&lt;br&gt;
&lt;em&gt;someone had already started a new Excel file.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;That wasn't a failure.&lt;/em&gt;&lt;br&gt;
&lt;em&gt;That was just the beginning of Phase 2.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  What Oran learned — and what comes next
&lt;/h2&gt;

&lt;p&gt;The EAV pattern solved the immediate problem.&lt;br&gt;
But it introduced new ones that Oran hasn't solved yet:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The permission problem.&lt;/strong&gt;&lt;br&gt;
QA should not see Engineering's process parameters.&lt;br&gt;
Engineering should not see QA's internal scoring.&lt;br&gt;
The current system has no row-level permissions.&lt;br&gt;
Everyone can query everything.&lt;br&gt;
Oran knows exactly how to fix this.&lt;br&gt;
He wrote a guide about it.&lt;br&gt;
Nobody has read it yet.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The spec versioning problem.&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;attribute_definitions&lt;/code&gt; tracks when each key's meaning changed.&lt;br&gt;
But querying "what did this batch comply with, at the time of production"&lt;br&gt;
still requires careful joins that are easy to get wrong.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The real-time problem.&lt;/strong&gt;&lt;br&gt;
Everything is batch import. Every four hours.&lt;br&gt;
Engineering wants live process data from the machines.&lt;br&gt;
That's a stream. That's a different architecture.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The customer portal.&lt;/strong&gt;&lt;br&gt;
The big customer now wants direct access.&lt;br&gt;
Not a report. A live portal. Their login. Their data only.&lt;br&gt;
By end of Q3.&lt;/p&gt;

&lt;p&gt;Oran opened his notebook to a fresh page.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Phase 2,&lt;/em&gt; he wrote.&lt;/p&gt;

&lt;p&gt;Then he started a new list.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;← &lt;a href="https://dev.to/syslayer/coding-cat-oran-s2-ep1-the-excel-republic-5g15"&gt;Ep1: The Excel Republic&lt;/a&gt;&lt;/em&gt;&lt;br&gt;
&lt;em&gt;← &lt;a href="https://dev.to/syslayer/-coding-cat-oran-s2-ep2-the-big-customer-pp"&gt;Ep2: The Big Customer&lt;/a&gt;&lt;/em&gt;&lt;br&gt;
&lt;em&gt;← &lt;a href="https://dev.to/syslayer/coding-cat-oran-s2-ep3-the-auditor-arrives-mfo"&gt;Ep3: The Auditor Arrives&lt;/a&gt;&lt;/em&gt; · &lt;a href="https://dev.to/syslayer/coding-cat-oran-s2-ep4-the-voluntary-table-4dkf"&gt;Ep4&lt;/a&gt; · &lt;a href="https://dev.to/syslayer/coding-cat-oran-s2-ep5-the-many-to-many-disaster-22jo"&gt;Ep5&lt;/a&gt;*&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Coding Cat Oran is a serialized fiction about building real production systems inside real companies.&lt;/em&gt;&lt;br&gt;
&lt;em&gt;The EAV schema is real. The gateway pattern is real. The Excel file on the handover desk is very, very real.&lt;/em&gt;&lt;br&gt;
&lt;em&gt;The cat is fictional. Phase 2 is not.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;By &lt;a href="https://syslayer.gumroad.com" rel="noopener noreferrer"&gt;SysLayer&lt;/a&gt; · &lt;a href="https://dev.to/syslayer"&gt;dev.to/syslayer&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;




</description>
      <category>webdev</category>
      <category>sql</category>
      <category>career</category>
      <category>database</category>
    </item>
    <item>
      <title>Coding Cat Oran S2 Ep5 — The Many-to-Many Disaster</title>
      <dc:creator>SysLayer</dc:creator>
      <pubDate>Fri, 15 May 2026 17:18:44 +0000</pubDate>
      <link>https://dev.to/syslayer/coding-cat-oran-s2-ep5-the-many-to-many-disaster-22jo</link>
      <guid>https://dev.to/syslayer/coding-cat-oran-s2-ep5-the-many-to-many-disaster-22jo</guid>
      <description>&lt;p&gt;&lt;em&gt;The report table is agreed. No one is responsible for it.&lt;br&gt;
This is a different problem.&lt;/em&gt;&lt;/p&gt;



&lt;p&gt;The table looked clean on the whiteboard.&lt;/p&gt;

&lt;p&gt;Seventeen columns. One row per batch.&lt;br&gt;
Every department's data, agreed, signed, version-numbered.&lt;/p&gt;

&lt;p&gt;Oran had been looking at it for three days.&lt;br&gt;
He had a document called &lt;em&gt;Problems with this table.&lt;/em&gt;&lt;br&gt;
It had eleven items in it now.&lt;br&gt;
He was still finding more.&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;Problem 1: One batch, many inspections.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;QA inspects at three stages: incoming material, in-process, and final.&lt;br&gt;
Each stage produces a separate inspection record.&lt;br&gt;
Each record has its own result, its own inspector, its own timestamp.&lt;/p&gt;

&lt;p&gt;The current table has one row per batch.&lt;br&gt;
One &lt;code&gt;inspection_result&lt;/code&gt; column. One &lt;code&gt;inspector_id&lt;/code&gt;. One &lt;code&gt;inspected_at&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Which inspection result goes in the row?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Oran sent an email to QA.&lt;/p&gt;

&lt;p&gt;QA replied: &lt;em&gt;"Show the final result. That's the one that matters."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Oran replied: &lt;em&gt;"What if the final result is pass but the in-process result was fail and there's no record of what corrective action was taken?"&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;QA did not reply for two days.&lt;br&gt;
Then they replied: &lt;em&gt;"That's a good point. We'll discuss internally."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Three days later: &lt;em&gt;"Can you just add three columns? One per stage."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Oran looked at the table.&lt;br&gt;
He added three columns.&lt;br&gt;
He stared at them.&lt;/p&gt;

&lt;p&gt;Product A has three inspection stages.&lt;br&gt;
Product B has four.&lt;br&gt;
Product C has two, but the second one is optional depending on customer requirements.&lt;br&gt;
The new product line launching in Q3 has a stage that doesn't exist yet.&lt;/p&gt;

&lt;p&gt;He deleted the three columns.&lt;br&gt;
He opened a new file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="c1"&gt;-- This cannot be one table.&lt;/span&gt;
&lt;span class="c1"&gt;-- This is at least two tables.&lt;/span&gt;

&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="n"&gt;production_batches&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="n"&gt;batch_id&lt;/span&gt;     &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;PRIMARY&lt;/span&gt; &lt;span class="k"&gt;KEY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;product_code&lt;/span&gt; &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;NOT&lt;/span&gt; &lt;span class="k"&gt;NULL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;...&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="n"&gt;inspection_results&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="n"&gt;result_id&lt;/span&gt;    &lt;span class="nb"&gt;BIGINT&lt;/span&gt; &lt;span class="k"&gt;PRIMARY&lt;/span&gt; &lt;span class="k"&gt;KEY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;batch_id&lt;/span&gt;     &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;REFERENCES&lt;/span&gt; &lt;span class="n"&gt;production_batches&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;batch_id&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="n"&gt;stage&lt;/span&gt;        &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;       &lt;span class="c1"&gt;-- 'incoming' / 'in_process' / 'final'&lt;/span&gt;
  &lt;span class="k"&gt;result&lt;/span&gt;       &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;       &lt;span class="c1"&gt;-- 'pass' / 'fail' / 'conditional'&lt;/span&gt;
  &lt;span class="n"&gt;inspector_id&lt;/span&gt; &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="n"&gt;inspected_at&lt;/span&gt; &lt;span class="nb"&gt;DATETIME&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;notes&lt;/span&gt;        &lt;span class="nb"&gt;TEXT&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;He sent this to QA.&lt;br&gt;
QA said: &lt;em&gt;"That looks more complicated."&lt;/em&gt;&lt;br&gt;
Oran said: &lt;em&gt;"It is more complicated. That's because the data is more complicated."&lt;/em&gt;&lt;br&gt;
QA said: &lt;em&gt;"Can we think about this after the audit?"&lt;/em&gt;&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;Problem 2: One material lot, many batches. One batch, many material lots.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This one took Oran a morning to find&lt;br&gt;
and an afternoon to fully understand why it was a problem.&lt;/p&gt;

&lt;p&gt;A production batch uses multiple raw materials.&lt;br&gt;
Each raw material comes from a specific lot.&lt;br&gt;
Each lot has its own supplier, its own incoming inspection record,&lt;br&gt;
its own certificate of conformance.&lt;/p&gt;

&lt;p&gt;For traceability — which is the entire point of this system —&lt;br&gt;
you need to be able to answer: &lt;em&gt;if a defect is found in the field,&lt;br&gt;
which material lot might have caused it?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The current table has one column: &lt;code&gt;material_lot_no&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;One column, one lot.&lt;br&gt;
Reality: three to seven lots per batch, depending on the product.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="c1"&gt;-- Also cannot be one table.&lt;/span&gt;
&lt;span class="c1"&gt;-- This is a junction table.&lt;/span&gt;

&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="n"&gt;batch_material_lots&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="n"&gt;batch_id&lt;/span&gt;       &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;REFERENCES&lt;/span&gt; &lt;span class="n"&gt;production_batches&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;batch_id&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="n"&gt;lot_no&lt;/span&gt;         &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;REFERENCES&lt;/span&gt; &lt;span class="n"&gt;material_lots&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;lot_no&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="n"&gt;quantity_used&lt;/span&gt;  &lt;span class="nb"&gt;DECIMAL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="n"&gt;unit&lt;/span&gt;           &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="k"&gt;PRIMARY&lt;/span&gt; &lt;span class="k"&gt;KEY&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;batch_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;lot_no&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Oran sent this to Manufacturing.&lt;br&gt;
Manufacturing said: &lt;em&gt;"We don't track it that granularly."&lt;/em&gt;&lt;br&gt;
Oran said: &lt;em&gt;"The audit requires traceability to material lot level."&lt;/em&gt;&lt;br&gt;
Manufacturing said: &lt;em&gt;"We'll start tracking it."&lt;/em&gt;&lt;br&gt;
Oran said: &lt;em&gt;"When?"&lt;/em&gt;&lt;br&gt;
Manufacturing said: &lt;em&gt;"We'll discuss internally."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;That was eight days ago.&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;Problem 3: The spec that changed.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This one Oran found by accident.&lt;/p&gt;

&lt;p&gt;He was reviewing historical data to understand the migration scope&lt;br&gt;
when he noticed that Product A's defect threshold&lt;br&gt;
was different in the records from fourteen months ago&lt;br&gt;
versus the records from six months ago.&lt;/p&gt;

&lt;p&gt;He checked the spec document.&lt;br&gt;
Current version: defect rate threshold 2.0%.&lt;br&gt;
He went looking for the previous version.&lt;/p&gt;

&lt;p&gt;It existed in an email chain.&lt;br&gt;
Sent by the previous Engineering manager.&lt;br&gt;
Who had left the company.&lt;br&gt;
Eleven months ago.&lt;/p&gt;

&lt;p&gt;Previous threshold: 3.5%.&lt;/p&gt;

&lt;p&gt;Which means: batches that were compliant under the old spec&lt;br&gt;
are non-compliant under the new spec.&lt;br&gt;
And batches from the transition period —&lt;br&gt;
when the spec changed but the system wasn't updated —&lt;br&gt;
are recorded against the wrong threshold.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Compliant against which version?&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="c1"&gt;-- The spec is not a column.&lt;/span&gt;
&lt;span class="c1"&gt;-- The spec is a table.&lt;/span&gt;
&lt;span class="c1"&gt;-- With versions.&lt;/span&gt;

&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="n"&gt;product_specs&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="n"&gt;spec_id&lt;/span&gt;        &lt;span class="nb"&gt;BIGINT&lt;/span&gt; &lt;span class="k"&gt;PRIMARY&lt;/span&gt; &lt;span class="k"&gt;KEY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;product_code&lt;/span&gt;   &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="k"&gt;version&lt;/span&gt;        &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="n"&gt;effective_from&lt;/span&gt; &lt;span class="nb"&gt;DATE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;effective_to&lt;/span&gt;   &lt;span class="nb"&gt;DATE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;          &lt;span class="c1"&gt;-- NULL means current&lt;/span&gt;
  &lt;span class="n"&gt;defect_threshold&lt;/span&gt; &lt;span class="nb"&gt;DECIMAL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="n"&gt;created_by&lt;/span&gt;     &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="n"&gt;notes&lt;/span&gt;          &lt;span class="nb"&gt;TEXT&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;-- And the inspection result needs to reference the spec version&lt;/span&gt;
&lt;span class="c1"&gt;-- that was in effect at the time of inspection.&lt;/span&gt;
&lt;span class="c1"&gt;-- Not the current spec.&lt;/span&gt;
&lt;span class="c1"&gt;-- The spec that existed on that date.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Oran sent this to Engineering.&lt;br&gt;
Engineering said: &lt;em&gt;"That's a lot of tables."&lt;/em&gt;&lt;br&gt;
Oran said: &lt;em&gt;"Yes."&lt;/em&gt;&lt;br&gt;
Engineering said: &lt;em&gt;"Can we just use the current spec for everything?"&lt;/em&gt;&lt;br&gt;
Oran said: &lt;em&gt;"Then the historical data is inaccurate."&lt;/em&gt;&lt;br&gt;
Engineering said: &lt;em&gt;"Is that a problem for the audit?"&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Oran looked at his notebook.&lt;br&gt;
He thought about Ms. Chen and her iPad.&lt;br&gt;
He thought about the word &lt;em&gt;traceability.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;"Yes,"&lt;/em&gt; he said. &lt;em&gt;"It is a problem for the audit."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Engineering said: &lt;em&gt;"We'll discuss internally."&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;The status meeting, Day 47.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The CEO asked for an update.&lt;/p&gt;

&lt;p&gt;Oran presented the schema.&lt;br&gt;
Not the whiteboard table. The real schema.&lt;br&gt;
Six tables. Fourteen relationships. Three pages of documentation.&lt;/p&gt;

&lt;p&gt;The VP of Manufacturing said:&lt;br&gt;
&lt;em&gt;"I thought we agreed on one table."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Oran said:&lt;br&gt;
&lt;em&gt;"We agreed on what data to capture.&lt;br&gt;
The structure needed to change to capture it correctly."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The VP of QA said:&lt;br&gt;
&lt;em&gt;"Who is responsible for making sure the data gets into this system?"&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The room looked at Oran.&lt;/p&gt;

&lt;p&gt;Oran looked at his notebook.&lt;br&gt;
He found the page from Day 1.&lt;br&gt;
He read it out loud:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;"Passive cooperation is not cooperation.&lt;br&gt;
If a department does not submit data by the agreed date,&lt;br&gt;
the project is blocked.&lt;br&gt;
That is a management issue, not an IT issue."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;He looked up.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;"This was agreed. It was signed. The submission deadline for Production data was Day 40.&lt;br&gt;
Today is Day 47. I have not received Production's historical data."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The VP of Manufacturing smiled.&lt;br&gt;
&lt;em&gt;"We've been very busy. We'll get it to you."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Oran wrote the date in his notebook.&lt;br&gt;
He put a small star next to it.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;A report that everyone agreed on&lt;br&gt;
and no one was responsible for&lt;br&gt;
is not a report.&lt;br&gt;
It is a beautiful, shared, distributed lie.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The schema was right now.&lt;br&gt;
The data was still in the drawers.&lt;br&gt;
Day 47 of 90.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Next: Ep6 — The Abstract Table and the Gateway&lt;/strong&gt;&lt;br&gt;
&lt;em&gt;Day 87. Three days before re-audit.&lt;br&gt;
The departments are still in a meeting about column names.&lt;br&gt;
Oran is in the server room with three tables and a whiteboard.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;While everyone argued, IT built the thing anyway.&lt;/em&gt;&lt;br&gt;
&lt;em&gt;It wasn't perfect. It was enough.&lt;/em&gt;&lt;br&gt;
&lt;em&gt;For now.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;← &lt;a href="https://dev.to/syslayer/coding-cat-oran-s2-ep1-the-excel-republic-5g15"&gt;Ep1: The Excel Republic&lt;/a&gt;&lt;/em&gt;&lt;br&gt;
&lt;em&gt;← &lt;a href="https://dev.to/syslayer/-coding-cat-oran-s2-ep2-the-big-customer-pp"&gt;Ep2: The Big Customer&lt;/a&gt;&lt;/em&gt;&lt;br&gt;
&lt;em&gt;← &lt;a href="https://dev.to/syslayer/coding-cat-oran-s2-ep3-the-auditor-arrives-mfo"&gt;Ep3: The Auditor Arrives&lt;/a&gt;&lt;/em&gt; &lt;a href="https://dev.to/syslayer/coding-cat-oran-s2-ep4-the-voluntary-table-4dkf"&gt;Ep4&lt;/a&gt;*&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Coding Cat Oran is a serialized fiction about building real production systems inside real companies.&lt;/em&gt;&lt;br&gt;
&lt;em&gt;The one-to-many relationships are real. The many-to-many relationships are real.&lt;/em&gt;&lt;br&gt;
&lt;em&gt;The spec that changed with no documentation is, unfortunately, extremely real.&lt;/em&gt;&lt;br&gt;
&lt;em&gt;The cat is fictional.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;By &lt;a href="https://syslayer.gumroad.com" rel="noopener noreferrer"&gt;SysLayer&lt;/a&gt; · &lt;a href="https://dev.to/syslayer"&gt;dev.to/syslayer&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;




</description>
      <category>webdev</category>
      <category>database</category>
      <category>sql</category>
      <category>career</category>
    </item>
    <item>
      <title>Coding Cat Oran S2 Ep4 — The Voluntary Table</title>
      <dc:creator>SysLayer</dc:creator>
      <pubDate>Fri, 15 May 2026 17:18:33 +0000</pubDate>
      <link>https://dev.to/syslayer/coding-cat-oran-s2-ep4-the-voluntary-table-4dkf</link>
      <guid>https://dev.to/syslayer/coding-cat-oran-s2-ep4-the-voluntary-table-4dkf</guid>
      <description>&lt;p&gt;&lt;em&gt;No department wanted to think about the whole picture.&lt;br&gt;
Then they sat in a room with a deadline and no escape.&lt;br&gt;
Oran said nothing. That was the point.&lt;/em&gt;&lt;/p&gt;



&lt;p&gt;The CEO gave them a room, a whiteboard, and a deadline.&lt;/p&gt;

&lt;p&gt;"Figure out what the audit report needs to contain.&lt;br&gt;
You have until noon."&lt;/p&gt;

&lt;p&gt;Then he left.&lt;/p&gt;

&lt;p&gt;Four department heads. One Oran, in the corner, with a notebook.&lt;/p&gt;

&lt;p&gt;Oran opened his notebook and wrote the date.&lt;br&gt;
Then he put his pen down.&lt;br&gt;
Then he waited.&lt;/p&gt;



&lt;p&gt;It started the way these things always start.&lt;/p&gt;

&lt;p&gt;Production spoke first.&lt;br&gt;
They wanted the report to show output numbers.&lt;br&gt;
Units produced. Units shipped. On-time delivery rate.&lt;br&gt;
Numbers that make Production look like the engine of the company,&lt;br&gt;
which it is,&lt;br&gt;
which is also why they wanted to control which numbers appeared.&lt;/p&gt;

&lt;p&gt;QA spoke second.&lt;br&gt;
They wanted defect rates. Inspection pass/fail ratios.&lt;br&gt;
Yield by product line. Corrective action response times.&lt;br&gt;
Numbers that make QA look like the guardian of the company,&lt;br&gt;
which it is,&lt;br&gt;
which is also why they wanted to control which numbers appeared.&lt;/p&gt;

&lt;p&gt;Engineering spoke third.&lt;br&gt;
Process parameters. Spec compliance rates. Deviation reports.&lt;br&gt;
Numbers that make Engineering look like the brain of the company,&lt;br&gt;
which it is,&lt;br&gt;
which is also why they wanted to control which numbers appeared.&lt;/p&gt;

&lt;p&gt;Each department presented their version of the report.&lt;br&gt;
Each version was a document that made their department look correct&lt;br&gt;
and made it structurally impossible&lt;br&gt;
to see anyone else's data in context.&lt;/p&gt;

&lt;p&gt;For forty minutes, they argued.&lt;/p&gt;

&lt;p&gt;Oran wrote in his notebook. He did not look up.&lt;/p&gt;



&lt;p&gt;Then something happened.&lt;/p&gt;

&lt;p&gt;Nobody remembers who said it.&lt;br&gt;
This is important. This is why it worked.&lt;/p&gt;

&lt;p&gt;Someone — it might have been QA, it might have been Engineering,&lt;br&gt;
it definitely wasn't Manufacturing — said:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;"What does the customer need to see?"&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The room went quiet.&lt;/p&gt;

&lt;p&gt;Not the hostile quiet of a meeting that's going badly.&lt;br&gt;
The different quiet of a room that has just heard&lt;br&gt;
the question it was supposed to be answering all along.&lt;/p&gt;



&lt;p&gt;Slowly — without anyone declaring it,&lt;br&gt;
without anyone taking credit for it,&lt;br&gt;
without anyone formally proposing it —&lt;br&gt;
they started building a table together.&lt;/p&gt;

&lt;p&gt;What goes in each row.&lt;br&gt;
One row per production batch.&lt;/p&gt;

&lt;p&gt;What goes in each column.&lt;br&gt;
Batch ID. Product code. Start time. End time. Shift.&lt;br&gt;
Output quantity. Defect count. Defect type.&lt;br&gt;
Process parameter: temperature. Process parameter: pressure.&lt;br&gt;
Inspection result. Inspector ID. Inspection timestamp.&lt;br&gt;
Material lot number. Material supplier.&lt;/p&gt;

&lt;p&gt;What links the pieces together.&lt;br&gt;
The batch ID appears in Manufacturing's records,&lt;br&gt;
in QA's inspection log,&lt;br&gt;
in Engineering's process data.&lt;br&gt;
That's the key. That's always been the key.&lt;br&gt;
Nobody had written it down before.&lt;/p&gt;

&lt;p&gt;By 11:45, there was a proposal on the whiteboard.&lt;br&gt;
One table. Every department's data. One shared structure.&lt;br&gt;
Not perfect. Not complete.&lt;br&gt;
But agreed.&lt;/p&gt;

&lt;p&gt;Oran had filled three pages of notes.&lt;/p&gt;

&lt;p&gt;He had said nothing.&lt;/p&gt;



&lt;p&gt;After the meeting, the VP of Manufacturing stopped him in the hallway.&lt;/p&gt;

&lt;p&gt;"You didn't say a single word in there."&lt;/p&gt;

&lt;p&gt;Oran nodded.&lt;/p&gt;

&lt;p&gt;"That was intentional, wasn't it."&lt;/p&gt;

&lt;p&gt;It wasn't a question.&lt;/p&gt;

&lt;p&gt;Oran thought about how to answer.&lt;/p&gt;

&lt;p&gt;The honest answer was: &lt;em&gt;yes.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Because Oran had learned something over two years of trying to get departments&lt;br&gt;
to agree on data structures:&lt;/p&gt;

&lt;p&gt;The moment IT proposes the schema,&lt;br&gt;
it becomes IT's schema.&lt;br&gt;
IT's problem. IT's fault when it's wrong.&lt;br&gt;
IT's responsibility to defend in every meeting forever.&lt;/p&gt;

&lt;p&gt;But if the departments build it —&lt;br&gt;
if they argue their way to it,&lt;br&gt;
if they write the column names on the whiteboard with their own hands —&lt;br&gt;
it becomes &lt;em&gt;their&lt;/em&gt; schema.&lt;br&gt;
They own it.&lt;br&gt;
They have to live with it.&lt;br&gt;
They are much less likely to quietly ignore a system&lt;br&gt;
they helped design.&lt;/p&gt;

&lt;p&gt;The best system design meeting Oran ever attended&lt;br&gt;
was the one where he didn't design anything.&lt;/p&gt;

&lt;p&gt;He just made sure everyone was in the same room,&lt;br&gt;
with the same deadline,&lt;br&gt;
and no escape route.&lt;/p&gt;



&lt;p&gt;That afternoon, Oran transcribed the whiteboard into a document.&lt;br&gt;
He sent it to all four department heads with one line:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Please confirm this reflects the agreement from this morning's meeting.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Three confirmations came back within the hour.&lt;br&gt;
The fourth came back the next morning,&lt;br&gt;
with two small changes to column names&lt;br&gt;
that didn't change anything structurally&lt;br&gt;
but allowed the VP of Manufacturing to feel&lt;br&gt;
that he had contributed.&lt;/p&gt;

&lt;p&gt;Oran accepted both changes.&lt;br&gt;
He updated the document.&lt;br&gt;
He added a version number.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;v1.0. Agreed. Dated.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Then he opened a new file and started writing the actual schema.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="n"&gt;production_summary&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="n"&gt;batch_id&lt;/span&gt;           &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="k"&gt;PRIMARY&lt;/span&gt; &lt;span class="k"&gt;KEY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;product_code&lt;/span&gt;       &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="k"&gt;NOT&lt;/span&gt; &lt;span class="k"&gt;NULL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;line_id&lt;/span&gt;            &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="k"&gt;NOT&lt;/span&gt; &lt;span class="k"&gt;NULL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;shift&lt;/span&gt;              &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="k"&gt;NOT&lt;/span&gt; &lt;span class="k"&gt;NULL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;start_time&lt;/span&gt;         &lt;span class="nb"&gt;DATETIME&lt;/span&gt;     &lt;span class="k"&gt;NOT&lt;/span&gt; &lt;span class="k"&gt;NULL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;end_time&lt;/span&gt;           &lt;span class="nb"&gt;DATETIME&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;output_qty&lt;/span&gt;         &lt;span class="nb"&gt;INT&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;defect_count&lt;/span&gt;       &lt;span class="nb"&gt;INT&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;defect_type&lt;/span&gt;        &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="n"&gt;process_temp&lt;/span&gt;       &lt;span class="nb"&gt;DECIMAL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="n"&gt;process_pressure&lt;/span&gt;   &lt;span class="nb"&gt;DECIMAL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="n"&gt;inspection_result&lt;/span&gt;  &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="n"&gt;inspector_id&lt;/span&gt;       &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="n"&gt;inspected_at&lt;/span&gt;       &lt;span class="nb"&gt;DATETIME&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;material_lot_no&lt;/span&gt;    &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="n"&gt;material_supplier&lt;/span&gt;  &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;He looked at the table for a long time.&lt;/p&gt;

&lt;p&gt;Then he opened a new document and wrote at the top:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Problems with this table.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;And started listing them.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;The best system design meeting Oran ever attended&lt;br&gt;
was the one where he didn't design anything.&lt;br&gt;
He just made sure everyone was in the same room&lt;br&gt;
with the same deadline and no escape route.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The table they built had seventeen problems.&lt;br&gt;
He would discover them one by one&lt;br&gt;
over the next two weeks.&lt;br&gt;
But it was their table.&lt;br&gt;
And that mattered more than he could explain.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Next: Ep5 — The Many-to-Many Disaster&lt;/strong&gt;&lt;br&gt;
&lt;em&gt;The report table is agreed. No one is responsible for it.&lt;br&gt;
One batch. Multiple inspection results.&lt;br&gt;
One material lot. Multiple batches.&lt;br&gt;
One spec. Two versions. No migration plan.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Oran discovers that a table everyone agreed on&lt;br&gt;
and no one is responsible for&lt;br&gt;
is not a table.&lt;br&gt;
It is a beautiful, shared, distributed lie.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;← &lt;a href="https://dev.to/syslayer/coding-cat-oran-s2-ep1-the-excel-republic-5g15"&gt;Ep1: The Excel Republic&lt;/a&gt;&lt;/em&gt;&lt;br&gt;
&lt;em&gt;← &lt;a href="https://dev.to/syslayer/-coding-cat-oran-s2-ep2-the-big-customer-pp"&gt;Ep2: The Big Customer&lt;/a&gt;&lt;/em&gt;&lt;br&gt;
&lt;em&gt;← &lt;a href="https://dev.to/syslayer/coding-cat-oran-s2-ep3-the-auditor-arrives-mfo"&gt;Ep3: The Auditor Arrives&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Coding Cat Oran is a serialized fiction about building real production systems inside real companies.&lt;/em&gt;&lt;br&gt;
&lt;em&gt;The politics are real. The whiteboard is real. The cat is fictional.&lt;/em&gt;&lt;br&gt;
&lt;em&gt;The VP of Manufacturing is, unfortunately, also real.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;By &lt;a href="https://syslayer.gumroad.com" rel="noopener noreferrer"&gt;SysLayer&lt;/a&gt; · &lt;a href="https://dev.to/syslayer"&gt;dev.to/syslayer&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;




</description>
      <category>webdev</category>
      <category>database</category>
      <category>sql</category>
      <category>career</category>
    </item>
    <item>
      <title>Coding Cat Oran S2 Ep3 — The Auditor Arrives</title>
      <dc:creator>SysLayer</dc:creator>
      <pubDate>Tue, 12 May 2026 03:48:43 +0000</pubDate>
      <link>https://dev.to/syslayer/coding-cat-oran-s2-ep3-the-auditor-arrives-mfo</link>
      <guid>https://dev.to/syslayer/coding-cat-oran-s2-ep3-the-auditor-arrives-mfo</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1aesrddvociesmffoety.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1aesrddvociesmffoety.png" alt=" " width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;She doesn't look at the machines.&lt;br&gt;
She looks at the filing cabinets.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;Her name is Ms. Chen.&lt;/p&gt;

&lt;p&gt;She arrives at 9am with a rolling carry-on bag,&lt;br&gt;
an iPad in a hard case,&lt;br&gt;
and the specific kind of calm that belongs to people&lt;br&gt;
who have seen this before.&lt;/p&gt;

&lt;p&gt;Many times before.&lt;/p&gt;




&lt;p&gt;The plant manager gives her a tour.&lt;br&gt;
New equipment. Clean floors. Calibrated instruments.&lt;br&gt;
He is proud of the production line.&lt;br&gt;
He should be. It's good work.&lt;/p&gt;

&lt;p&gt;Ms. Chen walks the line for two hours.&lt;br&gt;
She says nothing.&lt;br&gt;
She writes nothing on her iPad.&lt;/p&gt;

&lt;p&gt;Then she turns to the plant manager and says:&lt;br&gt;
&lt;em&gt;"I'd like to see the production records. All of them. Going back eighteen months."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The plant manager smiles.&lt;br&gt;
He has been preparing for this question.&lt;br&gt;
He did not prepare for the answer to be complicated.&lt;/p&gt;




&lt;p&gt;Here is what Ms. Chen finds:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The production floor:&lt;/strong&gt; acceptable.&lt;br&gt;
&lt;strong&gt;The equipment:&lt;/strong&gt; calibrated, documented, within spec.&lt;br&gt;
&lt;strong&gt;The documentation:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Batch records exist in three formats across four departments.&lt;/em&gt;&lt;br&gt;
No single record contains the full picture of any batch.&lt;br&gt;
To trace one production run from raw material to finished goods,&lt;br&gt;
you would need to:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Find the batch number in Manufacturing's daily log (Excel, by shift, by month, one file per month, stored on the shift supervisor's PC)&lt;/li&gt;
&lt;li&gt;Cross-reference with QA's inspection log (different Excel format, different batch number convention, stored on the QA lead's laptop)&lt;/li&gt;
&lt;li&gt;Find the process parameters in Engineering's test folder (password protected; the VP is in a meeting)&lt;/li&gt;
&lt;li&gt;Locate the material lot number in the incoming inspection binder (physical binder, shelf B3, organized by receipt date, not by lot number)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Ms. Chen does not do all of this.&lt;br&gt;
She does enough of it to write, in the Notes field of her iPad:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Traceability: not demonstrated.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;She meets with the CEO at 2pm.&lt;/p&gt;

&lt;p&gt;She is direct. She is not unkind.&lt;/p&gt;

&lt;p&gt;"Your production capability is real," she says.&lt;br&gt;
"Your quality control process is real.&lt;br&gt;
Your documentation system&lt;br&gt;
is not a system.&lt;br&gt;
It is hope organized into folders."&lt;/p&gt;

&lt;p&gt;She opens her iPad and reads from the checklist:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Single source of truth for production data: &lt;strong&gt;Not met.&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Traceability from raw material to finished goods: &lt;strong&gt;Not met.&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Audit trail for process parameter changes: &lt;strong&gt;Not met.&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Data stored in auditable, non-editable system: &lt;strong&gt;Not met.&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;"You have ninety days," she says.&lt;br&gt;
"If these items are addressed at re-audit,&lt;br&gt;
we proceed with the contract.&lt;br&gt;
If not—"&lt;/p&gt;

&lt;p&gt;She doesn't finish the sentence.&lt;br&gt;
She doesn't need to.&lt;/p&gt;




&lt;p&gt;The emergency meeting is Monday, 8am.&lt;br&gt;
All senior managers. No exceptions.&lt;/p&gt;

&lt;p&gt;The CEO does not raise his voice.&lt;br&gt;
He doesn't need to.&lt;/p&gt;

&lt;p&gt;He says: &lt;em&gt;"Everything goes into a database. Oran is the project manager."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Then he looks at Oran.&lt;/p&gt;

&lt;p&gt;Oran has been in this company for two years.&lt;br&gt;
He has fixed the printers.&lt;br&gt;
He has recovered someone's corrupted Excel file at 11pm.&lt;br&gt;
He has set up the WiFi in the new warehouse.&lt;/p&gt;

&lt;p&gt;He has never been a project manager.&lt;/p&gt;

&lt;p&gt;He has also never wanted to be one.&lt;/p&gt;

&lt;p&gt;But he has been taking notes since this meeting started,&lt;br&gt;
and he has been thinking about this problem since the yield rate argument&lt;br&gt;
three months ago,&lt;br&gt;
and he knows — with the specific certainty that comes from&lt;br&gt;
having already tried to do the thing the wrong way —&lt;br&gt;
that there is no version of this that works&lt;br&gt;
if IT just builds a database and waits for departments to fill it.&lt;/p&gt;

&lt;p&gt;So before he says yes,&lt;br&gt;
he stands up.&lt;/p&gt;

&lt;p&gt;He writes three things on the whiteboard.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;1. The timeline is IT's decision.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;"The audit deadline is ninety days from today.&lt;br&gt;
That does not mean the system is delivered in ninety days.&lt;br&gt;
That means the system is delivered in whatever time it takes to build it correctly,&lt;br&gt;
and the scope is defined by what can be done correctly,&lt;br&gt;
not by what the deadline demands.&lt;br&gt;
If the scope doesn't fit the timeline,&lt;br&gt;
that is a conversation about scope.&lt;br&gt;
Not about overtime."&lt;/p&gt;

&lt;p&gt;The VP of Engineering shifts in his seat.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;2. Resourcing is non-negotiable.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;"I need two additional developers.&lt;br&gt;
I need budget for tooling — database licenses, server infrastructure, testing environment.&lt;br&gt;
I am one person. One person cannot build a traceability system for six product lines&lt;br&gt;
in ninety days and also answer the help desk tickets&lt;br&gt;
and also be in four status meetings a week."&lt;/p&gt;

&lt;p&gt;The VP of Manufacturing starts to say something.&lt;br&gt;
Oran continues.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;3. Passive cooperation is not cooperation.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;"Every department will have data submission deadlines.&lt;br&gt;
If a department does not submit data by the agreed date,&lt;br&gt;
the project is blocked.&lt;br&gt;
That is documented as a management issue,&lt;br&gt;
not an IT issue.&lt;br&gt;
I will not absorb delays caused by other departments.&lt;br&gt;
I will document them and escalate them."&lt;/p&gt;

&lt;p&gt;He looks at the room.&lt;/p&gt;

&lt;p&gt;"I want this in writing.&lt;br&gt;
Signed.&lt;br&gt;
Before the project starts."&lt;/p&gt;




&lt;p&gt;The room is quiet for a moment.&lt;/p&gt;

&lt;p&gt;Then the VP of QA says: &lt;em&gt;"I think that's reasonable."&lt;/em&gt;&lt;br&gt;
The VP of Engineering says nothing, which Oran writes down.&lt;br&gt;
The VP of Manufacturing smiles — the specific smile of someone&lt;br&gt;
who has already decided what they are going to do&lt;br&gt;
and it is not what they are about to say —&lt;br&gt;
and says: &lt;em&gt;"Of course. We'll cooperate fully."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Oran writes that down too.&lt;br&gt;
He writes the date next to it.&lt;br&gt;
He puts a small star next to the VP of Manufacturing's name.&lt;/p&gt;

&lt;p&gt;The CEO looks at Oran for a long moment.&lt;br&gt;
Then he nods once.&lt;/p&gt;

&lt;p&gt;"Ninety days," he says. "Make it work."&lt;/p&gt;




&lt;p&gt;After the meeting, Oran walks back to his desk.&lt;br&gt;
He opens his notebook to a fresh page.&lt;br&gt;
At the top he writes:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Day 1.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Below it:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Things that are true:&lt;/em&gt;&lt;br&gt;
&lt;em&gt;— The system doesn't exist yet.&lt;/em&gt;&lt;br&gt;
&lt;em&gt;— The data is in twelve drawers.&lt;/em&gt;&lt;br&gt;
&lt;em&gt;— Three departments will say they're cooperating.&lt;/em&gt;&lt;br&gt;
&lt;em&gt;— Two of them mean it.&lt;/em&gt;&lt;br&gt;
&lt;em&gt;— The one who doesn't will be the most enthusiastic in every meeting.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;He draws a line.&lt;/p&gt;

&lt;p&gt;Below the line:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Things I can control:&lt;/em&gt;&lt;br&gt;
&lt;em&gt;— What I agree to.&lt;/em&gt;&lt;br&gt;
&lt;em&gt;— What I document.&lt;/em&gt;&lt;br&gt;
&lt;em&gt;— What I build.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;He looks at that list for a while.&lt;/p&gt;

&lt;p&gt;Then he opens his laptop and starts writing the schema.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;The battle for the data hadn't started yet.&lt;br&gt;
But Oran had just made sure that when it did,&lt;br&gt;
he would not be the one who lost it alone.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Next: Ep4 — The Voluntary Table&lt;/strong&gt;&lt;br&gt;
&lt;em&gt;No department wanted to think about the whole picture.&lt;br&gt;
Then they sat in a room with a deadline and no escape.&lt;br&gt;
Oran said nothing. That was the point.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;← &lt;a href="https://dev.to/syslayer/coding-cat-oran-s2-ep1-the-excel-republic-5g15"&gt;Ep1: The Excel Republic&lt;/a&gt;&lt;/em&gt;&lt;br&gt;
&lt;em&gt;← &lt;a href="https://dev.to/syslayer/-coding-cat-oran-s2-ep2-the-big-customer-pp"&gt;Ep2: The Big Customer&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Coding Cat Oran is a serialized fiction about building real production systems inside real companies.&lt;/em&gt;&lt;br&gt;
&lt;em&gt;The audits are real. The ninety days are real. The cat is fictional.&lt;/em&gt;&lt;br&gt;
&lt;em&gt;The VP of Manufacturing is, unfortunately, also real.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;By &lt;a href="https://syslayer.gumroad.com" rel="noopener noreferrer"&gt;SysLayer&lt;/a&gt; · &lt;a href="https://dev.to/syslayer"&gt;dev.to/syslayer&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>career</category>
      <category>sql</category>
      <category>database</category>
    </item>
    <item>
      <title>Coding Cat Oran S2 Ep2 — The Big Customer</title>
      <dc:creator>SysLayer</dc:creator>
      <pubDate>Sun, 10 May 2026 11:09:28 +0000</pubDate>
      <link>https://dev.to/syslayer/-coding-cat-oran-s2-ep2-the-big-customer-pp</link>
      <guid>https://dev.to/syslayer/-coding-cat-oran-s2-ep2-the-big-customer-pp</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe5sby2kbg211r0vq2u00.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe5sby2kbg211r0vq2u00.png" alt=" " width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The contract that changes everything is almost signed.&lt;br&gt;
Every department says yes. Every department means no.&lt;/em&gt;&lt;/p&gt;



&lt;p&gt;The CEO stands in the conference room holding a folder.&lt;/p&gt;

&lt;p&gt;"If we land this account," he says,&lt;br&gt;
"we run at 80% capacity for three years.&lt;br&gt;
Stable revenue. Everyone keeps their job."&lt;/p&gt;

&lt;p&gt;The room nods.&lt;/p&gt;

&lt;p&gt;Oran counts the nods.&lt;br&gt;
Twelve people. Twelve nods.&lt;/p&gt;

&lt;p&gt;He writes in his notebook: &lt;em&gt;zero commitments.&lt;/em&gt;&lt;/p&gt;



&lt;p&gt;The customer is large. The kind of large that has its own supplier requirements document — forty-seven pages, updated quarterly, with a compliance checklist at the end that takes two people a week to fill out.&lt;/p&gt;

&lt;p&gt;Page 31, Section 4.2:&lt;br&gt;
&lt;em&gt;All production data must be stored in a centralized, auditable system. Traceability from raw material intake to finished goods shipment is required. Excel-based record-keeping is not acceptable for Tier 1 suppliers.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The CEO reads this paragraph out loud.&lt;br&gt;
Then he closes the document.&lt;/p&gt;

&lt;p&gt;"All data goes into a shared system," he says. "Oran will build it."&lt;/p&gt;

&lt;p&gt;The room nods again.&lt;/p&gt;



&lt;p&gt;The meeting ends at 11am.&lt;/p&gt;

&lt;p&gt;By noon:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;QA has locked their defect log in the filing cabinet.&lt;/li&gt;
&lt;li&gt;Engineering has added a password to their process parameters folder. The password is the VP's dog's name. Nobody else knows this yet.&lt;/li&gt;
&lt;li&gt;Manufacturing's shift supervisor has started CC'ing nobody on the daily output report.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By 3pm, Oran sends an email to all three departments:&lt;br&gt;
&lt;em&gt;Please share your current data files so I can assess the migration scope.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;By 5pm, he has received:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;One reply from QA: &lt;em&gt;"I already sent it to you last week."&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;No reply from Engineering.&lt;/li&gt;
&lt;li&gt;One reply from Manufacturing: &lt;em&gt;"Which data do you mean specifically?"&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Oran checks his inbox. Nothing from QA last week.&lt;br&gt;
He checks his spam. Nothing.&lt;br&gt;
He replies to Manufacturing with a list of seven specific data types.&lt;br&gt;
Manufacturing replies: &lt;em&gt;"Let me check with my team."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;That was Tuesday.&lt;br&gt;
It is now Friday.&lt;/p&gt;



&lt;p&gt;Here is what Oran understands, sitting at his desk at 6pm with an empty inbox:&lt;/p&gt;

&lt;p&gt;Data hoarding is not laziness.&lt;br&gt;
It's not incompetence.&lt;br&gt;
It's &lt;strong&gt;rational.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Think about it from the VP of Manufacturing's perspective:&lt;/p&gt;

&lt;p&gt;If Manufacturing's output numbers are the only output numbers, then when something goes wrong on the line, Manufacturing gets to define what went wrong. They control the investigation. They control the conclusion.&lt;/p&gt;

&lt;p&gt;If the numbers go into a shared system, QA can query them. Engineering can query them. The CEO can query them. Manufacturing becomes &lt;em&gt;readable&lt;/em&gt; instead of &lt;em&gt;narrated.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;That's terrifying if your department has anything to hide.&lt;br&gt;
Even more terrifying if it doesn't — because then everyone else can see that too,&lt;br&gt;
and use it to argue their own case.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Information asymmetry is job security.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Every Excel file in every drawer is a locked door.&lt;br&gt;
Oran is being asked to remove all the doors.&lt;br&gt;
Nobody wants that. Not really.&lt;/p&gt;



&lt;p&gt;That weekend, Oran writes the first real schema draft.&lt;/p&gt;

&lt;p&gt;Not the final one. Not even close.&lt;br&gt;
But the first honest attempt to answer the question:&lt;br&gt;
&lt;em&gt;What data do we actually need, and who owns each piece of it?&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="n"&gt;production_batches&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="n"&gt;batch_id&lt;/span&gt;        &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;PRIMARY&lt;/span&gt; &lt;span class="k"&gt;KEY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;product_code&lt;/span&gt;    &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="n"&gt;start_time&lt;/span&gt;      &lt;span class="nb"&gt;DATETIME&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;end_time&lt;/span&gt;        &lt;span class="nb"&gt;DATETIME&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;shift&lt;/span&gt;           &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="n"&gt;line_id&lt;/span&gt;         &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="n"&gt;inspection_results&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="n"&gt;result_id&lt;/span&gt;       &lt;span class="nb"&gt;BIGINT&lt;/span&gt; &lt;span class="k"&gt;PRIMARY&lt;/span&gt; &lt;span class="k"&gt;KEY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;batch_id&lt;/span&gt;        &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;REFERENCES&lt;/span&gt; &lt;span class="n"&gt;production_batches&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;batch_id&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="n"&gt;inspected_at&lt;/span&gt;    &lt;span class="nb"&gt;DATETIME&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;inspector_id&lt;/span&gt;    &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="n"&gt;defect_type&lt;/span&gt;     &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;  &lt;span class="c1"&gt;-- whose definition?&lt;/span&gt;
  &lt;span class="n"&gt;defect_count&lt;/span&gt;    &lt;span class="nb"&gt;INT&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;outcome&lt;/span&gt;         &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;    &lt;span class="c1"&gt;-- pass / fail / conditional&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;He looks at &lt;code&gt;defect_type VARCHAR(100)&lt;/code&gt; for a long time.&lt;/p&gt;

&lt;p&gt;Then he adds a comment:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="c1"&gt;-- TODO: who decides what goes in this field?&lt;/span&gt;
&lt;span class="c1"&gt;-- QA: scratches are defects&lt;/span&gt;
&lt;span class="c1"&gt;-- Engineering: scratches are cosmetic unless functional&lt;/span&gt;
&lt;span class="c1"&gt;-- Manufacturing: scratches don't exist unless the customer notices them&lt;/span&gt;
&lt;span class="c1"&gt;-- Need one definition. Agreed in writing. Before we build anything.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;He doesn't know it yet,&lt;br&gt;
but that comment will take six weeks and three meetings to resolve.&lt;/p&gt;




&lt;p&gt;Monday morning.&lt;/p&gt;

&lt;p&gt;Oran arrives early. He prints two copies of the schema draft.&lt;br&gt;
He puts one on the VP of QA's desk.&lt;br&gt;
He puts one on the VP of Engineering's desk.&lt;/p&gt;

&lt;p&gt;He slides a third copy under the VP of Manufacturing's door,&lt;br&gt;
because the VP of Manufacturing is already in a meeting&lt;br&gt;
that started at 7am&lt;br&gt;
and will apparently last until noon.&lt;/p&gt;

&lt;p&gt;Then he goes back to his desk and writes an email to the CEO:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The technical build is straightforward. The prerequisite is data governance — a written agreement on definitions, ownership, and submission timelines, signed by each department head. Without this, I can build the database, but I cannot guarantee the data inside it will be correct.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;I'd like thirty minutes on the agenda for next week's leadership meeting.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;He sends it before he can change his mind.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;The company was about to get its biggest customer.&lt;br&gt;
The data was in twelve drawers,&lt;br&gt;
four password-protected folders,&lt;br&gt;
and one Excel file that only opened on Linda's laptop.&lt;br&gt;
Linda was on maternity leave.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The database didn't care.&lt;br&gt;
It was waiting.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Next: Ep3 — The Auditor Arrives&lt;/strong&gt;&lt;br&gt;
&lt;em&gt;She doesn't look at the machines.&lt;br&gt;
She looks at the filing cabinets.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;← &lt;a href="https://dev.to/syslayer/coding-cat-oran-s2-ep1-the-excel-republic-5g15"&gt;Ep1: The Excel Republic&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Coding Cat Oran is a serialized fiction about building real systems inside real companies.&lt;/em&gt;&lt;br&gt;
&lt;em&gt;The politics are real. The cat is fictional. The filing cabinets are very, very real.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;By &lt;a href="https://syslayer.gumroad.com" rel="noopener noreferrer"&gt;SysLayer&lt;/a&gt; · &lt;a href="https://dev.to/syslayer"&gt;dev.to/syslayer&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;




</description>
      <category>career</category>
      <category>webdev</category>
      <category>sql</category>
      <category>database</category>
    </item>
    <item>
      <title>Coding Cat Oran S2 Ep1 — The Excel Republic</title>
      <dc:creator>SysLayer</dc:creator>
      <pubDate>Sun, 10 May 2026 10:51:45 +0000</pubDate>
      <link>https://dev.to/syslayer/coding-cat-oran-s2-ep1-the-excel-republic-5g15</link>
      <guid>https://dev.to/syslayer/coding-cat-oran-s2-ep1-the-excel-republic-5g15</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgyzl1xfl9qei7lr9k0cz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgyzl1xfl9qei7lr9k0cz.png" alt=" " width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;A story about trial production, three departments, and three versions of the truth.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;It's 7am on the production floor.&lt;/p&gt;

&lt;p&gt;Three people are standing around a whiteboard.&lt;br&gt;
One is from QA. One is from Engineering. One is from Manufacturing.&lt;br&gt;
They are arguing about a number.&lt;/p&gt;

&lt;p&gt;The number is the yield rate for Product A, Batch 7, last Tuesday.&lt;/p&gt;

&lt;p&gt;QA says: &lt;strong&gt;87%.&lt;/strong&gt;&lt;br&gt;
Engineering says: &lt;strong&gt;91%.&lt;/strong&gt;&lt;br&gt;
Manufacturing says: &lt;em&gt;"Depends on which shift."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;All three are holding laptops.&lt;br&gt;
All three are looking at Excel files.&lt;br&gt;
All three are right.&lt;/p&gt;



&lt;p&gt;Oran is an orange cat. No CS degree.&lt;br&gt;
He learned to code at night, online, on his own time,&lt;br&gt;
with AI tools and courses he bought on sale.&lt;/p&gt;

&lt;p&gt;He got hired anyway. It's that kind of year.&lt;/p&gt;

&lt;p&gt;His job title is IT. His actual job is: whatever nobody else wants to do.&lt;/p&gt;

&lt;p&gt;This week, his job is to &lt;em&gt;reconcile the production data.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;He sits down. He opens all three Excel files.&lt;/p&gt;

&lt;p&gt;The columns have different names.&lt;br&gt;
The formulas have different logic.&lt;br&gt;
The defect definitions are different.&lt;br&gt;
QA counts a scratch as a defect. Manufacturing counts it as cosmetic. Engineering doesn't count it at all unless it affects function.&lt;/p&gt;

&lt;p&gt;Same scratch. Three categories. Three numbers.&lt;/p&gt;

&lt;p&gt;Oran closes his laptop.&lt;br&gt;
He stares at the ceiling for a long time.&lt;/p&gt;



&lt;p&gt;Here is what Oran understands, sitting in that chair:&lt;/p&gt;

&lt;p&gt;The data problem is not a data problem.&lt;/p&gt;

&lt;p&gt;It's a &lt;strong&gt;political problem dressed as a data problem.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Each department's Excel file is their scoreboard.&lt;br&gt;
Their evidence. Their alibi.&lt;br&gt;
If QA's numbers are the official numbers, QA controls the narrative.&lt;br&gt;
If Engineering's numbers are official, Engineering does.&lt;br&gt;
If they merge into one system, someone's score gets worse.&lt;/p&gt;

&lt;p&gt;Nobody built these spreadsheets to hide information.&lt;br&gt;
They built them to protect themselves.&lt;br&gt;
That's different. And it's harder to fix.&lt;/p&gt;



&lt;p&gt;Oran opens a blank document.&lt;/p&gt;

&lt;p&gt;He doesn't start with a database schema.&lt;br&gt;
He doesn't start with a system architecture.&lt;br&gt;
He starts with a question:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;What would it mean for all three of these numbers to be correct at the same time?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;He writes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Inspection timing&lt;/strong&gt; is different. QA measures at end-of-line. Engineering measures at each station. Manufacturing measures at shipment.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Defect scope&lt;/strong&gt; is different. Three departments, three definitions, never written down anywhere.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The data is collected by different people, at different times, with different tools, for different audiences.&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One batch. One production run. Six data points that look like contradictions but are actually just context.&lt;/p&gt;

&lt;p&gt;The problem isn't that the data is wrong.&lt;br&gt;
The problem is that there's no single place that holds all of it together.&lt;/p&gt;



&lt;p&gt;That evening, Oran writes the first three lines of what will eventually become a database schema.&lt;/p&gt;

&lt;p&gt;He doesn't know that yet.&lt;br&gt;
He thinks he's just taking notes.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="c1"&gt;-- What actually happened&lt;/span&gt;
&lt;span class="c1"&gt;-- Who was there&lt;/span&gt;
&lt;span class="c1"&gt;-- When&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;He looks at the three Excel files one more time.&lt;/p&gt;

&lt;p&gt;Then he writes a fourth line:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="c1"&gt;-- And what "defect" means in this context&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;&lt;em&gt;There were three versions of the truth.&lt;br&gt;
Everyone was lying. No one was wrong.&lt;br&gt;
The database didn't exist yet.&lt;br&gt;
But the problem did.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>sql</category>
      <category>cim</category>
      <category>database</category>
      <category>dataclean</category>
    </item>
    <item>
      <title>I Write a Story About a Cat Who Builds ERP Systems With AI. Here's the Real Reason.</title>
      <dc:creator>SysLayer</dc:creator>
      <pubDate>Mon, 27 Apr 2026 06:49:39 +0000</pubDate>
      <link>https://dev.to/syslayer/i-write-a-story-about-a-cat-who-builds-erp-systems-with-ai-heres-the-real-reason-2p7g</link>
      <guid>https://dev.to/syslayer/i-write-a-story-about-a-cat-who-builds-erp-systems-with-ai-heres-the-real-reason-2p7g</guid>
      <description>&lt;p&gt;Coding Cat Oran is fiction. But everything that happens to him already happened to someone.&lt;/p&gt;

&lt;p&gt;`Most developers don't talk about the part where they almost shipped something they didn't understand.&lt;br&gt;
That part isn't in the tutorials. It's not in the conference talks. You won't find it in the post-mortems, because no one writes post-mortems about the times they got lucky.&lt;br&gt;
But it's real. And in 2025, it's happening faster than ever.&lt;/p&gt;

&lt;p&gt;Oran is an orange cat. He has no CS degree. He learns to code late at night, alone, with AI tools and online courses he bought on sale.&lt;br&gt;
He gets hired anyway. Because in 2025, that's enough to get hired.&lt;br&gt;
His first job: build an internal ERP system for a manufacturing company. One developer. No team. No architect. A requirements doc written in bullet points by someone who once saw SAP and thought: make it like that, but simple.&lt;br&gt;
Oran opens his AI coding tool and starts prompting.&lt;br&gt;
What happens next is the series.&lt;/p&gt;

&lt;p&gt;Why I'm writing this&lt;br&gt;
I've spent years building production systems — ERP, WMS, permission management, traceability systems. Real systems, for real factories, with real consequences when something breaks at 2am on a Tuesday.&lt;br&gt;
I've watched the tools change. I've watched what AI makes easier, and I've watched what it quietly makes worse.&lt;br&gt;
The gap between working prototype and production-ready system is not smaller than it used to be. If anything, it's wider — because now you can generate the prototype in a day, and spend the next six months discovering what it didn't know it didn't know.&lt;br&gt;
Oran is how I write about that gap honestly. Fiction lets me be more precise than a technical post does.&lt;/p&gt;

&lt;p&gt;What the series is&lt;br&gt;
Coding Cat Oran is a serialized fiction about a solo developer building real systems with AI tools — and learning, episode by episode, what the tools can and cannot carry.&lt;br&gt;
It's not anti-AI. Oran uses AI constantly. So do I.&lt;br&gt;
It's about the judgment layer that sits above the tools. The part that knows when a five-table schema is actually a trap. The part that asks who maintains this in two years. The part that no prompt can replace.&lt;br&gt;
Each episode is short — under 5 minutes. Each one ends at the edge of a real engineering problem.&lt;/p&gt;

&lt;p&gt;Start here&lt;br&gt;
&lt;a href="https://dev.to/syslayer/coding-cat-oran-ep1-the-prompt-programmer-2i9d"&gt;→ Ep1: The Prompt Programmer — Oran gets the job and ships a prototype by Friday.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://dev.to/syslayer/coding-cat-oran-ep2-what-they-said-vs-what-they-meant-339m"&gt;→ Ep2: What They Said vs. What They Meant — The requirements doc was three pages. The real requirements were not written anywhere.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://dev.to/syslayer/coding-cat-oran-ep3-five-tables-changed-everything-1094"&gt;→ Ep3: Five Tables Changed Everything — The permission system gets a schema. It's almost right.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://dev.to/syslayer/coding-cat-oran-ep4-speaking-human-3452"&gt;→ Ep4: Speaking Human — The GM wants a dashboard. Oran learns that "simple" is a political statement.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://dev.to/syslayer/coding-cat-oran-ep5-the-it-manager-nobody-hired-4hao"&gt;→ Ep5: The IT Manager Nobody Hired — Six months in. Oran gets promoted to a job that doesn't have a title.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;New episodes publish weekly. Follow SysLayer on dev.to to catch them.&lt;br&gt;
If you build systems for a living — or want to — Oran is for you.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>productivity</category>
      <category>ai</category>
    </item>
    <item>
      <title>Coding Cat Oran S1 Ep5, The IT Manager Nobody Hired</title>
      <dc:creator>SysLayer</dc:creator>
      <pubDate>Mon, 20 Apr 2026 01:13:47 +0000</pubDate>
      <link>https://dev.to/syslayer/coding-cat-oran-ep5-the-it-manager-nobody-hired-4hao</link>
      <guid>https://dev.to/syslayer/coding-cat-oran-ep5-the-it-manager-nobody-hired-4hao</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnio25q059fj4in6x1hap.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnio25q059fj4in6x1hap.png" alt=" " width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Six months at Rust-Belt Manufacturing. The permission system was running. Inventory was live. The approval workflow hadn't broken once.&lt;/p&gt;

&lt;p&gt;The GM called Oran into his office.&lt;/p&gt;

&lt;p&gt;"We need a new system for production scheduling. And I want you to lead it — not just the coding. The whole thing. Requirements, design, timeline, rollout."&lt;/p&gt;

&lt;p&gt;Oran blinked. "That sounds like a project manager's job."&lt;/p&gt;

&lt;p&gt;"It sounds like your job. You're the one who knows how to talk to the teams and turn it into something that works."&lt;/p&gt;




&lt;p&gt;Oran walked out with a new title on his business card: &lt;strong&gt;IT Manager&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;No raise negotiation. No interview panel. It just happened. Because in a small company, titles don't come from HR — they come from trust. And Oran had earned it the hard way.&lt;/p&gt;

&lt;p&gt;He sat down and thought about how he got here.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Month 1:&lt;/strong&gt; He was a prompt programmer. He typed descriptions into AI and shipped whatever came out. He thought speed was the skill. Build fast, demo fast, move on.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Month 2:&lt;/strong&gt; He met the users. He learned that requirements documents lie — not on purpose, but because the people who write them aren't the people who do the work. He learned to watch before he asked, and to ask before he built.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Month 3:&lt;/strong&gt; He discovered that the database isn't just storage — it's where business rules live. Permission boundaries, approval thresholds, audit trails. When logic lives in SQL, it survives everything: framework changes, rewrites, developer turnover. He learned to think in tables.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Month 4:&lt;/strong&gt; He stood in front of a room and failed. Then he stood in front of the same room and succeeded. The difference wasn't the system — it was the language. He learned to translate technology into outcomes. Not "five tables with junction mappings" but "you see only what's relevant to your job."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Month 5–6:&lt;/strong&gt; People started coming to &lt;em&gt;him&lt;/em&gt;. Not with bug reports — with ideas. "Can we track supplier lead times?" "Can we see which orders are late?" "Can we give the external auditor a login?" Each conversation was a mini requirements session. And Oran was running them naturally, without a methodology or a framework. Just a notebook, good questions, and the habit of listening before building.&lt;/p&gt;




&lt;p&gt;Here's what Oran knows now that he didn't know on day one:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AI is a tool, not a teacher.&lt;/strong&gt; It writes code when you tell it what to write. But it can't sit with Duke and watch how receiving actually works. It can't read Ms. Lin's face when she says "who changed that number." It can't stand in a conference room and feel the silence when nobody understands your slide. The decisions that matter — what to build, for whom, and why — those are still yours.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SQL is a thinking language.&lt;/strong&gt; Not just a query language. When you model a business process in tables and relationships, you're forced to be precise. "Approval" stops being a vague word and becomes: who approves, at what threshold, in what order, and what's the record. The database doesn't accept hand-waving.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Translation is the real skill.&lt;/strong&gt; A developer who can explain a system to the warehouse manager AND model it in SQL AND implement it in code — that person isn't just a programmer. That person is the architect, the analyst, and the project manager. In a small company, that's the whole IT department.&lt;/p&gt;




&lt;p&gt;Oran started the production scheduling project the next Monday. This time, he didn't open Cursor first.&lt;/p&gt;

&lt;p&gt;He grabbed his notebook and walked to the factory floor.&lt;/p&gt;




&lt;p&gt;One year later, Rust-Belt Manufacturing has four internal systems — all designed by Oran, all running on the same permission model, all speaking human to the teams that use them.&lt;/p&gt;

&lt;p&gt;Oran still writes prompts. He still uses AI to code faster. But he decides &lt;em&gt;what&lt;/em&gt; to build before he decides &lt;em&gt;how&lt;/em&gt; to build it.&lt;/p&gt;

&lt;p&gt;He's an orange cat with no CS degree who became the IT backbone of a factory.&lt;/p&gt;

&lt;p&gt;Not because he could code.&lt;/p&gt;

&lt;p&gt;Because he could listen, design, and translate.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Thanks for following Oran's story. If the permission system chapters sounded familiar — the 5-table schema, the audit trail, the feature-level access controls — I wrote the complete technical guide:&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;📘 &lt;strong&gt;&lt;a href="https://syslayer.gumroad.com/l/rbac-permission-system-sql" rel="noopener noreferrer"&gt;How to Build an RBAC Permission System — Complete SQL Edition&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;85 pages. PostgreSQL, MySQL 8+, SQL Server. The guide Oran wished he had on day one.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;&lt;a href="https://syslayer.gumroad.com" rel="noopener noreferrer"&gt;SysLayer&lt;/a&gt; — Practical backend guides for developers who build real products.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Try it Now! &lt;/p&gt;
&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
      &lt;div class="c-embed__body flex items-center justify-between"&gt;
        &lt;a href="https://syslayer.it.com/" rel="noopener noreferrer" class="c-link fw-bold flex items-center"&gt;
          &lt;span class="mr-2"&gt;syslayer.it.com&lt;/span&gt;
          

        &lt;/a&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


</description>
      <category>programming</category>
      <category>systemdesign</category>
      <category>sql</category>
    </item>
    <item>
      <title>Coding Cat Oran S1 Ep4, Speaking Human</title>
      <dc:creator>SysLayer</dc:creator>
      <pubDate>Fri, 17 Apr 2026 00:59:49 +0000</pubDate>
      <link>https://dev.to/syslayer/coding-cat-oran-ep4-speaking-human-3452</link>
      <guid>https://dev.to/syslayer/coding-cat-oran-ep4-speaking-human-3452</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9xii9gq6qfjo8uff4hls.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9xii9gq6qfjo8uff4hls.png" alt=" " width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The boss called a company-wide meeting. Twenty minutes, conference room, Friday 2pm.&lt;/p&gt;

&lt;p&gt;"Oran, you'll present the new system. Show everyone how it works."&lt;/p&gt;

&lt;p&gt;Oran had three days to prepare. He felt ready. He'd rebuilt the permission layer, redesigned the inventory module, added the approval workflow. The system was solid.&lt;/p&gt;

&lt;p&gt;He made a slide deck. Fifteen slides. Entity-relationship diagrams. SQL snippets. A flowchart of the permission check logic. Technical. Thorough. Accurate.&lt;/p&gt;

&lt;p&gt;Friday came. Oran stood in front of the room. Duke and the warehouse crew in the back row. Ms. Lin in the front. The factory floor supervisor. The sales team. The GM.&lt;/p&gt;

&lt;p&gt;Oran clicked to the first slide: an ER diagram with five tables and foreign key arrows.&lt;/p&gt;

&lt;p&gt;The room went silent. Not the good kind.&lt;/p&gt;




&lt;p&gt;He lost them in ninety seconds.&lt;/p&gt;

&lt;p&gt;Duke leaned over to a coworker and whispered something. Ms. Lin politely took out her phone. The GM was nodding — but the way people nod when they want you to finish faster.&lt;/p&gt;

&lt;p&gt;Oran made it through seven slides before the GM raised his hand.&lt;/p&gt;

&lt;p&gt;"Oran. I believe you. The system works. But I have one question."&lt;/p&gt;

&lt;p&gt;"Yes?"&lt;/p&gt;

&lt;p&gt;"Can you tell me, in plain words, what this system does for us? Not how it's built. What it &lt;em&gt;does&lt;/em&gt;."&lt;/p&gt;

&lt;p&gt;Oran opened his mouth. Then closed it.&lt;/p&gt;

&lt;p&gt;He had spent weeks building the system. He could explain every table, every join, every constraint. But he couldn't say, in one sentence, what it meant for the people in this room.&lt;/p&gt;




&lt;p&gt;That weekend, Oran sat at his kitchen table and rewrote everything.&lt;/p&gt;

&lt;p&gt;Not the code. The words.&lt;/p&gt;

&lt;p&gt;He realized that technical people think in &lt;strong&gt;structure&lt;/strong&gt; — tables, relationships, data flow. But everyone else thinks in &lt;strong&gt;outcomes&lt;/strong&gt; — what can I do, what changes for me, what problems go away.&lt;/p&gt;

&lt;p&gt;He needed to translate.&lt;/p&gt;

&lt;p&gt;He made a new deck. Three slides.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Slide 1: "What changes for you"&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"You'll log in and see only what's relevant to your job. Warehouse sees inventory. Finance sees billing. No clutter, no confusion."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Slide 2: "What you can trust"&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Every approval, every change, every access grant is recorded. If you ever need to ask 'who did this and when' — the system has the answer."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Slide 3: "What you control"&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"New hire? Your department head assigns them a role. No ticket to IT. They get exactly the access they need — nothing more, nothing less."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;No ER diagrams. No SQL. No arrows.&lt;/p&gt;




&lt;p&gt;Monday. Oran presented again. Same room. Same people.&lt;/p&gt;

&lt;p&gt;This time, Duke nodded — the real kind. Ms. Lin put her phone away. The sales team asked questions. Good questions. "Can I get a weekly report of my orders?" "Can we add a read-only role for the auditor who comes quarterly?"&lt;/p&gt;

&lt;p&gt;The GM said, "This is what I wanted to hear last week."&lt;/p&gt;

&lt;p&gt;Oran learned something that day that wasn't in any course he'd bought:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The system doesn't exist until people understand it.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You can build the most elegant schema in the world. If you can't explain it to Duke in one sentence, it doesn't matter.&lt;/p&gt;




&lt;p&gt;And here's the thing — this skill made Oran a better developer too.&lt;/p&gt;

&lt;p&gt;When he forced himself to describe the permission system as "you see only what's relevant to your job," he immediately spotted a gap in his own design. He hadn't built a dashboard that showed users their own access. He'd built the backend but forgot the human-facing layer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Translating tech into human language isn't dumbing it down. It's a design review in disguise.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Every time you explain a feature in plain words and it sounds confusing — that's a sign the feature itself is confused.&lt;/p&gt;




&lt;p&gt;Oran went back to his desk and added three things to his system:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A "My Access" page where users see their own permissions in plain language&lt;/li&gt;
&lt;li&gt;A role summary page for department heads — no SQL, just a clean table&lt;/li&gt;
&lt;li&gt;Notification emails when access changes: &lt;em&gt;"You've been granted the Warehouse Staff role by Duke on March 15."&lt;/em&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Small features. Huge difference. Because now the system spoke human.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Next episode:&lt;/strong&gt; Six months later. The GM asks Oran to lead the next project. Oran isn't just the developer anymore — he's the one who decides what gets built. The orange cat grows into a role nobody hired him for.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Oran's journey is brought to you by &lt;a href="https://syslayer.gumroad.com" rel="noopener noreferrer"&gt;SysLayer&lt;/a&gt; — practical backend guides for developers who build real products.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Try SQL Generator Now! &lt;/p&gt;
&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
      &lt;div class="c-embed__body flex items-center justify-between"&gt;
        &lt;a href="https://syslayer.it.com/" rel="noopener noreferrer" class="c-link fw-bold flex items-center"&gt;
          &lt;span class="mr-2"&gt;syslayer.it.com&lt;/span&gt;
          

        &lt;/a&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


</description>
      <category>sql</category>
      <category>developer</category>
      <category>systemdesign</category>
    </item>
    <item>
      <title>Coding Cat Oran S1 Ep3, Five Tables Changed Everything</title>
      <dc:creator>SysLayer</dc:creator>
      <pubDate>Thu, 16 Apr 2026 06:12:43 +0000</pubDate>
      <link>https://dev.to/syslayer/coding-cat-oran-ep3-five-tables-changed-everything-1094</link>
      <guid>https://dev.to/syslayer/coding-cat-oran-ep3-five-tables-changed-everything-1094</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flg30u92igm6zm5u10u5u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flg30u92igm6zm5u10u5u.png" alt=" " width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Oran spent two weeks doing something that felt like not working.&lt;/p&gt;

&lt;p&gt;He sat with the warehouse team during morning receiving. He watched Ms. Lin process purchase orders after lunch. He stood on the factory floor while the supervisor assigned shifts. He even attended the Monday management meeting — the only cat in a room full of dogs — and took notes.&lt;/p&gt;

&lt;p&gt;He didn't write a single line of code.&lt;/p&gt;

&lt;p&gt;But he filled an entire notebook.&lt;/p&gt;




&lt;p&gt;Patterns started showing up.&lt;/p&gt;

&lt;p&gt;Every department had the same complaint in different words:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Warehouse: "We shouldn't see pricing."&lt;/li&gt;
&lt;li&gt;Finance: "We need to know who approved what."&lt;/li&gt;
&lt;li&gt;Production: "The supervisor can assign shifts, but only the manager can approve overtime."&lt;/li&gt;
&lt;li&gt;Sales: "I need to see orders but not cost breakdowns."&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Oran stared at his notebook. All of these were the same problem.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Who can do what. And who said they could.&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;He went back to his AI tools and prompted: &lt;em&gt;"best way to handle permissions in a web application."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The AI gave him a middleware snippet with hardcoded role checks. &lt;code&gt;if role == 'admin'&lt;/code&gt;. &lt;code&gt;if role == 'manager'&lt;/code&gt;. The same pattern he'd already built. The same pattern that broke.&lt;/p&gt;

&lt;p&gt;So Oran did something he hadn't done before. He closed the AI and opened Google. Then a textbook. Then a blog post from someone who had clearly been through the same pain.&lt;/p&gt;

&lt;p&gt;He found RBAC.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Role-Based Access Control.&lt;/strong&gt; Not a framework. Not a library. A design pattern. And at its core, a data model — five tables in a relational database.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;users&lt;/code&gt;. &lt;code&gt;roles&lt;/code&gt;. &lt;code&gt;permissions&lt;/code&gt;. And two mapping tables to connect them.&lt;/p&gt;

&lt;p&gt;The idea was simple: &lt;strong&gt;permissions are data, not code.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You don't write &lt;code&gt;if role == 'warehouse_lead'&lt;/code&gt; in your application. You store &lt;code&gt;warehouse_lead → inventory:read, inventory:update&lt;/code&gt; in the database. The app asks one question: &lt;em&gt;does this user have this permission?&lt;/em&gt; A single SQL query answers it.&lt;/p&gt;




&lt;p&gt;This changed how Oran thought about everything.&lt;/p&gt;

&lt;p&gt;Suddenly, Duke's requirement — "my guys shouldn't see pricing" — wasn't a special case. It was a permission row: &lt;code&gt;warehouse_staff&lt;/code&gt; role gets &lt;code&gt;inventory:read&lt;/code&gt; but not &lt;code&gt;pricing:read&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Ms. Lin's approval chain? The &lt;code&gt;granted_by&lt;/code&gt; and &lt;code&gt;granted_at&lt;/code&gt; columns on the role assignment table. Every permission change is a row. Every row is an audit record.&lt;/p&gt;

&lt;p&gt;The production supervisor approving shifts but not overtime? Two different permissions: &lt;code&gt;shifts:assign&lt;/code&gt; and &lt;code&gt;overtime:approve&lt;/code&gt;. One role has both. One role has only the first.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;No &lt;code&gt;if/else&lt;/code&gt;. No spaghetti. Just data.&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;But here's what really clicked for Oran. The 5-table model wasn't just a technical solution. It was a &lt;strong&gt;communication tool&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;He drew the schema on a whiteboard and walked Ms. Lin through it. "This table is your list of people. This table is the list of roles — think of them as job titles for system access. This table is every action the system can do. And these two tables connect them."&lt;/p&gt;

&lt;p&gt;Ms. Lin nodded. "So if I want to give the new accountant the same access as me, you just..."&lt;/p&gt;

&lt;p&gt;"Copy your role assignments. One query. No code change."&lt;/p&gt;

&lt;p&gt;"And I can see who has what access?"&lt;/p&gt;

&lt;p&gt;"One report. Anytime."&lt;/p&gt;

&lt;p&gt;Ms. Lin smiled for the first time since Oran started.&lt;/p&gt;




&lt;p&gt;That night, Oran rebuilt the permission layer. AI helped him write the SQL faster — but the design was his. Every table, every column, every constraint came from the notebook he filled during those two weeks of watching and listening.&lt;/p&gt;

&lt;p&gt;He was learning a lesson most developers take years to learn:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SQL isn't just storage. It's where business logic lives.&lt;/strong&gt; The approval threshold ($5,000) is a value in a table. The permission boundary is a row in a mapping table. The audit trail is a timestamp on every change.&lt;/p&gt;

&lt;p&gt;When business rules live in the database, they survive framework migrations, language rewrites, and developer turnover. They survive even when the only dev at the company is one orange cat.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Next episode:&lt;/strong&gt; The boss asks Oran to present the system to the whole company. Oran learns that explaining a database to non-technical people is a skill nobody taught him — and maybe the most important one.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Oran's journey is brought to you by &lt;a href="https://syslayer.gumroad.com" rel="noopener noreferrer"&gt;SysLayer&lt;/a&gt; — practical backend guides for developers who build real products.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Try SQL Generator Now! &lt;/p&gt;
&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
      &lt;div class="c-embed__body flex items-center justify-between"&gt;
        &lt;a href="https://syslayer.it.com/" rel="noopener noreferrer" class="c-link fw-bold flex items-center"&gt;
          &lt;span class="mr-2"&gt;syslayer.it.com&lt;/span&gt;
          

        &lt;/a&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


</description>
      <category>sql</category>
      <category>systemdesign</category>
      <category>programming</category>
      <category>backend</category>
    </item>
    <item>
      <title>Coding Cat Oran S1 Ep2, What They Said vs. What They Meant</title>
      <dc:creator>SysLayer</dc:creator>
      <pubDate>Wed, 15 Apr 2026 12:06:15 +0000</pubDate>
      <link>https://dev.to/syslayer/coding-cat-oran-ep2-what-they-said-vs-what-they-meant-339m</link>
      <guid>https://dev.to/syslayer/coding-cat-oran-ep2-what-they-said-vs-what-they-meant-339m</guid>
      <description>&lt;p&gt;Meets real users, gets humbled&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdaj0ma4xbsl7qr3c7790.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdaj0ma4xbsl7qr3c7790.png" alt=" " width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Monday morning. Oran walked into Rust-Belt Manufacturing feeling good. The prototype was live on a staging server. The boss loved it. Time to collect feedback and polish.&lt;/p&gt;

&lt;p&gt;He started with the warehouse team.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;The warehouse manager, a bulldog named Duke&lt;/strong&gt;, stared at the screen for thirty seconds. Then he said:&lt;/p&gt;

&lt;p&gt;"Where's the receiving log?"&lt;/p&gt;

&lt;p&gt;"The... what?"&lt;/p&gt;

&lt;p&gt;"When parts come in, we log them. Quantity, supplier, condition. Then we confirm against the purchase order. Then we shelf it. Your system just has 'inventory.' That's not how this works."&lt;/p&gt;

&lt;p&gt;Oran opened his prompt history. He had typed &lt;em&gt;"inventory tracking."&lt;/em&gt; The AI gave him a table with &lt;code&gt;item_name&lt;/code&gt;, &lt;code&gt;quantity&lt;/code&gt;, and &lt;code&gt;location&lt;/code&gt;. Clean. Simple. Completely wrong.&lt;/p&gt;

&lt;p&gt;Duke wasn't done. "Also — my guys on the floor shouldn't see pricing. Ever. But they need to adjust quantities when they do a physical count. Your system shows everything or nothing."&lt;/p&gt;

&lt;p&gt;Oran wrote it all down on paper. His paw was shaking a little.&lt;/p&gt;




&lt;p&gt;Next stop: &lt;strong&gt;finance. A Persian cat named Ms. Lin&lt;/strong&gt; who had been doing the books for 15 years.&lt;/p&gt;

&lt;p&gt;"This purchase order screen," she said, adjusting her glasses. "Who approves it?"&lt;/p&gt;

&lt;p&gt;"The admin can approve—"&lt;/p&gt;

&lt;p&gt;"No. Department head approves under $5,000. GM approves above. And I need to see the approval chain afterward. Who requested, who approved, when."&lt;/p&gt;

&lt;p&gt;Oran looked at his system. He had one field: &lt;code&gt;status: approved/pending&lt;/code&gt;. No &lt;code&gt;approved_by&lt;/code&gt;. No &lt;code&gt;approved_at&lt;/code&gt;. No threshold logic. No chain.&lt;/p&gt;

&lt;p&gt;Ms. Lin looked at him the way only a Persian cat can.&lt;/p&gt;

&lt;p&gt;"Young cat, let me tell you something. The old system was an Excel sheet. It was terrible. But at least I could see who changed what in the edit history. Your new system doesn't even have that."&lt;/p&gt;

&lt;p&gt;That one hurt.&lt;/p&gt;




&lt;p&gt;Oran went back to his desk and stared at his code. He realized something that no online course had taught him:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Users don't describe systems. They describe their day.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Duke didn't say "I need a goods receiving module with PO matching." He said "when parts come in, we log them." Ms. Lin didn't say "I need a multi-level approval workflow with an audit trail." She said "who approves it?"&lt;/p&gt;

&lt;p&gt;The requirements doc had said &lt;strong&gt;"manage inventory"&lt;/strong&gt; and &lt;strong&gt;"role-based access."&lt;/strong&gt; Those words were technically correct. But they were a summary of a summary. The real requirements were buried inside the daily routines of people who never think in database tables.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Oran's job was to translate.&lt;/strong&gt; Not from English to Python. From &lt;em&gt;human workflow&lt;/em&gt; to &lt;em&gt;system design&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;And AI couldn't do that part. AI never met Duke. AI never saw Ms. Lin's face when she said "who changed what."&lt;/p&gt;




&lt;p&gt;That night, Oran didn't write any code. He made a list instead:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Go back to every department&lt;/li&gt;
&lt;li&gt;Watch them work — don't just ask what they need&lt;/li&gt;
&lt;li&gt;Write down what they &lt;em&gt;do&lt;/em&gt;, not what they &lt;em&gt;say&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;Then — only then — design the tables&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;He taped it above his monitor.&lt;/p&gt;

&lt;p&gt;He was starting to think like an SA without knowing what an SA was.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Next episode:&lt;/strong&gt; Oran redesigns the system. He discovers that the hardest part isn't building features — it's deciding who gets to see what, and why.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Oran's journey is brought to you by &lt;a href="https://syslayer.gumroad.com" rel="noopener noreferrer"&gt;SysLayer&lt;/a&gt; — practical backend guides for developers who build real products.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Try SQL Generator Now! &lt;/p&gt;
&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
      &lt;div class="c-embed__body flex items-center justify-between"&gt;
        &lt;a href="https://syslayer.it.com/" rel="noopener noreferrer" class="c-link fw-bold flex items-center"&gt;
          &lt;span class="mr-2"&gt;syslayer.it.com&lt;/span&gt;
          

        &lt;/a&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


</description>
      <category>ai</category>
      <category>programming</category>
      <category>systemdesign</category>
      <category>interview</category>
    </item>
    <item>
      <title>Coding Cat Oran S1 Ep1, The Prompt Programmer.</title>
      <dc:creator>SysLayer</dc:creator>
      <pubDate>Tue, 14 Apr 2026 06:30:03 +0000</pubDate>
      <link>https://dev.to/syslayer/coding-cat-oran-ep1-the-prompt-programmer-2i9d</link>
      <guid>https://dev.to/syslayer/coding-cat-oran-ep1-the-prompt-programmer-2i9d</guid>
      <description>&lt;h2&gt;
  
  
  &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjtg2gef2k9jjqry6ytqh.png" alt=" " width="800" height="800"&gt;
&lt;/h2&gt;

&lt;p&gt;title: "Oran the Dev Cat — Ep.1: The Prompt Programmer"&lt;br&gt;
published: true&lt;br&gt;
series: "Oran the Dev Cat"&lt;/p&gt;
&lt;h2&gt;
  
  
  tags: beginners, webdev, career, programming
&lt;/h2&gt;

&lt;p&gt;Oran is an orange cat with no computer science degree.&lt;/p&gt;

&lt;p&gt;He learned to code the way most cats do — late at night, alone, watching online courses he bought on sale. JavaScript. Python. A little SQL. Enough to build things that work, not enough to explain why they work.&lt;/p&gt;

&lt;p&gt;But Oran could build. And in 2025, that was enough to get hired.&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;Rust-Belt Manufacturing&lt;/strong&gt; is a mid-size factory two hours from the nearest tech hub. They make industrial parts — bolts, brackets, fittings. The kind of stuff that holds bridges together but never trends on Twitter.&lt;/p&gt;

&lt;p&gt;They posted one job listing: &lt;strong&gt;"IT Developer — build our internal systems."&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;No mention of a team. No mention of an architect or a QA engineer. Just one line at the bottom:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;"We need someone who can figure things out."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Oran applied. Oran got the job.&lt;/p&gt;



&lt;p&gt;Day one. Oran got a desk, a laptop, and a requirements doc — three pages, written by the factory manager in bullet points:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Track production orders&lt;/li&gt;
&lt;li&gt;Manage inventory&lt;/li&gt;
&lt;li&gt;Let different departments see different things&lt;/li&gt;
&lt;li&gt;"Make it like SAP but simple"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Oran opened Cursor, cracked his knuckles, and started prompting.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"Build a production order management system with 
 inventory tracking, user login, and role-based 
 access. Use Python, FastAPI, PostgreSQL."
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Code poured out. Models, routes, schemas, migrations. Oran reviewed it, tweaked a few things, prompted again. By Wednesday he had a working prototype. By Friday he demoed it to the boss.&lt;/p&gt;

&lt;p&gt;"This is great," the boss said. "Ship it."&lt;/p&gt;

&lt;p&gt;Oran felt invincible. He wrote a tweet that night:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Day 5 at new job. Full system prototype done. AI is the real senior developer. 🐱"&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;He got 47 likes. A reply said "king." Another said "this is the future of engineering."&lt;/p&gt;

&lt;p&gt;Oran believed them.&lt;/p&gt;



&lt;p&gt;But here's what Oran didn't notice during his speed run:&lt;/p&gt;

&lt;p&gt;He never talked to the warehouse team. He never sat with the finance department. He never asked anyone what "different departments see different things" actually meant in practice.&lt;/p&gt;

&lt;p&gt;He built what the requirements doc said. Word for word. Prompt for prompt.&lt;/p&gt;

&lt;p&gt;He didn't know it yet, but &lt;strong&gt;the requirements doc was wrong.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Not wrong as in typos. Wrong as in — the factory manager wrote what he &lt;em&gt;thought&lt;/em&gt; the system should do, not what the teams &lt;em&gt;actually needed&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;And Oran, riding high on demo-day dopamine, didn't think to question it.&lt;/p&gt;

&lt;p&gt;That would come on Monday.&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;Next episode:&lt;/strong&gt; Oran meets the users. And learns that "role-based access" means something very different to the warehouse manager, the accountant, and the factory floor supervisor.&lt;/p&gt;



&lt;p&gt;&lt;em&gt;Oran's journey is brought to you by &lt;a href="https://syslayer.gumroad.com" rel="noopener noreferrer"&gt;SysLayer&lt;/a&gt; — practical backend guides for developers &lt;br&gt;
who build real products.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Try SQL Generator Now! &lt;/p&gt;
&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
      &lt;div class="c-embed__body flex items-center justify-between"&gt;
        &lt;a href="https://syslayer.it.com/" rel="noopener noreferrer" class="c-link fw-bold flex items-center"&gt;
          &lt;span class="mr-2"&gt;syslayer.it.com&lt;/span&gt;
          

        &lt;/a&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;



</description>
      <category>development</category>
      <category>systemdesign</category>
      <category>junior</category>
      <category>database</category>
    </item>
  </channel>
</rss>
