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

Firestore のデータ設計について

Firestore のデータ設計について

2019.5.17 Webナイト宮崎 Vol.4

Kosuke Ogawa

May 17, 2019
Tweet

More Decks by Kosuke Ogawa

Other Decks in Technology

Transcript

  1. 'JSFTUPSF
    σʔλϕʔεઃܭ
    ,PTVLF0HBXB
    8FCφΠτٶ࡚7PM

    View full-size slide

  2. w 0HBXB,PTVLFʢ!LPPHBXBʣ
    w Ξϧגࣜձࣾʢ౦ژʣ
    w ٶ࡚͔ΒϑϧϦϞʔτ
    w ͯ͛΄͛ॴଐ
    w J04"OESPJEΞϓϦΤϯδχΞ

    View full-size slide

  3. ࠓ೔࿩͢͜ͱ
    w 'JSFTUPSFʹ͓͚Δσʔλϕʔεઃܭʹ͍ͭͯ
    w ͜Μͳํ๏͕͋ΔΑͶ
    w ΋ͬͱྑ͍ํ๏͕͋ͬͨΒڭ͍͑ͯͩ͘͞ʂ

    View full-size slide

  4. 'JSFTUPSFͱ͸
    w 'JSFCBTFͷػೳͷͻͱͭ
    w σʔλϕʔε
    w $PMMFDUJPO EPDVNFOU EBUB
    ͔Βߏ੒͞ΕΔ

    View full-size slide

  5. ͱ͋Δ4/4αʔϏεͷ
    %#ઃܭΛߟ͑Δ

    View full-size slide

  6. ػೳཁ݅
    w ొ৔ਓ෺ɿϢʔβʔ
    w Ϣʔβʔ͸JE OBNFΛ࣋ͭ
    w Ϣʔβʔ͸ଞͷϢʔβʔΛϑΥϩʔͰ͖Δ

    View full-size slide

  7. Ϣʔβʔ؅ཧίϨΫγϣϯ
    w 3PPU
    w VTFSTDPMMFDUJPO
    w BBBBBEPDVNFOU
    w JEEBUB
    w OBNFEBUB
    w CCCCCEPDVNFOU
    w JEEBUB
    w OBNFEBUB

    View full-size slide

  8. ϑΥϩʔ৘ใΛ؅ཧ͢Δ
    ઃܭΛߟ͑Δ

    View full-size slide


  9. VTFST௚Լʹஔ͘
    w 3PPU
    w VTFST$PMMFDUJPO
    w BBBBBEPDVNFOU
    w JEEBUB
    w OBNFEBUB
    w GPMMPXT 4VC$PMMFDUJPO

    w CCCCC
    w DDDDD

    View full-size slide


  10. SPPU௚Լʹஔ͘
    w 3PPU
    w VTFST
    w BBBBB
    w JE
    w OBNF
    w GPMMPXT
    w GPMMPX@
    w GPMMPXFFlBBBBBz
    w GPMMPXFSlCCCCCz

    View full-size slide

  11. BBBBB͞Μ͕ϑΥϩʔதͷ
    ϢʔβʔϦετΛද͍ࣔͨ͠

    View full-size slide


  12. VTFST௚Լʹஔ͘
    w 3PPU
    w 6TFST
    w BBBBB
    w JE
    w OBNF
    w GPMMPXT 4VC$PMMFDUJPO

    w CCCCC
    w DDDDD
    ͜͜ΛݟΕ͹ྑͦ͞͏

    View full-size slide


  13. SPPU௚Լʹஔ͘
    w 3PPU
    w VTFST
    w BBBBB
    w JE
    w OBNF
    w GPMMPXT
    w GPMMPX@
    w GPMMPXFFlBBBBBz
    w GPMMPXFSlCCCCCz
    GPMMPXFFlBBBBBzͷυΩϡϝϯτΛ
    நग़͢Ε͹ྑͦ͞͏

    View full-size slide

  14. BBBBB͞ΜΛϑΥϩʔ͍ͯ͠
    ΔϢʔβʔϦετΛදࣔͨ͠
    ͍

    View full-size slide


  15. VTFST௚Լʹஔ͘
    w 3PPU
    w 6TFST
    w CCCCC
    w JE
    w OBNF
    w GPMMPXT 4VC$PMMFDUJPO

    w BBBBB
    w DDDDD
    ˣ
    Ͱ͖ͳ͍ʂʂ
    ʢ௥هɿͰ͖ΔΑ͏ʹͳͬͨʣ
    ͜͜ʹBBBBBΛؚΉ
    4VC$PMMFDUJPO͚ͩநग़͍ͨ͠

    View full-size slide


  16. SPPU௚Լʹஔ͘
    w 3PPU
    w VTFST
    w BBBBB
    w JE
    w OBNF
    w GPMMPXT
    w GPMMPX@
    w GPMMPXFFlDDDDDz
    w GPMMPXFSlBBBBBz
    GPMMPXFSlBBBBBzͷυΩϡϝϯτΛ
    நग़͢Ε͹ྑͦ͞͏

    View full-size slide

  17. w ࠓճͷྫͷΑ͏ʹϦϨʔγϣϯγοϓΛ؅ཧ͢Δํ๏ͱ͠
    ͯVTFST௚Լʹஔ͘ํ๏ͱSPPU௚Լʹஔ͘ྫΛ঺հ
    w VTFST௚Լʹஔ͘ํ๏ͩͱαϒίϨΫγϣϯΛԣஅͨ͠
    ݕࡧ͕Ͱ͖ͳ͍͕ग़ͯ͘ΔˠͰ͖ΔΑ͏ʹͳͬͨ
    w ݸਓతʹ͸SPPU௚Լʹஔ͘΄͏͕޷͖

    View full-size slide

  18. ͋Γ͕ͱ͏
    ͍͟͝·ͨ͠

    View full-size slide

  19. ิ଍
    w $PMMFDUJPO(SPVQͱ͍͏ػೳ
    ͕ϦϦʔε͞Εͨʂʂ
    w 4VC$PMMFDUJPOΛԣஅͯ͠
    σʔλΛநग़͢Δ͜ͱ͕Մೳ
    ʹͳͬͨ
    w Ұ෦ͷ1MBUGPS̼Ͱ͔͠࢖͑ͳ
    ͍

    View full-size slide