<?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: Ajay Sharma</title>
    <description>The latest articles on DEV Community by Ajay Sharma (@arkdezin).</description>
    <link>https://dev.to/arkdezin</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4280498%2Fe26b4b6b-0324-44d8-80a1-2dfec055404e.png</url>
      <title>DEV Community: Ajay Sharma</title>
      <link>https://dev.to/arkdezin</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/arkdezin"/>
    <language>en</language>
    <item>
      <title>Crow's foot notation: a visual cheat sheet</title>
      <dc:creator>Ajay Sharma</dc:creator>
      <pubDate>Thu, 03 Dec 2026 12:00:24 +0000</pubDate>
      <link>https://dev.to/arkdezin/crows-foot-notation-a-visual-cheat-sheet-hio</link>
      <guid>https://dev.to/arkdezin/crows-foot-notation-a-visual-cheat-sheet-hio</guid>
      <description>&lt;p&gt;Every ER diagram ends up saying the same three things: which tables&lt;br&gt;
exist, which columns link them, and &lt;strong&gt;how many rows&lt;/strong&gt; one row can relate&lt;br&gt;
to on the other side. Crow's foot notation is just the shorthand for&lt;br&gt;
that last part — four little symbols that turn "a user has orders,&lt;br&gt;
plural, but maybe none yet" into a mark on a line.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzvf4xq0w70fz9gbmq56g.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzvf4xq0w70fz9gbmq56g.png" alt="The four crow's foot endings. The entire notation is two building blocks: the foot (three prongs) means many, the ring means optional." width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  The four endings
&lt;/h2&gt;

&lt;p&gt;Every line end is one of these — nothing more to memorize:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Ending&lt;/th&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;Read as&lt;/th&gt;
&lt;th&gt;In SQL&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;two ticks &lt;code&gt;‖&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Exactly one&lt;/td&gt;
&lt;td&gt;must have one, only one&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;FK NOT NULL&lt;/code&gt; + &lt;code&gt;UNIQUE&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ring + tick &lt;code&gt;o‖&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Zero or one&lt;/td&gt;
&lt;td&gt;may have one, or none&lt;/td&gt;
&lt;td&gt;nullable &lt;code&gt;FK&lt;/code&gt; + &lt;code&gt;UNIQUE&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;tick + foot &lt;code&gt;‖&amp;lt;&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;One or many&lt;/td&gt;
&lt;td&gt;must have at least one&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;FK NOT NULL&lt;/code&gt; (child rows required)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ring + foot &lt;code&gt;o&amp;lt;&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Zero or many&lt;/td&gt;
&lt;td&gt;may have any number&lt;/td&gt;
&lt;td&gt;plain &lt;code&gt;FK&lt;/code&gt;, nullable or not&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Two building blocks make all four: the &lt;strong&gt;foot&lt;/strong&gt; (three prongs) means&lt;br&gt;
&lt;em&gt;many&lt;/em&gt;, and the &lt;strong&gt;ring&lt;/strong&gt; means &lt;em&gt;optional&lt;/em&gt;. No ring means the&lt;br&gt;
relationship is mandatory.&lt;/p&gt;
&lt;h2&gt;
  
  
  How to read a line out loud
&lt;/h2&gt;

