<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>hiroshinozawa</author_name>
  <author_url>https://blog.hatena.ne.jp/hiroshinozawa/</author_url>
  <blog_title>ヒロノート@WECSy Marketing</blog_title>
  <blog_url>https://hiroshinozawa.hatenadiary.org/</blog_url>
  <categories>
    <anon>MYSQL</anon>
  </categories>
  <description>最近画像はDBに格納するべきではないかという考え方が自分の中で一般化している。画像データを保存する方法で一般的なやり方は、どこかディレクトリを切ってそこに画像ファイルを置き、DBには画像のファイル名だけを持つというやり方が主流であると思う。しかし普通データ等はDBに格納するのが普通だ。ではなぜ今まで画像をDBに持たせる方法が浸透しなかったのだろうか。考察してみる。■元々DBはバイナリデータの保存に向いていない。よってDBに画像を格納する際に普通はbase64エンコード等をして文字型に変換して保存する為、データの容量が大きくなってしまう。またキャッシュ等が使えずに毎回動的に画像を生成するため、呼…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhiroshinozawa.hatenadiary.org%2Fentry%2F20081001%2F1222880087&quot; title=&quot;画像はデータベース（DB）に格納した方がいいのではないか？ - ヒロノート@WECSy Marketing&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2008-10-01 01:54:47</published>
  <title>画像はデータベース（DB）に格納した方がいいのではないか？</title>
  <type>rich</type>
  <url>https://hiroshinozawa.hatenadiary.org/entry/20081001/1222880087</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
