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

About the problem of DBMS choice & what to do if you have gone the wrong way | Roman Bugaev

About the problem of DBMS choice & what to do if you have gone the wrong way | Roman Bugaev

Roman Bugaev
Meetup #4

Minsk MongoDB User Group

June 07, 2012
Tweet

More Decks by Minsk MongoDB User Group

Other Decks in Programming

Transcript

  1. Bugaev  Roman About  the  problem  of  DBMS  choice  &  what

     to  do   if  you  have  gone  the  wrong  way
  2. Ñ Everything  is  indexed Ñ Distributed Ñ Replicated Ñ Completely  hosted  on  Amazon  system

    BUT Ñ Latency  specially  if  you’re  not  on  ec2   (even  between  nodes) Ñ Only  strings,  lexicographical  string  only Ñ Huge  amount  of  code  
  3. Ñ  If  you  love  writing  code-­‐‑-­‐‑  really,  truly  love  to

      write  code-­‐‑-­‐‑  you'ʹll  love  it  enough  to  write  as   liLle  of  it  as  possible.  And  SQL  can  help  you.
  4. SQL  is  awesome! -­‐‑  Structured  Query  Language -­‐‑  ACID Atomicity,

     Consistency,  Isolation,  Durability -­‐‑  Predictable -­‐‑  Schema -­‐‑  Based  on  rational  algebra -­‐‑  Standardized  
  5. No,  really,  it'ʹs  awesome! -­‐‑  Hardened -­‐‑  Free  and  commercial

     choices -­‐‑  MySQL,  PostgreSQL,  Oracle,  DB2,  MS   SQL... -­‐‑  Commercial  support -­‐‑  Tooling -­‐‑  Everyone  knows  it -­‐‑  It'ʹs  mature!
  6. So... -­‐‑  Some  preLy  big  and  important   problems -­‐‑

     And  brightest  engineers  in  the  world -­‐‑  Who  loooove  to  build  stuff
  7. Yesterday'ʹs  problem  of   biggest  guys     Is  today'ʹs

     problem  of   startup  in  garage    
  8. Ñ  What  schema  can  be  fine  for  a  lot  of

     product’s   types? E-­‐‑commerce
  9. Ñ Atomic  single  document  writes Ó If  you  need  atomic  writes  across

      multi-­‐‑document  –  don’t  use   MongoDB   And  what  about  $$?
  10. Ñ Orders,  Inventory  (id,  count)   and  Payment  Transaction  you  

    can  store  in  SQL Ñ UI  –  MongoDB,  ecomerce  -­‐‑  SQL   Most  boring  SQL  Scheme  ever    
  11. Ñ  Double  check  you  choice  of  DBMS  and  tools  

    Ñ  Do  it  fast Ñ  Check  your  logic   Ñ  Enterprise  design Ñ  Id<User>  !=  Id<Product> Ñ  Unit  tests Ñ  Delete  code   Ñ  Optimize  your  tools Ñ  Be  brave! Data  migrations