&lt;p&gt;Stand at the &lt;strong&gt;one&lt;/strong&gt; side, walk toward the far table, and narrate what&lt;br&gt;
you pass:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;users ||--o{ orders
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;"Users" — ticks mean &lt;em&gt;exactly one&lt;/em&gt; — "each user" — ring plus foot means&lt;br&gt;
&lt;em&gt;zero or many&lt;/em&gt; — "has zero or more orders." One sentence, and it doubles&lt;br&gt;
as the foreign-key rule: &lt;code&gt;orders.user_id&lt;/code&gt; points at &lt;code&gt;users.id&lt;/code&gt;, and it's&lt;br&gt;
nullable precisely because the ring says zero is allowed.&lt;/p&gt;

&lt;h2&gt;
  
  
  A full example
&lt;/h2&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fm4aub1fbq382oce027az.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fm4aub1fbq382oce027az.png" alt="A mini e-commerce schema, readable as three sentences: each order belongs to exactly one user; an order needs at least one line item; a product can appear on many items - or none yet." width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Reading all three lines out loud:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;users ‖-o{ orders&lt;/code&gt; — each order belongs to exactly one user; a user
can have any number of orders (&lt;code&gt;orders.user_id&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;orders ‖-|{ order_items&lt;/code&gt; — an order needs at least one line item; an
item belongs to exactly one order (&lt;code&gt;order_items.order_id&lt;/code&gt;, &lt;code&gt;NOT NULL&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;products ‖-o{ order_items&lt;/code&gt; — a product can appear on many items, or
none yet (&lt;code&gt;order_items.product_id&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That middle line is the one people get wrong — an empty order makes no&lt;br&gt;
sense, so the tick (not the ring) is the honest symbol.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three mistakes the symbols catch
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Foreign key on the wrong side.&lt;/strong&gt; The foot always lands on the table
holding the foreign key. If your "many" end has no FK column behind
it, the diagram lies.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Missing rings.&lt;/strong&gt; A nullable column drawn with mandatory ticks — or
the reverse. The ring is the difference between &lt;code&gt;NULL&lt;/code&gt; and &lt;code&gt;NOT NULL&lt;/code&gt;,
so it's worth getting right.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Feet on both ends.&lt;/strong&gt; Many-to-many can't be drawn with one line — it
needs a junction table in the middle, as covered in
&lt;a href="https://www.figschema.com/blog/how-to-draw-a-database-schema-in-figjam" rel="noopener noreferrer"&gt;the schema-in-FigJam walkthrough&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Frequently asked questions
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What does a crow's foot mean?&lt;/strong&gt;&lt;br&gt;
Many. The three-pronged foot always lands on the side that can hold many&lt;br&gt;
rows, and the other side holds exactly one.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How do you read a crow's foot diagram?&lt;/strong&gt;&lt;br&gt;
Stand at the &lt;em&gt;one&lt;/em&gt; side, walk toward the far table, and narrate what you&lt;br&gt;
pass: tick means one, ring means optional, foot means many. "Each user&lt;br&gt;
has zero or many orders."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does crow's foot notation do one-to-one relationships?&lt;/strong&gt;&lt;br&gt;
Yes. Two ticks (&lt;code&gt;‖&lt;/code&gt;) is a strict one-to-one, and ring plus tick (&lt;code&gt;o‖&lt;/code&gt;)&lt;br&gt;
is one-to-zero-or-one — the usual shape for "has a profile row, or&lt;br&gt;
doesn't yet."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What does a dashed line mean in crow's foot notation?&lt;/strong&gt;&lt;br&gt;
A non-identifying relationship: the child has its own primary key, and&lt;br&gt;
the parent's key appears in it only as a plain foreign key. A solid line&lt;br&gt;
(identifying) means the parent's key is part of the child's primary key.&lt;br&gt;
The full explanation, with weak entities and composite keys, is in&lt;br&gt;
&lt;a href="https://www.figschema.com/blog/identifying-vs-non-identifying-relationships" rel="noopener noreferrer"&gt;identifying vs non-identifying relationships&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Crow's foot vs Chen notation — which should I use?&lt;/strong&gt;&lt;br&gt;
Chen notation draws relationships as diamonds sitting between the boxes;&lt;br&gt;
crow's foot puts the cardinality directly on the line. Sketches and&lt;br&gt;
reviews almost always use crow's foot because it reads faster. The full&lt;br&gt;
three-way comparison, with UML class diagrams thrown in, is in&lt;br&gt;
&lt;a href="https://www.figschema.com/blog/chen-vs-crows-foot-vs-uml" rel="noopener noreferrer"&gt;ERD notations compared&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Steal this
&lt;/h2&gt;

&lt;p&gt;Cheat-sheet version for your next design review: one tick = &lt;em&gt;one&lt;/em&gt;, foot&lt;br&gt;
= &lt;em&gt;many&lt;/em&gt;, ring = &lt;em&gt;optional, zero allowed&lt;/em&gt;, no ring = &lt;em&gt;required&lt;/em&gt;. If you&lt;br&gt;
can read the line as an English sentence, the notation is right.&lt;/p&gt;

&lt;p&gt;This is a summary — the full version with every symbol and the SQL&lt;br&gt;
mapping lives at&lt;br&gt;
&lt;a href="https://www.figschema.com/blog/crows-foot-notation-cheat-sheet" rel="noopener noreferrer"&gt;figschema.com/blog/crows-foot-notation-cheat-sheet&lt;/a&gt;.&lt;br&gt;
And if you sketch this in FigJam,&lt;br&gt;
&lt;a href="https://www.figma.com/community/plugin/1678766841386689744/figschema" rel="noopener noreferrer"&gt;FigSchema&lt;/a&gt;&lt;br&gt;
draws the crow's foot for you — drag between two exact columns, pick the&lt;br&gt;
cardinality, and the symbols stay glued to the right rows while the&lt;br&gt;
diagram moves. Free, and offline.&lt;/p&gt;

</description>
      <category>database</category>
      <category>sql</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
