Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

O que você precisa saber para modelar bancos de dados NoSQL - Dani Monteiro

747 views

Published on

Banco de dados sem schema não precisa de modelo de dados!” Se você acredita nisso, seu projeto começou a falhar antes de começar! Vamos conversar sobre como modelar seu banco de dados NoSQL sem perder a flexibilidade e sem perder o controle sobre seus dados.

Published in: Technology
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THAT BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m77EgH } ......................................................................................................................... Download Full EPUB Ebook here { http://bit.ly/2m77EgH } ......................................................................................................................... Download Full doc Ebook here { http://bit.ly/2m77EgH } ......................................................................................................................... Download PDF EBOOK here { http://bit.ly/2m77EgH } ......................................................................................................................... Download EPUB Ebook here { http://bit.ly/2m77EgH } ......................................................................................................................... Download doc Ebook here { http://bit.ly/2m77EgH } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book that can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer that is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story That Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money That the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths that Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

O que você precisa saber para modelar bancos de dados NoSQL - Dani Monteiro

  1. 1. O que você precisa saber para modelar bancos de dados NoSQL
  2. 2. Danielle Monteiro DB4Beginners.com/e-book twitter.com/danimonteirodba facebook.com/DB4Beginners www.linkedin.com/in/danimonteirodba WBSoft.com.br 2
  3. 3. Contatos /DB4Beginners /DaniMonteiroDBA /DaniMonteiroDBA http://bit.ly/db-sp http://bit.ly/danimonteirodba www.linkedin.com/in/danimonteirodba/
  4. 4. Sites × Portfólio: www.DaniMonteiroDBA.com × Blog: DB4Beginners.com × Consultoria: www.WDB.Consulting × Meetup: https://www.meetup.com/pt- BR/Databases-SP/ × Projeto: www.WoMakersCode.org
  5. 5. O que é Modelagem? 5
  6. 6. 6
  7. 7. 7 1. Key Value REmote DIctionary Server
  8. 8. REDIS 8 × Muito rápido; × O key-value mais usado; × Dados em memória; × Entenda como serão as pesquisas;
  9. 9. Tipo de dados 9 × string × list (acesso nas pontas mais rápido) × set (coleção de strings) × sorted set (coleção de strings ordenadas) × hash (chaves e conteúdos string)
  10. 10. 10
  11. 11. Quais as melhores chaves? 11
  12. 12. Dicas 12 × Lembre-se que a pesquisa é feita pela chave × É a base de dados principal? (sim, é possível!) × Cuidado com a redundância × list -> filas × sorted set -> notícias, tweets… ordem temporal. × hash -> dados genéricos de forma compactada
  13. 13. 2. Orientado a Documentos MongoDB, o difícil é que é fácil! 13
  14. 14. MongoDB × Consolidado; × Multi-model? × Muitos recursos; × Documentos tem o formato JSON; × Dados podem ser normalizados; × Dados podem ser desnormalizados; 14
  15. 15. Tipos de Dados × Documento armazenado em formato BSON × Data, string, ObjectID, NumberLong, NumberInt, NumberDecimal, Object, Array… × Tuning começa com o data type correto. 16
  16. 16. Embeding (Desnormalizado) X Referencing (Normalizado)? 17
  17. 17. 18
  18. 18. Quando usar documentos Embeded? • Relacionamentos 1:1 • Relacionamentos 1:n • Entre uma entidade fraca e uma entidade forte • Coleções que contém um número grande de documentos pequenos • Dados que são lidos sempre juntos • Mais leituras 19
  19. 19. 20
  20. 20. Quando usar documentos Referencing? • Quando uma parte do documento é frequentemente lida/ atualizada e a outra parte não. • O tamanho do documento excede 16MB. • Quando os dados não devem ser duplicados! • Quando um objeto é referenciado em muitos outros • Mais escritas 21
  21. 21. Informações importantes • Possui linguagem própria • Suporte a vários tipos de índice • Governança facilitada com a validação de schemas nativa • Lembre da LGPD!!! • Podemos ter grafos no MongoDB  22
  22. 22. 23 3. Orientado a colunas Cassandra!!!
  23. 23. Cassandra 24 × Desnormalizado; × Distribuído; × Tolerante a falhas; × Abordagem orientada a consultas; × Schema é muito importante; × Design anel; × master/ master; × Escalabilidade linear
  24. 24. Conceitos importantes × Keyspace × Onde definimos o fator de replicação × Família de Colunas × Contém colunas × Contém linhas × Separação lógica de dados semelhantes × Colunas × Estrutura básica × nome, valor e timestamp. 25
  25. 25. 26
  26. 26. CQL (Cassandra Query Language) × Baseada na SQL; × 21 datatypes nativos; × Alguns interessantes: counter, inet, uuid 28
  27. 27. Índices × Melhores em tabelas grandes; × Índices secundários: × Podem destruir o desempenho da sua query; × Complexos; × Criados em background (default), sem bloquear leituras ou gravações; 29
  28. 28. Primary Key × Identifica uma coluna × Primeiro elemento é a chave da partição × Determina a localização dos dados × Colunas depois da chave de partição são chamadas de clustering columns × As clustering columns especifica a ordem em que os dados são organizados dentro da partição. 30
  29. 29. 31 1 2 3 4 5 6 7 8 CREATE TABLE user_videos ( userid uuid, added_date timestamp, videoid uuid, name text, preview_image_location text, PRIMARY KEY (userid, added_date, videoid) ); Mostre-me todos os vídeos associados a um determinado usuário
  30. 30. 32
  31. 31. Qual é a query? 33
  32. 32. 4. Orientado a Grafos Neo4J, poderoso nos relacionamentos! 35
  33. 33. Neo4J × Projetado para tratar as relações entre os dados; × Pesquisas em grandes quantidades de dados; × Ideal para consultas complexas; × Desempenho muito bom; × Compatível com ACID; × Cypher 36
  34. 34. Conceitos Importantes × Nodes = entidades × Relacionamentos = eventos ou conceitos que relacionam nós × os relacionamentos são especificados na inclusão, não tem JOIN 37
  35. 35. Índices • Encontrar o ponto de partida para consultas • Busca mais eficiente • Escritas mais lentas 39
  36. 36. Como as informações estão conectadas? 40
  37. 37. 41
  38. 38. 42
  39. 39. Casos de Uso • Sistemas de Recomendação • Detecção de fraudes • Operações de redes • Mecanismos de busca • Machine learning 43
  40. 40. DB4Beginners.com 44

×