<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Data-Modeling on Debimate</title><link>https://debimate.jp/tags/data-modeling/</link><description>Recent content in Data-Modeling on Debimate</description><image><title>Debimate</title><url>https://debimate.jp/images/default-ogp.webp</url><link>https://debimate.jp/images/default-ogp.webp</link></image><generator>Hugo -- 0.166.0</generator><language>ja-JP</language><lastBuildDate>Thu, 03 Sep 2026 22:30:00 +0900</lastBuildDate><atom:link href="https://debimate.jp/tags/data-modeling/index.xml" rel="self" type="application/rss+xml"/><item><title>Soft Delete - 削除フラグを最初の選択肢にしない</title><link>https://debimate.jp/notes/database-systems/soft-delete/</link><pubDate>Tue, 11 Aug 2026 00:00:00 +0000</pubDate><guid>https://debimate.jp/notes/database-systems/soft-delete/</guid><description>&lt;p&gt;削除フラグとは、行を &lt;code&gt;DELETE&lt;/code&gt; する代わりに「削除済み」を表す列を立て、通常の問い合わせからその行を除外する設計です。&lt;code&gt;is_deleted&lt;/code&gt; のような真偽値の列や、&lt;code&gt;deleted_at&lt;/code&gt; のような日時の列で表し、論理削除（logical delete、soft delete）とも呼ばれます。行そのものを表から取り除く物理削除と対になる語です。&lt;/p&gt;</description></item><item><title>Foreign Key - 参照先の存在を DB に保証させる</title><link>https://debimate.jp/notes/database-systems/foreign-key/</link><pubDate>Wed, 12 Aug 2026 00:00:00 +0000</pubDate><guid>https://debimate.jp/notes/database-systems/foreign-key/</guid><description>&lt;p&gt;外部キー制約（foreign key constraint）は、ある表の列に入っている値が、別の表に実在する行を指している事を DB（データベース）に保証させる仕組みです。PostgreSQL のドキュメントには、この制約が指定するのは「&lt;a href="https://www.postgresql.org/docs/current/ddl-constraints.html"&gt;the values in a column (or a group of columns) must match the values appearing in some row of another table&lt;/a&gt;」（1 つの列、または複数の列の組の値が、別の表のいずれかの行に現れる値と一致しなければならない）事だと書かれています。この保証が保たれている状態を参照整合性（referential integrity）と呼びます。&lt;/p&gt;</description></item><item><title>UNIQUE Constraint - 重複を最後に止める場所を決める</title><link>https://debimate.jp/notes/database-systems/unique-constraint/</link><pubDate>Wed, 12 Aug 2026 00:00:00 +0000</pubDate><guid>https://debimate.jp/notes/database-systems/unique-constraint/</guid><description>&lt;p&gt;一意制約（unique constraint）は、ある列、または複数の列の組に入っている値が表の中で重複しない事を DB（データベース）に保証させる仕組みです。SQL では、列の定義に &lt;code&gt;UNIQUE&lt;/code&gt; を書くか、表に対して &lt;code&gt;UNIQUE (列名, ...)&lt;/code&gt; を書いて宣言します。&lt;/p&gt;</description></item></channel></rss>