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

The theory of data modeling to become the friend of DynamoDB

The theory of data modeling to become the friend of DynamoDB

JAWS-UG Osaka re:Cap and Serverless (JAWS Daysでボツった話の方をざっくり)

5cd1b99b9950b26e8ee005bd6cd1a860?s=128

Masashi Terui

March 17, 2018
Tweet

More Decks by Masashi Terui

Other Decks in Technology

Transcript

  1. THE THEORY OF DATA MODELING TO BECOME THE FRIEND OF

    DYNAMODB MASASHI TERUI @ JAWS DAYS 2018 JAWS-UG OSAKA RE:CAP&SERVERLESS
  2. WHY IS THE BUSINESS APPLICATION DIFFICULT TO BECOME SERVERLESS? •

    Stateful, Persistent • Difficult to parallelize, concurrent and asynchronous
  3. WHY IS THE BUSINESS APPLICATION DIFFICULT TO BECOME SERVERLESS? •

    Stateful, Persistent • Difficult to parallelize, concurrent and asynchronous NO!!
  4. DATA MODELING

  5. NOSQL MATCHES BETTER THAN RDB • Does RDB’s connection model

    not match serverless? • Yes, but it is not a main issue • The data model is a main issue • Does your application data match NoSQL(DynamoDB)? • In order to judge it, you need to know general database theory • The people who knows RDB also knows NoSQL
  6. DATA PLACEMENT Distributed by Partition Key
 and Indexed(B+tree) by Sort

    Key, LSI GSI is a projection of sorted(indexed) data
  7. B+TREE INDEX B-treeͳͷ͔B+treeͳͷ͔͸ެද͞Ε͍ͯͳ͍͚Ͳ Range Keyͱ͔ݺͿ͘Β͍͔ͩΒ…Ͷʁ

  8. TARGETING QUERY B+treeͷߏ଄Λ஌͍ͬͯΕ͹ ૊Έ߹ΘͤΩʔͷΠϯσοΫε͕ແͯ͘΋ ͜͏΍Ε͹ྑ͍͜ͱ͕෼͔Δ

  9. ACID VS BASE? • It is not antinomy • Simply

    relationships can be consistent with denormalization • Discard the strong consistency 
 for the search queries • It is similar to the RDB replicas • It is difficult to replace the RDB master
  10. SUMMARY

  11. “DATA MODEL IS THE MAIN ISSUE” THANKS!! “NEED TO KNOW

    GENERAL DATABASE THEORY” “LET'S EXPAND SERVERLESS WORLD”