Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
なれる!データベース設計者
Search
KONDO Uchio
August 10, 2013
Education
1
330
なれる!データベース設計者
RG More! で見せた紙芝居
KONDO Uchio
August 10, 2013
Tweet
Share
More Decks by KONDO Uchio
See All by KONDO Uchio
大規模レガシーテストを 倒すための CI基盤の作り方 / #CICD2023
udzura
5
2.5k
Ruby x BPF in Action / RubyKaigi 2022
udzura
0
260
Narrative of Ruby & Rust
udzura
0
230
開発者生産性指標の可視化 / pepabo-four-keys
udzura
3
1.7k
Talk of RBS
udzura
0
460
Re: みなさん最近どうですか? / FGN tech meetup in 2021
udzura
0
790
Dockerとやわらかい仮想化 - ProSec-IT/SECKUN 2021 edition -
udzura
2
740
Device access filtering in cgroup v2
udzura
1
930
"Story of Rucy" on RubyKaigi takeout 2021
udzura
0
850
Other Decks in Education
See All in Education
Портфолио - Шынар Ауелбекова
shynar
0
100
今までのやり方でやってみよう!?~今までのやり方でやってみよう!?~
kanamitsu
0
170
CHARMS-HP-Banner
weltraumreisende
0
700
20250611_なんでもCopilot1年続いたぞ~
ponponmikankan
0
160
生成AI活用セミナー/GAI-workshop
gnutar
0
110
日本の情報系社会人院生のリアル -JAIST 修士編-
yurikomium
1
120
H5P-työkalut
matleenalaakso
4
40k
ARアプリを活用した防災まち歩きデータ作成ハンズオン
nro2daisuke
0
170
Open Source Summit Japan 2025のボランティアをしませんか
kujiraitakahiro
0
830
Avoin jakaminen ja Creative Commons -lisenssit
matleenalaakso
0
1.9k
2025/06/05_読み漁り学習
nag8
0
190
Tutorial: Foundations of Blind Source Separation and Its Advances in Spatial Self-Supervised Learning
yoshipon
1
150
Featured
See All Featured
Measuring & Analyzing Core Web Vitals
bluesmoon
9
580
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.7k
Typedesign – Prime Four
hannesfritz
42
2.8k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4k
It's Worth the Effort
3n
187
28k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
What's in a price? How to price your products and services
michaelherold
246
12k
How STYLIGHT went responsive
nonsquared
100
5.8k
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
Why You Should Never Use an ORM
jnunemaker
PRO
59
9.5k
Transcript
できる! 「データベース設計」 データベースを制するものは Webアプリを制す?
レッスン1 • 「お買い物サイト」を考えてみよう • どんな「モノ」が登場しますか? – お客様? – 商品? –
注文内容?
レッスン2 • 「注文伝票」には どんな「項目」がありますか? • Excelのようなもので考えてみましょう – 注文者 – 日時
– 商品名 – 個数...
レッスン3 • さきほどの「注文伝票」を 「無駄なく」整理してみましょう • 整理して、先ほどの「登場人物」と 対応づけてみましょう
無駄なく整理 • このことをデータベースの言葉で 正規化 • と言います。最も基本的な操作です。
レッスン4 • さっき整理した「モデル」たちを 図にしてみよう • モデルたちの「関係」を図にします • 「ER図」と呼んだりします
関係とは? • 1:1 – ユーザー --- 所属会社 • 1:多(1:N) –
ユーザー --< 注文履歴 • 多:多(N:N) – ユーザー >-< フレンド
レッスン5 • さっき整理整頓した「モデル」を Railsのモデルにしてみましょう • (やっとコードが書けますね...!!!)
まとめ • データベースは、Webアプリケーションづくりの 心臓 • です! • 練習をすれば誰でも身に付くものなので、 いろいろなものを「データベース設計」 してみましょう。
参考資料 • 「らくらくERDレッスン」 (翔泳社)