An evening with... No SQL Meetup

37
An evening with ... Not only SQL Arkho Innova Meetup Series

Transcript of An evening with... No SQL Meetup

Page 1: An evening with... No SQL Meetup

An evening with ... Not only SQLArkho Innova Meetup Series

Page 2: An evening with... No SQL Meetup

• Un espacio para compartir experiencias y conocimiento

• Un espacio para hacer relaciones entre equipos con intereses afines

• Un espacio para pasarla bien

Gracias por su asistencia!!!

Page 3: An evening with... No SQL Meetup

El universo digital

As more of the world goes online, including the physical world, the more opportunity there is for enterprises (and consumers) to use data

in new ways – to learn about customers, speed business cycles, flatten organisational structures, and transform themselves into

companies designed for what we call the “Third Platform” of the digital age, a platform built

upon a foundation of cloud computing, mobility, social networking, and big data.

Source: http://www.emc.com/leadership/digital-universe/2014iview/executive-summary.htm

Page 4: An evening with... No SQL Meetup

Una oportunidad…

In 2013, only 22% of the information in the digital universe would be a candidate for

analysis; less than 5% of that was actually analysed. By 2020, the useful percentage

could grow to more than 35%, mostly because of the growth of data from embedded

systems

Source: http://www.emc.com/leadership/digital-universe/2014iview/executive-summary.htm

Page 5: An evening with... No SQL Meetup

La norma actual…

Big Data Conectividad extrema

Tecnología P2P Alta concurrencia

Alta diversidad de datos Tecnologías Cloud

Page 6: An evening with... No SQL Meetup

Los RDBMS bajo presión…

Escalabilidad simple Confiabilidad

Redes sociales Información relacionada

Esquemas ágiles Información no estructurada Conjuntos de datos grandes

Page 7: An evening with... No SQL Meetup

Not Only SQL

…provides a mechanism for storage and retrieval of data that is modelled in means other than the tabular relations used in relational databases … popularity ..

triggered by the needs of Web 2.0 companies such as Facebook, Google and Amazon.com.

… Motivations for this approach include: simplicity of

design, simpler "horizontal" scaling to clusters of machines, which is a problem for relational

databases,and finer control over availability.

Source: https://en.wikipedia.org/wiki/NoSQL

✓ Not using the relational model

✓ Running well on clusters ✓ Mostly open-source ✓ Built for the 21st century

web estates ✓ Schema-less

Page 8: An evening with... No SQL Meetup

Los pioneros

Page 9: An evening with... No SQL Meetup

Interés en el tiempo…

Source: Google Trends

Page 10: An evening with... No SQL Meetup
Page 11: An evening with... No SQL Meetup

Universo NoSQL

Page 12: An evening with... No SQL Meetup

Clasificación NoSQL

Page 13: An evening with... No SQL Meetup

Funcionalidad v/s Escalabilidad

Source: http://www.slideshare.net/gschmutz/schwabengipfel-2014-sqlvsnosql

Page 14: An evening with... No SQL Meetup

Key-Value• Almacenamiento Simple • Cada valor o estructura se asocia con

una clave • Uso principalmente en cache

Page 15: An evening with... No SQL Meetup

Ventajas • Simplicidad en la implementación

Desventajas • Ineficiente en las búsquedas

cuando se requiere actualizar el valor

Usos • Cache, Logging

Key-Value

Page 16: An evening with... No SQL Meetup

Wide Column• No existe estructura estricta • Las columnas son variables • Se almacenan las columnas con el

método Key-Value

Page 17: An evening with... No SQL Meetup

Ventajas • Almacenamiento distribuido y alta disponibilidad • Escrituras masivas • Uso de MapReduce y replicación de datos

Desventajas • API de bajo nivel y muy complejas • No permite ordenar

Usos • Estadísticas en tiempo real

Wide Column

Page 18: An evening with... No SQL Meetup

Graph• Se basa en relaciones entre nodos • No existen “broken links” • Todos los links empiezan y terminan en

un nodo • No se puede eliminar un nodo sin

eliminar sus relaciones • Los nodos y relaciones pueden tener

atributos y loables variables

Page 19: An evening with... No SQL Meetup

Ventajas • Uso de algoritmos de grafos

Desventajas • Clustering complicado • Se debe recorrer todos los nodos • El modelo debe estar normalizado

Usos • Redes sociales: Facebook, Twitter

Graph

Page 20: An evening with... No SQL Meetup

Graph

Page 21: An evening with... No SQL Meetup

Ventajas • Modelado de datos natural • Desarrollo rápido • API simples y simples • Formato JSON • Consultas eficientes • Indices

Desventajas • Sintaxis de consulta no estándar • Rendimiento menor frente a Wide column

Usos • Aplicaciones Web, Wikis, Blogs, Gestión Documental

Document

Page 22: An evening with... No SQL Meetup
Page 23: An evening with... No SQL Meetup

• Empresa 10gen en 2007 • Base de datos de tipo documental • Almacenamiento en formato BSON • No existen esquemas, existen

Colecciones • No existen registros, existen Documentos • Los esquemas de documentos son

variables • No existe el Join • No usa SQL • Existen versiones open source y

enterprise • Versión actual: 3.0.5

¿Qué es MongoDB?

Page 24: An evening with... No SQL Meetup

• No existe join en las consultas, pero si existe relación entre Documentos

• Existen indices • Se puede utilizar modelos

normalizados basados en MER o AOO

• Se puede utilizar modelos “embedded”

Modelo de datos

Page 25: An evening with... No SQL Meetup

SQL

MongoDB

Selección

Page 26: An evening with... No SQL Meetup

Selección

Page 27: An evening with... No SQL Meetup

Inserción

SQL

MongoDB

Page 28: An evening with... No SQL Meetup

Map Reduce

Page 29: An evening with... No SQL Meetup

Agregación

Page 30: An evening with... No SQL Meetup

Relaciones

Page 31: An evening with... No SQL Meetup

Embedded

Page 32: An evening with... No SQL Meetup

Información estrechamente ligada

Page 33: An evening with... No SQL Meetup

No estrechamente ligada

Page 34: An evening with... No SQL Meetup

¿Están obsoletas las bases de datos relacionales?

Page 35: An evening with... No SQL Meetup

…un solo traje para todo… ya no es adecuado…

Page 36: An evening with... No SQL Meetup

SQL o NoSQL• NoSQL no reemplaza las base de datos

tradicionales

• NoSQL es una alternativa de solución óptima en ciertos casos

• Las bases SQL seguirán siendo óptimas para muchos casos funcionales

Page 37: An evening with... No SQL Meetup

An evening with ... Not only SQLArkho Innova Meetup Series