Upgrade to Pro — share decks privately, control downloads, hide ads and more …

ドメイン名の話 (データベース,SQL)

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.

ドメイン名の話 (データベース,SQL)

データベースのドメイン名の話

Avatar for tsuda.a

tsuda.a

July 04, 2015
Tweet

More Decks by tsuda.a

Other Decks in Programming

Transcript

  1. ドメイン名の利点1: 自然結合  普通に結合 select * from TABLE_A inner join

    TABLE_B on TABLE_A.key1 = TABLE_B.key1;  こう書ける select * from TABLE_A natural join TABLE_B;
  2. 利点2の場合は、実は別の方法もある  create domain 文 本当にデータ型を作る -- PostgreSQL の例 create

    domain file_size as numeric(12); create table TABLE_A( key1 as varchar(10), size as file_size ); -- Oracle にはない模様