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
MySQL 5.7のJSON型について | MySQL Casual Talks in Fuk...
Search
Manabu Matsuzaki
December 13, 2016
Technology
0
1.2k
MySQL 5.7のJSON型について | MySQL Casual Talks in Fukuoka vol.6 #mysql_casual_fukuoka /mysql-casual-talks-fukuoka-vol6
Manabu Matsuzaki
December 13, 2016
Tweet
Share
More Decks by Manabu Matsuzaki
See All by Manabu Matsuzaki
Spring BootユーザのためのArmeria入門 #jsug / Introduce to Armeria for Spring users
matsumana
0
2.7k
Canary Release with Argo Rollouts #ふくばねてす / canary-release-with-argo-rollouts
matsumana
1
1.1k
Getting started Central Dogma with Golang #fukuokago #umedago / getting-started-central-dogma-with-golang
matsumana
0
860
Micrometer入門 #javaq / introduce-to-micrometer
matsumana
1
2.7k
ArmeriaとCentral Dogmaから学ぶ、マイクロサービスに必要な機能 #edayfuk / lean-from-armeria-and-central-dogma
matsumana
0
4.1k
SREcon19 Americas 参加レポート #srefukuoka / srecon19-americas-report
matsumana
0
830
SRE入門 & チームで取り組んでいるSRE #srefukuoka / introduce-to-sre
matsumana
0
1.2k
Introduce to Armeria and Central Dogma #GWD_Nulab / introduce-to-armeria-and-central-dogma
matsumana
0
550
Connector/JでMaster/Slave Replication構成のMySQLに接続する #mysql_casual_fukuoka /connector-j-master-slave-replication
matsumana
0
1.4k
Other Decks in Technology
See All in Technology
C++26 エラー性動作
faithandbrave
2
810
Fanstaの1年を大解剖! 一人SREはどこまでできるのか!?
syossan27
2
170
社外コミュニティで学び社内に活かす共に学ぶプロジェクトの実践/backlogworld2024
nishiuma
0
280
Storage Browser for Amazon S3
miu_crescent
1
280
統計データで2024年の クラウド・インフラ動向を眺める
ysknsid25
2
860
Wantedly での Datadog 活用事例
bgpat
1
580
5分でわかるDuckDB
chanyou0311
10
3.3k
APIとはなにか
mikanichinose
0
110
20241220_S3 tablesの使い方を検証してみた
handy
4
660
PHP ユーザのための OpenTelemetry 入門 / phpcon2024-opentelemetry
shin1x1
3
1.4k
PHPerのための計算量入門/Complexity101 for PHPer
hanhan1978
5
270
レンジャーシステムズ | 会社紹介(採用ピッチ)
rssytems
0
250
Featured
See All Featured
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.1k
A Tale of Four Properties
chriscoyier
157
23k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.6k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
17
2.3k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Site-Speed That Sticks
csswizardry
2
190
Optimizing for Happiness
mojombo
376
70k
Fashionably flexible responsive web design (full day workshop)
malarkey
405
66k
Become a Pro
speakerdeck
PRO
26
5k
We Have a Design System, Now What?
morganepeng
51
7.3k
Facilitating Awesome Meetings
lara
50
6.1k
Transcript
MySQL 5.7 ͷJSONܕ ʹ͍ͭͯ MySQL Casual Talks in Fukuoka vol.6
2016/11/09 @matsumana
ࣗݾհ • ໊લɿ দ࡚ ֶ • ॴଐɿ LINE Fukuokaגࣜձࣾ ιϑτΣΞΤϯδχΞʢ։ൃɾӡ༻ʣ
• Twitterɿ @matsumana
ΞδΣϯμ • JSONܕͷಛ • Java͔ΒͬͯΈͨ
5.7͕ϦϦʔε͞Εͯ Ұ͕ա͗·ͨ͠Ͷ
MySQLͷྺ࢙ • MySQL 5.7 ʢ2015/10ϦϦʔεʣ • MySQL 5.6 ʢ2013/02ϦϦʔεʣ •
MySQL 5.5 ʢ2010/12ϦϦʔεʣ • MySQL 5.1 ʢ2008/11ϦϦʔεʣ • MySQL 5.0 ʢ2005/10ϦϦʔεʣ • MySQL 4.1 ʢ2004/10ϦϦʔεʣ • MySQL 4.0 ʢ2003/03ϦϦʔεʣ • MySQL 3.23 ʢ2001/01ϦϦʔεʣ • MySQL 3.23Ҏલ
5.7ͬͯ·͔͢ʁ
5.7Ͱ170Λ͑Δ ػೳՃมߋ͕ ؚ·Ε͍ͯ·͢
શ෦Ѳ͢Δͷ ΊͬͪΌେมͰ͕͢
͓͢͢Ίͷຊ͕ ͋Γ·͢
ॻ੶ൃߦͷ͓ΒͤɿৄղMySQL 5.7 ʙਐԽͨ͠MySQLΛΑ͘ΔͨΊͷςΫχΧϧΨΠυʙ
͜ΕΛಡΜͩΒ 5.7Λ͍ͨ͘ͳΔͣ :)
ࠓճJSONܕʹ͍ͭͯ ௐͯདྷ·ͨ͠
MySQLͷJSONܕͷಛ • ετϨʔδΤϯδϯ্BLOBͱͯ֨͠ೲ͞Ε͍ͯΔ • JSON pathͰjsonͷ߲ΛࢀরͰ͖Δ • ->ԋࢉࢠ͕͋ΔͷͰɺSQL͕ͪΐͬͱݟ͍͢ • generated
columnػೳͱ߹Θͤͯ͏ͱɺjsonͷ߲ʹ ΠϯσοΫεషΕͨΓɺ੍Λ͚ͨΓग़དྷΔ
Java͔ΒͬͯΈͨ • αϯϓϧΞϓϦͷιʔε https://github.com/matsumana/mysql-json-sandbox • ڥ • OSɿ CentOS 7.2
(1511) • MySQLɿ 5.7.16 Community Edition • JDBC Driverɿ Connector/J 5.1.40 • Java8 (1.8.0_111) • Frameworkɿ Spring Boot 1.4.1 • ORMɿ MyBatis 3.4.0
αϯϓϧΞϓϦΛ σϞ͠ͳ͕Β આ໌͍͖ͯ͠·͢
ҙ • JSONܕΛ͑σʔλΛॊೈʹѻ͑ͯ ศརͦ͏Ͱ͋Γ·͕͢ɺԿͰ͔ΜͰ1ͭͷΧϥϜʹೖΕ ͯ͠·͏ઃܭɺʮEAVΞϯνύλʔϯʯͱݺΕ͍ͯ·͢ ˞ࢀߟ PostgreSQLͷΞϯνύλʔϯ : ԿͰ͔ΜͰjsonʹೖΕΔ
ϦϯΫू • MySQL :: MySQL 5.7 Reference Manual :: 12.6
The JSON Data Type • ॻ੶ൃߦͷ͓ΒͤɿৄղMySQL 5.7 ʙਐԽͨ͠MySQLΛΑ͘Δ ͨΊͷςΫχΧϧΨΠυʙ • MySQL 5.7.8͔ΒInnoDBͷgenerated column࣮ମΛऔΒͣʹΠϯ σοΫεΛ࡞ΕΔΑ͏ʹͳͬͨ • PostgreSQLͷΞϯνύλʔϯ : ԿͰ͔ΜͰjsonʹೖΕΔ • SQLΞϯνύλʔϯ • αϯϓϧΞϓϦͷιʔε