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

PHPerに知ってほしいRDBの事 その3

PHPerに知ってほしいRDBの事 その3

PHPカンファレンス関西 2016の資料です。
http://conference.kphpug.jp/2016/

88f4e84b94fe07cddbd9e6479d689192?s=128

soudai sone

July 09, 2016
Tweet

More Decks by soudai sone

Other Decks in Technology

Transcript

  1. PHPerʹ஌ͬͯ΄͍͠RDBͷࣄ Version 3.0 1)1ΧϯϑΝϨϯεˏؔ੢

  2. What is it? σʔλϕʔεͷण໋͸ ΞϓϦέʔγϣϯΑΓ΋௕͍

  3. What is it? ͦΜͳ௕͍෇͖߹͍ʹͳΔσʔλϕʔε ͷେ੾ͳࣄΛ͓఻͑͠·͢

  4. What is it? σʔλϕʔεͰ େ੾ͳ͜ͱ ΞϓϦέʔγϣϯͰ େ੾ͳ͜ͱ

  5. What is it? ΞϓϦέʔγϣϯͰ େ੾ͳ͜ͱ σʔλϕʔεͰ େ੾ͳ͜ͱ ͜͜ͷ࿩Λ͠·͢

  6. What is it? ର৅ͷσʔλϕʔειϑτ΢ΣΞ

  7. What is it? PostgreSQL 9.5ͱMySQL 5.7(InnoDB)ʹݶΔ ଞͷRDBͷ࿩͸͠·ͤΜ

  8. What is it? ׆༻ࣄྫ΍ηΩϡϦςΟͳͲͷ࿩ ↓ ֤σʔλϕʔεͷίϛϡχςΟʹࢀՃ͠Α͏ https://mysql-casual-slackin.herokuapp.com/ https://postgresql-hackers-jp.herokuapp.com/ େ੾ͳ࿩͚ͩͲࠓ೔͸͠ͳ͍͜ͱ

  9. What is it? ࠓ೔ͷ࿩͢Δ͜ͱ

  10. What is it? RDBΛ࢖͏্Ͱ͓͍֮͑ͯͯཉ͍͜͠ͱ

  11. What is it? RDBΛ࢖͏্Ͱ͓͍֮͑ͯͯཉ͍͜͠ͱ ↓ جૅతͳ͜ͱͰ͙࣮͢ફͰ͖Δ͜ͱ

  12. ͋͐͡Μͩ ̍ɹࣗݾ঺հ ̎ɹݕࡧͱINDEX ̏ɹεΩʔϚϨε ̐ɹΞϯνύλʔϯ ̑ɹ·ͱΊ

  13. ͋͐͡Μͩ ̍ɹࣗݾ঺հ ̎ɹݕࡧͱINDEX ̏ɹεΩʔϚϨε ̐ɹΞϯνύλʔϯ ̑ɹ·ͱΊ

  14. ࣗݾ঺հ ໊લɿીࠜɹ૖େʢͦͶɹ͚ͨͱ΋ʣ ೥ྸɿ31ࡀʢࡾਓͷࢠڙ͕͍·͢ʣ ৬ۀɿגࣜձࣾɹΦϛΧϨʢCTOʣ ॴଐɿ೔ຊPostgreSQLϢʔβձ ɹɹɹதࠃࢧ෦ ࢧ෦௕ ɹɹٕज़తʹ͸LLܥݴޠͱ͔RDB͕޷͖Ͱ͢

  15. What is it? d

  16. ࣗݾ঺հ ໊લɿીࠜɹ૖େʢͦͶɹ͚ͨͱ΋ʣ ೥ྸɿ31ࡀʢࡾਓͷࢠڙ͕͍·͢ʣ ৬ۀɿגࣜձࣾɹΦϛΧϨʢCTOʣ ॴଐɿ೔ຊPostgreSQLϢʔβձ ɹɹɹதࠃࢧ෦ ࢧ෦௕ ɹɹٕज़తʹ͸LLܥݴޠͱ͔RDB͕޷͖Ͱ͢

  17. ͋͐͡Μͩ ̍ɹࣗݾ঺հ ̎ɹݕࡧͱINDEX ̏ɹεΩʔϚϨε ̐ɹΞϯνύλʔϯ ̑ɹ·ͱΊ

  18. ݕࡧͱINDEX #5SFF*/%&9

  19. ݕࡧͱINDEX #5SFF*/%&9 3%#ͷ*/%&9͸جຊతʹ͜Ε ʢ(*/΍35SFFʹ͍ͭͯ͸ࠓճ৮Εͳ͍ʣ

  20. ݕࡧͱINDEX Ҿ༻ݩɿIUUQTKBXJLJQFEJBPSHXJLJ##&$" ΢ΟΩϖσΟΞʮ# ໦ʯ

  21. ݕࡧͱINDEX w 8)&3&۟Ͱ࢖͏ w (3061#:۟Ͱ΋࢖͏ w 03%&3#:۟Ͱ΋࢖͏

  22. ݕࡧͱINDEX w 8)&3&۟Ͱ࢖͏ w (3061#:۟Ͱ΋࢖͏ w 03%&3#:۟Ͱ΋࢖͏ ݕࡧશൠͰ࢖͏

  23. ݕࡧͱINDEX w 8)&3&۟Ͱ࢖͏ w (3061#:۟Ͱ΋࢖͏ w 03%&3#:۟Ͱ΋࢖͏ ݕࡧશൠͰ࢖͏ ͔͠͠.Z42-͸ͭͷ5"#-&Ͱ ͔ͭ͠*/%&9Λ࢖Θͳ͍

  24. ݕࡧͱINDEX */%&9ΛޮՌతʹ࢖͏ʹ͸ w ॏෳ͕গͳ͍΄͏͕ྑ͍ w ݁Ռ͕গͳ͍΄͏͕ྑ͍

  25. ݕࡧͱINDEX */%&9ΛޮՌతʹ࢖͏ʹ͸ w ॏෳ͕গͳ͍΄͏͕ྑ͍ w ݁Ռ͕গͳ͍΄͏͕ྑ͍ 6OJRVF͕ཧ૝ ॏෳ͕ଟ͍৔߹ɺ*/%&9ͷҙຯ͕ബΕΔ Α͋͘Δͷ͸%&-&5&@'-"(

  26. ݕࡧͱINDEX */%&9ΛޮՌతʹ࢖͏ʹ͸ w ॏෳ͕গͳ͍΄͏͕ྑ͍ w ݁Ռ͕গͳ͍΄͏͕ྑ͍ ࢀরͷ5"#-&ͷશͯΛදࣔ͢ΔͳΒݩ͔Βશ ෦ݟͨ΄͏͕ྑ͍ શମͷʙ·Ͱ͕*/%&9ར༻ͷ໨҆

  27. ݕࡧͱINDEX */%&9Λ੍͢Δऀ͸ݕࡧΛ੍͢Δ

  28. ݕࡧͱINDEX ࣮ߦܭըΛݟΔ

  29. ݕࡧͱINDEX &91-"*/Ͱॏཁͳ͜ͱ w ૝ఆ͢ΔϨίʔυʹ࣮σʔλΛ͋ΘͤΔ w ౷ܭ৘ใΛ࠷৽ʹ͢Δ w ࣮ߦ݁Ռ͕ਖ਼͍͜͠ͱΛ֬ೝ͢Δ

  30. ݕࡧͱINDEX &91-"*/ͷ·ͱΊ w ެࣜυΩϡϝϯτΛಡ΋͏ UZQFͳͲ͸छྨ͕୔ࢁ͋Δ 
 IUUQTEFWNZTRMDPNEPDSFGNBOKBFYQMBJOPVUQVUIUNM
 IUUQTXXXQPTUHSFTRMKQEPDVNFOUIUNMTRMFYQMBJOIUNM w ૉৼΓେࣄ

  31. ݕࡧͱINDEX .Z42-8PSLCFODI QHBENJO

  32. ࣮ߦܭը CREATE TABLE `demo`.`users` ( `id` INT NOT NULL AUTO_INCREMENT

    COMMENT '', `name` VARCHAR(45) NOT NULL COMMENT '', `age` INT NOT NULL COMMENT '', `created` DATETIME NOT NULL DEFAULT NOW () COMMENT '', PRIMARY KEY (`id`) COMMENT '' ); ——શ݅Λબ୒͢ΔͷͰςʔϒϧεΩϟϯ SELECT * FROM demo.users; ——PRIMARY KEYʢINDEXʣΛར༻ͨ͠ྫ SELECT * FROM demo.users WHERE id > 100; ——INDEX͕ແ͍ͷͰςʔϒϧεΩϟϯ SELECT * FROM demo.users WHERE age > 20;
  33. MySQL

  34. MySQL

  35. MySQL ૬ؔαϒΫΤϦ

  36. ૬ؔαϒΫΤϦ ——஗͍૬ؔαϒΫΤϦ SELECT * FROM users WHERE age IN (SELECT

    age FROM users WHERE id BETWEEN 10 AND 100000)
  37. MySQL

  38. MySQL .Z42-͔Β."5&3*"-*;&%ʹ มΘΓɺ+0*/ͷΑ͏ͳڍಈʹͳͬͨ ੲΑΓૣ͘ͳͬͨ

  39. ૬ؔαϒΫΤϦ ——INDEX͕ར༻Ͱ͖Ε͹૬ؔαϒΫΤϦͰ΋଎͍ SELECT * FROM users WHERE created = '2016-02-27

    04:31:32' AND id IN (SELECT id FROM users WHERE id BETWEEN 10 AND 100000)
  40. MySQL

  41. MySQL ૬ؔαϒΫΤϦ͸஗͍ ৔߹͕ଟ͍

  42. MySQL ૬ؔαϒΫΤϦ͸஗͍ ˣ +0*/ʹॻ͖׵͑Δ

  43. JOIN SELECT * FROM users INNER JOIN users AS tmp

    ON tmp.id = users.id AND tmp.id BETWEEN 10 AND 100000 WHERE users.created = '2016-02-27 04:31:32'
  44. MySQL

  45. MySQL +0*/͸ֻ͚ࢉ

  46. MySQL +0*/͸ֻ͚ࢉ ˣ ߦ☓ߦ͸ߦ

  47. MySQL .Z42-ʹ͸ +0*/ͷΞϧΰϦζϜ͸Ұ͔ͭ͠ͳ͍

  48. MySQL .Z42-ʹ͸ +0*/ͷΞϧΰϦζϜ͸Ұ͔ͭ͠ͳ͍ ܾͯ͠ಘҙͳΘ͚Ͱ͸ແ͍ +0*/͸ϋΠίετͳΫΤϦ

  49. MySQL w ग़དྷΔ͚ͩখ͔ͯ͘͞͠Β+0*/ w ෆཁͳ+0*/͸ආ͚Δ w */%&9Λར༻ͨ͠+0*/Λ͢Δ

  50. MySQL γϯϓϧɾߴ଎

  51. MySQL γϯϓϧɾߴ଎ ˣ ೉͍͠ࣄΛ͠ͳ͍ ઃܭྗ͕ॏཁ

  52. PostgreSQL w*/%&9͸ෳ਺ݸ࢖͑Δ wͦ΋ͦ΋*/%&9ͷछྨ͕୔ࢁ͋Δ w૬ؔαϒΫΤϦ΋଎͍ w+0*/ͷΞϧΰϦζϜ΋ෳ਺͋Δ

  53. PostgreSQL w*/%&9͸ෳ਺ݸ࢖͑Δ wͦ΋ͦ΋*/%&9ͷछྨ͕୔ࢁ͋Δ w૬ؔαϒΫΤϦ΋଎͍ w+0*/ͷΞϧΰϦζϜ΋ෳ਺͋Δ ͭͷΫΤϦ಺Ͱෳ਺࢖͑Δ

  54. PostgreSQL w*/%&9͸ෳ਺ݸ࢖͑Δ wͦ΋ͦ΋*/%&9ͷछྨ͕୔ࢁ͋Δ w૬ؔαϒΫΤϦ΋଎͍ w+0*/ͷΞϧΰϦζϜ΋ෳ਺͋Δ #USFFɺ(*/ɺࣜ*/%&9ͳͲγʔϯʹ߹Θͤͯ ෳ਺ͷ*/%&9Λར༻Ͱ͖Δ

  55. PostgreSQL w*/%&9͸ෳ਺ݸ࢖͑Δ wͦ΋ͦ΋*/%&9ͷछྨ͕୔ࢁ͋Δ w૬ؔαϒΫΤϦ΋଎͍ w+0*/ͷΞϧΰϦζϜ΋ෳ਺͋Δ ࢖͑Δ42-ͷߏจ΋ଟ͍ ྫ͑͹΢Πϯυ΢ؔ਺ͳͲ

  56. PostgreSQL w*/%&9͸ෳ਺ݸ࢖͑Δ wͦ΋ͦ΋*/%&9ͷछྨ͕୔ࢁ͋Δ w૬ؔαϒΫΤϦ΋଎͍ w+0*/ͷΞϧΰϦζϜ΋ෳ਺͋Δ /FTUFE-PPQ+PJO 4PSU.FSHF+PJO )BTI+PJO

  57. PostgreSQL

  58. PostgreSQL ͜ͷຊ͕͘͢͝ྑ͍ ͔͠͠ͷ࿩ IUUQXXXBNB[PODPKQ಺෦ߏ଄͔ΒֶͿ1PTUHSF42-ઃܭɾӡ༻ܭըͷమଇ4PGUXBSF%FTJHOQMVTEQ

  59. ෳ਺ར༻ͨ͠INDEX CREATE TABLE public.users ( id integer NOT NULL DEFAULT

    nextval('users_id_seq'::regclass), name text NOT NULL, age integer NOT NULL, created timestamp without time zone NOT NULL DEFAULT now(), CONSTRAINT users_pkey PRIMARY KEY (id)); CREATE INDEX users_created_idx ON public.users USING tree (created); ——idͱcreatedͷINDEXΛར༻͢Δ SELECT * FROM users WHERE id < 100 AND created < '2016-02-27 05:41:28';
  60. PostgreSQL

  61. ࣜINDEX ——ࣜINDEXΛ࡞੒ CREATE INDEX test_idx ON users (substr(name,10,12)); ——ࣜͷ݁ՌͰINDEX͕ޮ͘ SELECT

    name FROM users WHERE substr(name,10,12) = '10'
  62. PostgreSQL

  63. ૬ؔαϒΫΤϦ SELECT * FROM users WHERE age IN (SELECT age

    FROM users WHERE id BETWEEN 10 AND 100000)
  64. PostgreSQL

  65. ૬ؔαϒΫΤϦ ——σϞͰINDEXΛ࢖ͬͯ͘Εͳ͍ͷͰINDEXΛ༏ઌతʹར༻͢ΔΑ͏ʹࢦఆ SET ENABLE_SEQSCAN=OFF; SELECT * FROM users WHERE id

    IN (SELECT id FROM users WHERE id BETWEEN 10 AND 100000)
  66. PostgreSQL

  67. PostgreSQL 1PTUHSF42-ͷ૬ؔαϒΫΤϦ͸ ൺֱత଎͍

  68. PostgreSQL ෳࡶͳूܭ͸ಘҙ ˣ Ͱ΋3%#ͷجຊ͸.Z42-ͱҰॹ

  69. ͋͐͡Μͩ ̍ɹࣗݾ঺հ ̎ɹݕࡧͱINDEX ̏ɹεΩʔϚϨε ̐ɹΞϯνύλʔϯ ̑ɹ·ͱΊ

  70. εΩʔϚϨεͱਖ਼نԽ w σʔλ͸ফͤͳ͍ w σʔλΛมߋͰ͖ͳ͍ w σʔλͷ௥ՃͰରԠ

  71. εΩʔϚϨεͱਖ਼نԽ σʔλͷෆ੔߹Ͱ೰·ͳ͍ͨΊʹ

  72. εΩʔϚϨεͱਖ਼نԽ σʔλͷෆ੔߹Ͱ೰·ͳ͍ͨΊʹ جຊ͸ਖ਼نԽʂʂ

  73. ਖ਼نԽ ΞϯέʔτϑΥʔϜ

  74. JE ໊લ ճ౴  TPOF IPHF  40/& GVHB 

    TPVEBJ GPP  UBLFUPNP CBS
  75. ਖ਼نԽ ΫϥΠΞϯτʮ͜͜ʹ࢓༷͕͋Δ͡ΌΖʁʯ ʈТʈ  㱭ʮ୒Ұճ౴ʯ㱬

  76. ਖ਼نԽ ΫϥΠΞϯτʮ͜͜ʹ࢓༷͕͋Δ͡ΌΖʁʯ ͜ΕΛ ʈТʈ  㲇㱭㱬㲇

  77. ਖ਼نԽ ΫϥΠΞϯτʮ͜͜ʹ࢓༷͕͋Δ͡ΌΖʁʯ ʈТʈ  㱭ʮෳ਺ճ౴ʯ㱬

  78. ਖ਼نԽ ରԠྫ w $47ʹͯ͠ೖΕΔ w ΧϥϜΛ૿΍ͯ͠ೖΕΔ w +40/ΛUFYUͰೖΕΔˡ/&8ʂ

  79. ਖ਼نԽ ରԠྫ w $47ʹͯ͠ೖΕΔ w ΧϥϜΛ૿΍ͯ͠ೖΕΔ w +40/ΛUFYUͰೖΕΔˡ/&8ʂ

  80. ਖ਼نԽ ରԠྫ w $47ʹͯ͠ೖΕΔ w ΧϥϜΛ૿΍ͯ͠ೖΕΔ w +40/ΛUFYUͰೖΕΔˡ/&8ʂ

  81. ਖ਼نԽ ରԠྫ w $47ʹͯ͠ೖΕΔ w ΧϥϜΛ૿΍ͯ͠ೖΕΔ w +40/ΛUFYUͰೖΕΔˡ/&8ʂ શ෦42-Ξϯνύλʔϯʂ

  82. ਖ਼نԽ δΣΠ΢ΥʔΫ͕ͳͥμϝ͔ w ݕࡧ͕ࢮ͵ -*,&bژ౎`Ͱ౦ژ౎΋ώοτ  w ूܭ͕ࢮ͵ (3061#:ͳͲू໿ؔ਺͕࢖͑ͳ͍ 

    w ߋ৽͕ࢮ͵ ੍໿͕ग़དྷͳ͍͠෦෼ߋ৽ग़དྷͳ͍
  83. ਖ਼نԽ ͳͷͰਖ਼نԽΛ͢Δ

  84. JE OBNF  TPOF  40/&  TPVEBJ  UBLFUPNP

    JE ࣭໰  ࣭໰̍  ࣭໰̎  ࣭໰̏  ࣭໰̐ ճ౴ऀ@JE ࣭໰@JE ճ౴ ճ౴೔   IPHF    GVHB    GPP    CBS  ճ౴ऀ ࣭໰ ճ౴
  85. ਖ਼نԽ ਖ਼نԽ͢Δ͜ͱͰ σʔλͷߏ଄͕ڧ͘ͳΔ

  86. εΩʔϚϨε ࢓༷มߋͷͨͼʹ %#ߏ଄Λมߋ͢Δͷ͸େม

  87. εΩʔϚϨε ͦ͜Ͱ+40/ܕ

  88. εΩʔϚϨε .Z42-ˠ+40/ܕ cc 1PTUHSF42-ˠ+40/#ܕ

  89. εΩʔϚϨε 5&95ܕʹ+40/ೖΕΔͷͱ Կ͕ҧ͏ͷʁ

  90. εΩʔϚϨε ରԠྫ w ਖ਼͍͠+40/Ͱ༗Δ͜ͱ͕୲อग़དྷΔ w +40/ͷॊೈͳݕࡧ͕ग़དྷΔ w */%&9ΛషΔखஈ͕༻ҙ͞Ε͍ͯΔ

  91. εΩʔϚϨε ରԠྫ w ਖ਼͍͠+40/Ͱ༗Δ͜ͱ͕୲อग़དྷΔ w +40/ͷॊೈͳݕࡧ͕ग़དྷΔ w */%&9ΛషΔखஈ͕༻ҙ͞Ε͍ͯΔ */4&35ͷ࣌ʹσʔλͷόϦσʔγϣϯ͕͋Δ

  92. εΩʔϚϨε ରԠྫ w ਖ਼͍͠+40/Ͱ༗Δ͜ͱ͕୲อग़དྷΔ w +40/ͷॊೈͳݕࡧ͕ग़དྷΔ w */%&9ΛషΔखஈ͕༻ҙ͞Ε͍ͯΔ ,FZͷ͍͋·͍ݕࡧͳͲͦΕͧΕ༻ҙ͞ΕͯΔ

  93. εΩʔϚϨε ରԠྫ w ਖ਼͍͠+40/Ͱ༗Δ͜ͱ͕୲อग़དྷΔ w +40/ͷॊೈͳݕࡧ͕ग़དྷΔ w */%&9ΛషΔखஈ͕༻ҙ͞Ε͍ͯΔ .Z42-ͳΒ(FOFSBUFEDPMVNO 1PTUHSF42-ͳΒࣜ*/%&9ͰରԠՄೳ

  94. JE OBNF QSPQFSUJFT  UFTU \lOBNFzzIPHF lBHFz zSPMFz^  UFTU

    \lOBNFzzGVHB lBHFz zSPMFz^  UFTU \lOBNFzzCBSz lBHFz zSPMFz^  UFTU \lOBNFzzGPPz lBHFz zSPMFz^  UFTU \lOBNFzUPUP lBHFz zSPMFz^  UFTU \lOBNFzzUJUJz lBHFz zSPMFz^  UFTU \lOBNFzzUBUBz lBHFz zSPMFz^ ɿ ɿ ɿ ɿ ɿ ɿ
  95. εΩʔϚϨε ஋Λࢦఆͨ͠ݕࡧ͕ग़དྷΔ

  96. ࣮ࡍͷSQL(PostgreSQL) SELECT * FROM demo_json WHERE properties->>”name” = “hoge”

  97. ࣮ࡍͷSQL(PostgreSQL) SELECT * FROM demo_json WHERE properties->>”name” = ‘hoge’ +40/ͷ஋Λࢦఆͯ͠௚઀ݕࡧग़དྷΔ

  98. ࣮ࡍͷSQL(MySQL) SELECT * FROM demo_json WHERE json_extract(properties,'$.name') = 'hoge';

  99. ࣮ࡍͷSQL(MySQL) SELECT * FROM demo_json WHERE json_extract(properties,'$.name') = 'hoge'; ؔ਺ʹݕࡧ͍ͨ͠,FZΛࢦఆ͢Δ

  100. JSONܕͱJSONBܕ */%&9Λࢦఆ͢Δ

  101. ࣮ࡍͷSQL(PostgreSQL) CREATE INDEX ɹɹdemo_json_index ON ɹɹdemo_json ɹɹ(properties->>'name');

  102. ࣮ࡍͷSQL(PostgreSQL) CREATE INDEX ɹɹdemo_json_index ON ɹɹdemo_json ɹɹ(properties->>'name'); */%&9໊

  103. ࣮ࡍͷSQL(PostgreSQL) CREATE INDEX ɹɹdemo_json_index ON ɹɹdemo_json ɹɹ(properties->>'name'); */%&9໊ ର৅ςʔϒϧ

  104. ࣮ࡍͷSQL(PostgreSQL) CREATE INDEX ɹɹdemo_json_index ON ɹɹdemo_json ɹɹ(properties->>'name'); */%&9໊ ର৅ςʔϒϧ ࣜΛࢦఆ͢Δ

  105. MySQLͷ৔߹ ࣜ*/%&9͕ແ͍ ˣ (FOFSBUFEDPMVNOΛ࢖͏

  106. MySQLͷ৔߹ JE OBNF QSPQFSUJFT Ծ૝ྻ  UFTU \lOBNFzzIPHF lBHFz zSPMFz^

    IPHF  UFTU \lOBNFzzGVHB lBHFz zSPMFz^ GVHB  UFTU \lOBNFzzCBSz lBHFz zSPMFz^ CBS  UFTU \lOBNFzzGPPz lBHFz zSPMFz^ GPP ɿ ɿ ɿ ɿ ɿ ɿ
  107. MySQLͷ৔߹ JE OBNF QSPQFSUJFT Ծ૝ྻ  UFTU \lOBNFzzIPHF lBHFz zSPMFz^

    IPHF  UFTU \lOBNFzzGVHB lBHFz zSPMFz^ GVHB  UFTU \lOBNFzzCBSz lBHFz zSPMFz^ CBS  UFTU \lOBNFzzGPPz lBHFz zSPMFz^ GPP ɿ ɿ ɿ ɿ ɿ ɿ +40/ͷݕࡧ݁ՌΛྻʹͰ͖Δ
  108. MySQLͷ৔߹ JE OBNF QSPQFSUJFT Ծ૝ྻ  UFTU \lOBNFzzIPHF lBHFz zSPMFz^

    IPHF  UFTU \lOBNFzzGVHB lBHFz zSPMFz^ GVHB  UFTU \lOBNFzzCBSz lBHFz zSPMFz^ CBS  UFTU \lOBNFzzGPPz lBHFz zSPMFz^ GPP ɿ ɿ ɿ ɿ ɿ ɿ +40/ͷݕࡧ݁ՌΛྻʹͰ͖Δ ͜͜ʹ*/%&9ΛషΔ
  109. JSONܕͱJSONBܕ ੍໿Λઃ͚Εͳ͍ ˣ ֎෦Ωʔ΍Ұҙ੍໿͕ͳ͍

  110. JSONܕͱJSONBܕ σʔλొ࿥ͷτϨʔυΦϑ

  111. JSONܕͱJSONBܕ σʔλొ࿥ͷτϨʔυΦϑ ˣ ࣗ༝ͳอଘɹ㱻ɹਖ਼͘͠कΔ

  112. JSONܕͱJSONBܕ ཁ݅ʹ߹Θͤͯબ୒ࢶΛબͿ

  113. JSONܕͱJSONBܕ ·ͱΊ ̍ɹ஋Ͱݕࡧ͕ग़དྷΔ ̎ɹ஋ͷݕࡧͰ*/%&9͕࢖͑Δ ̏ɹཁ݅ʹ߹Θͤͯબ୒ࢶΛબͿ

  114. εΩʔϚϨε ͜Μͳ৔߹͸࢖ͬͯ΋͍͍

  115. εΩʔϚϨε ར༻ྫ w +40/ͱଞͷςʔϒϧ͕௚઀ؔ࿈͠ͳ͍ w +40/ͷதͷ஋΍,FZͷ"EEͳͲͷ61%"5&ແ͍ w */4&35ͱ4&-&$5͕େ൒ͷߏ଄Ͱ͋Δ

  116. εΩʔϚϨε ར༻ྫ w +40/ͱଞͷςʔϒϧ͕௚઀ؔ࿈͠ͳ͍ w +40/ͷதͷ஋΍,FZͷ"EEͳͲͷ61%"5&ແ͍ w */4&35ͱ4&-&$5͕େ൒ͷߏ଄Ͱ͋Δ +40/ͷதͷ஋͕֎෦Ωʔ੍໿Λඞཁͱ͠ͳ͍

  117. εΩʔϚϨε ར༻ྫ w +40/ͱଞͷςʔϒϧ͕௚઀ؔ࿈͠ͳ͍ w +40/ͷதͷ஋΍,FZͷ"EEͳͲͷ61%"5&ແ͍ w */4&35ͱ4&-&$5͕େ൒ͷߏ଄Ͱ͋Δ ෦෼ߋ৽͸͋Δ͕ߴ଎Ͱ͸ͳ͍ খ͍͞+40/Λѻ͏ͳΒྑ͍

  118. εΩʔϚϨε ར༻ྫ w +40/ͱଞͷςʔϒϧ͕௚઀ؔ࿈͠ͳ͍ w +40/ͷதͷ஋΍,FZͷ"EEͳͲͷ61%"5&ແ͍ w */4&35ͱ4&-&$5͕େ൒ͷߏ଄Ͱ͋Δ +40/Λؙͬͱ61%"5&Ͱ͸ͳ͘සൟʹ ཁૉͷมߋ͕ඞཁͳ৔߹ɺͦΕ͸ਖ਼نԽ͢΂͖

  119. εΩʔϚϨε ͦ΋ͦ΋ʜ03.͕ࢮ͵ʂ

  120. εΩʔϚϨε ͝ར༻͸ܭըతʹ

  121. ͋͐͡Μͩ ̍ɹࣗݾ঺հ ̎ɹݕࡧͱINDEX ̏ɹεΩʔϚϨε ̐ɹΞϯνύλʔϯ ̑ɹ·ͱΊ

  122. Ξϯνύλʔϯ %&-&5&@'-"(

  123. Ξϯνύλʔϯ ϑϥά໊ͬͯલ4&-&$5ͨ͠Β ͱ͔/6--͕͍Δ

  124. Ξϯνύλʔϯ ϑϥά໊ͬͯલ4&-&$5ͨ͠Β ͱ͔/6--͕͍Δ ΧϥϜ໊ͱσʔλ͕ണ཭͍ͯ͠Δ TUBUVTͷJOU͕ϚδοΫφϯόʔԽ

  125. Ξϯνύλʔϯ ඇਖ਼نԽ

  126. Ξϯνύλʔϯ ඇਖ਼نԽ ଎౓ͱਖ਼نԽ͸τϨʔυΦϑͱ ݴ͏৔߹΋͋Δ͕ਖ਼͍͠σʔλΛ࡞Ζ͏

  127. Ξϯνύλʔϯ ඇਖ਼نԽ ଎౓ͱਖ਼نԽ͸τϨʔυΦϑͱ ݴ͏৔߹΋͋Δ͕ਖ਼͍͠σʔλΛ࡞Ζ͏ ϚςϏϡʔͩͬͨΓΩϟογϡͰ ղܾग़དྷΔࣄ΋ଟ͍

  128. Ξϯνύλʔϯ ֎෦ΩʔϨεઃܭ

  129. Ξϯνύλʔϯ ֎෦ΩʔϨεઃܭ ਖ਼نԽ΋֎෦Ωʔ੍໿΋ σʔλΛकΔͨΊʹ͋Δʂʂ

  130. Ξϯνύλʔϯ ͦ΋ͦ΋3%#ษڧ͠Α͏

  131. Ξϯνύλʔϯ ӡ༻ͱઃܭͱཧ࿦ͷ࿩ ↓ SQLΞϯνύλʔϯͱDB࣮ફೖ໳Λಡ΋͏

  132. ·ͱΊ

  133. Ξϯνύλʔϯ SQLͷ࢖͍ํͩͱ͜ͷຊ͕Φεεϝ

  134. ·ͱΊ

  135. Ξϯνύλʔϯ ͋Δ೔ಥવ஗͘ͳΔ

  136. Ξϯνύλʔϯ ͋Δ೔ಥવ஗͘ͳΔ ˣ σʔλྔ͕ϝϞϦʹ৐Βͳ͘ͳΔ

  137. ࣮ફͰϋϚΔ᠘ w ूܭର৅͕େ͖͘ͳͬͯूܭ࣌ʹϝϞϦʹ৐Βͳ͍
 ˠ5FNQPSBSZΛ%JTLʹు͘ͷͰॏ͘ͳΔ w */%&9͕ແ͘5"#-&εΩϟϯΛ͍ͯͨ͠
 ˠςετ࣌͸σʔλ͕খ͔ͬͨ͞ͷͰ໰୊ʹؾ͔ͮͳ͔ͬͨ w ϓϩάϥϜ͕ϧʔϓͷ਺͚ͩΫΤϦΛ౤͍͛ͯͨ
 ˠߦ਺͕૿͑Δͱϧʔϓճ਺͕૿͑ͯॏ͘ͳΔ

    w ߋ৽͕ܹ͘͠*/%&9ͷஅยԽ͕ൃੜͨ͠
 ˠ61%"5&΍%&-&5&ʹΑͬͯ*/%&9͕அยԽͯ͠஗͘ͳΔ
  138. ࣮ફͰϋϚΔ᠘ w ूܭର৅͕େ͖͘ͳͬͯूܭ࣌ʹϝϞϦʹ৐Βͳ͍
 ˠ5FNQPSBSZΛ%JTLʹు͘ͷͰॏ͘ͳΔ w */%&9͕ແ͘5"#-&εΩϟϯΛ͍ͯͨ͠
 ˠςετ࣌͸σʔλ͕খ͔ͬͨ͞ͷͰ໰୊ʹؾ͔ͮͳ͔ͬͨ w ϓϩάϥϜ͕ϧʔϓͷ਺͚ͩΫΤϦΛ౤͍͛ͯͨ
 ˠߦ਺͕૿͑Δͱϧʔϓճ਺͕૿͑ͯॏ͘ͳΔ

    w ߋ৽͕ܹ͘͠*/%&9ͷஅยԽ͕ൃੜͨ͠
 ˠ61%"5&΍%&-&5&ʹΑͬͯ*/%&9͕அยԽͯ͠஗͘ͳΔ ࣮ߦܭըΛ ݟΕΔΑ͏ʹͳΖ͏
  139. ͋͐͡Μͩ ̍ɹࣗݾ঺հ ̎ɹݕࡧͱINDEX ̏ɹεΩʔϚϨε ̐ɹΞϯνύλʔϯ ̑ɹ·ͱΊ

  140. ·ͱΊ wυΩϡϝϯτΛݟΔ w࣮ߦܭըΛݟΔ wਪଌΑΓ΋ܭଌ

  141. ·ͱΊ %#ͷ໰୊͸๨Εͨࠒʹ΍ͬͯ͘Δ

  142. ·ͱΊ 3%#ͷ஌ࣝ͸ण໋͕௕͍

  143. ·ͱΊ 3%#ͷ஌ࣝ͸ण໋͕௕͍ ˣ ֮͑Ε͹࢓ࣄͰ௕͍ؒ໾ʹཱͭ

  144. ·ͱΊ %#ͷ໰୊͸ΫϦςΟΧϧ

  145. ·ͱΊ σʔλͷࢮ͸αʔϏεͷࢮ

  146. ·ͱΊ %#ͷ໰୊͸ΫϦςΟΧϧ ˣ ͭ·Γղܾ͢Ε͹ӳ༤

  147. ·ͱΊ ۪ऀ͸ܦݧʹֶͿ ݡऀ͸աڈʹֶͿ

  148. ·ͱΊ 3%#͸ྺ࢙͕௕͍

  149. ·ͱΊ 3%#͸ྺ࢙͕௕͍ ˣ ৭Μͳܦݧஊ͔Βֶ΂Δ

  150. ·ͱΊ 3%#͸͍͍ͧɻ

  151. ͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ɻ