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
320
なれる!データベース設計者
RG More! で見せた紙芝居
KONDO Uchio
August 10, 2013
Tweet
Share
More Decks by KONDO Uchio
See All by KONDO Uchio
大規模レガシーテストを 倒すための CI基盤の作り方 / #CICD2023
udzura
5
2.3k
Ruby x BPF in Action / RubyKaigi 2022
udzura
0
210
Narrative of Ruby & Rust
udzura
0
190
開発者生産性指標の可視化 / pepabo-four-keys
udzura
3
1.6k
Talk of RBS
udzura
0
410
Re: みなさん最近どうですか? / FGN tech meetup in 2021
udzura
0
730
Dockerとやわらかい仮想化 - ProSec-IT/SECKUN 2021 edition -
udzura
2
700
Device access filtering in cgroup v2
udzura
1
810
"Story of Rucy" on RubyKaigi takeout 2021
udzura
0
760
Other Decks in Education
See All in Education
HyRead2425
cbtlibrary
0
120
ISMS審査準備ブック_サンプル【LRM 情報セキュリティお役立ち資料】
lrm
0
1.1k
子どものためのプログラミング道場『CoderDojo』〜法人提携例〜 / Partnership with CoderDojo Japan
coderdojojapan
4
15k
Nodiレクチャー 「CGと数学」講義資料 2024/11/19
masatatsu
1
300
開発終了後こそ成長のチャンス!プロダクト運用を見送った先のアクションプラン
ohmori_yusuke
2
290
Why Did Douglass Change His Mind?
oripsolob
0
280
Ch2_-_Partie_3.pdf
bernhardsvt
0
130
Medidas en informática
irocho
0
1.1k
JAWS-UGを通じてアウトプット活動を楽しんでみませんか? #jawsug_tochigi
masakiokuda
0
160
MySmartSTEAM2425
cbtlibrary
0
110
5 Things Every L&D Pro Should Steal from Marketing
tmiket
0
150
BrightonSEO, San Diego, CA 2024
mchowning
0
120
Featured
See All Featured
Optimising Largest Contentful Paint
csswizardry
34
3.1k
Automating Front-end Workflow
addyosmani
1367
200k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
175
51k
Six Lessons from altMBA
skipperchong
27
3.6k
Code Review Best Practice
trishagee
66
17k
Practical Orchestrator
shlominoach
186
10k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
8
270
BBQ
matthewcrist
86
9.5k
RailsConf 2023
tenderlove
29
1k
Visualization
eitanlees
146
15k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
How STYLIGHT went responsive
nonsquared
98
5.3k
Transcript
できる! 「データベース設計」 データベースを制するものは Webアプリを制す?
レッスン1 • 「お買い物サイト」を考えてみよう • どんな「モノ」が登場しますか? – お客様? – 商品? –
注文内容?
レッスン2 • 「注文伝票」には どんな「項目」がありますか? • Excelのようなもので考えてみましょう – 注文者 – 日時
– 商品名 – 個数...
レッスン3 • さきほどの「注文伝票」を 「無駄なく」整理してみましょう • 整理して、先ほどの「登場人物」と 対応づけてみましょう
無駄なく整理 • このことをデータベースの言葉で 正規化 • と言います。最も基本的な操作です。
レッスン4 • さっき整理した「モデル」たちを 図にしてみよう • モデルたちの「関係」を図にします • 「ER図」と呼んだりします
関係とは? • 1:1 – ユーザー --- 所属会社 • 1:多(1:N) –
ユーザー --< 注文履歴 • 多:多(N:N) – ユーザー >-< フレンド
レッスン5 • さっき整理整頓した「モデル」を Railsのモデルにしてみましょう • (やっとコードが書けますね...!!!)
まとめ • データベースは、Webアプリケーションづくりの 心臓 • です! • 練習をすれば誰でも身に付くものなので、 いろいろなものを「データベース設計」 してみましょう。
参考資料 • 「らくらくERDレッスン」 (翔泳社)