SlideShare una empresa de Scribd logo
1 de 58
NoSQL: Azure Table Storage & MongoDB
Alternativas y escenarios de uso NoSQL
@erincon Eladio Rincón
Director Relacional
MCT, MVP SQL Server
@augurarte Miguel López
Director Cloud | mlopez@solidq.com
MCT, MCPD, MCTS, MCP
1
EN CUMPLIMIENTO CON LA LEY 15/1999 DE PROTECCION DE DATOS DE
CARÁCTER PERSONAL, PONEMOS EN TU CONOCIMIENTO QUE
ESTA SESIÓN VA A SER GRABADA
POR SOLIDQ Y QUE ESTA GRABACIÓN PODRÍA SER UTILIZADA COMO MATERIAL
DE MARKETING Y HACERSE PUBLICA A TRAVÉS DE DIVERSOS MEDIOS, COMO
POR EJEMPLO NUESTRA PAGINA WEB.
TENIENDO EN CUENTA QUE TU IMAGEN PUEDE APARECER EN ESA GRABACIÓN,
SI NO DESEAS APARECER, ROGAMOS NOS LO COMUNIQUES POR LOS MEDIOS
QUE YA CONOCES.
COMUNICADO
2
Agenda
Bases de datos relacionales y NoSQL
Microsoft Azure Table Storage
– Fundamentos MSATS
– Diseño de NoSQL con MSATS
– Programación del modelo
MongoDB
– Fundamentos
– Diseño de NoSQL con MongoDB
– Programación del modelo
Escenarios
Evaluación de costes
3
NoSQL: Azure Table Storage & MongoDB
BDD Relacionales y NoSQL
Almacenamiento de table de Azure (MSATS)
MongoDB
Escenarios
Costes
BDD Relacionales y NoSQL
Las BDD Relacionales lideran el conjunto de sistemas
de almacenamiento transaccional, escritura atómica,
indexación de columnas, optimización de consultas y
lenguaje de consulta declarative orientado a conjuntos.
Las BDD NoSQL se emplean de forma generalizada en
sitios Web de tipo social masivamente accedidos y que
necesitan escalar de forma intensiva, donde la
característica principal son conjuntos de datos simples
(frente a consultas complejas)
5© 2012 SolidQ
Donde gasta el tiempo RDBMS en TPCC
http://static.cs.brown.edu/courses/csci2270/papers/looking-glass.pdf
Teorema de CAP
7
Teorema de CAP: Selección de variables
8
Next Generation Databases mostly addressing
some of the points: being non-relational,
distributed, open-source and horizontally
scalable.
NoSQL
9http://NoSQL-database.org
• Surgen a principios de 2009
• Crecimiento exponencial.
• Características comunes más importantes:
• No se basan en esquema
• Soporte de replicación sencillo
• API de fácil utilización
• Consistencia parcial (eventually consistent) / BASE (not ACID)
• Enormes cantidades de información.
• "nosql" es traducido tradicionalmente como "not only sql“, y se
considera un alias que referencia la definición anterior.
NoSQL Evolución y características
10
Modelos de datos NoSQL
11
http://www.slideshare.net/emileifrem/nosql-east-a-nosql-overview-and-the-benefits-of-graph-databases
• Wide Column Store / Column Families
• Document Store
• Key Value / Tuple Store
• Graph Databases
• Multimodel Databases
• Object Databases
• Grid & Cloud Database Solutions
• XML Databases
• Multidimensional Databases
• Multivalue Databases
• Event Sourcing
• Network Model
Grandes familias NoSQL
12
DEMO
13
http://nosql-database.org
Bases de datos NoSQL (listado)
NoSQL: Azure Table Storage & MongoDB
BDD Relacionales y NoSQL
Almacenamiento de table de Azure (MSATS)
MongoDB
Escenarios
Costes
Almacenamiento de table Azure
Windows Azure Table Service
Windows Azure tables
Designing Windows Azure Tables
Implementing Windows Azure Tables
Querying Windows Azure Tables
Accessing table storage
Table Storage Security
– Set container permissions.
– Use Shared Access Signatures (SAS)
– Stored Access Policies
15
Cuentas de almacenamiento MSA
User creates a globally unique storage account name
Choose the primary location to host storage account
Three regions:
– “North Central US”, “South Central US”
– “North Europe”, “Europe West”
– “South East Asia”, “East Asia”
Table Service:
http://myaccount.table.core.windows.net
16
DEMO
17
Aprovisionamiento de una
cuenta de almacenamiento
de Azure
Características MSATS
• Tabla de almacenamiento de Azure
• Colección de entidades (parejas clave, valor)
• La entidad tiene una clave principal y un conjunto
aleatorio no definido (schema-less) de
propiedades.
• PartitionKey (Particionamiento / distribución de carga / escalado)
• RowKey (conjuntos de filas relacionadas en una partición)
• TimeStamp (Sólo lectura, TS creación)
• Una propiedad es un par de nombre/valor (con tipo)
similar a una columna
• MSATS no fuerza la creación o validación de esquema
• El desarrollador necesitará implementar un esquema
concreto para su acceso
18
Abstracciones MSATS
19
DEMO
20
Aplicación
https://haveibeenpwned.com/
Entidades del MSATS
Entities are the basic data item stored in a table
Collections of properties that are name value pairs.
Each entity has 3 fixed properties called PartitionKey,
RowKey and Timestamp.
If we were to map this to concepts in a conventional
database system, an entity is analogous to a row and
property is analogous to a column.
An entity can have up to 255 – 3 properties = 252 (3
system properties are reserved).
1 Entity = 1 MB of data (Maximum)
21
Entidades: Tipos de datos de propiedades
• Byte[]
• Bool
• DateTime
• Double
• Guid
• Int32/Int
• Int64/long
• String
22
Entidades: Indexación (Primary Key)
• PartitionKey property
• RowKey property
• Timestamp property
23
Características de las propiedades PK
• Tablas particionadas para soportar balanceo de carga
entre nodos de almacenamiento.
• Las entidades se organizan por partición.
• Una partición es un rango consecutive de entidades
con la misma clave de partición.
• Partition key: Identificador único de partición dentro
de una tabla.
• PK es la primera parte de la clave principal de una
entidad.
• PK puede ser una cadena de hasta 1KB de tamaño.
• Incluir PartitionKey property en cada insert, update, y
delete.
24
Características de las propiedades RowKey
• The row key is a unique identifier for an entity within
a given partition.
• Together the PartitionKey and RowKey uniquely
identify every entity within a table.
• The row key is a string value that may be up to 1 KB
in size.
• You must include the RowKey property in every
insert, update, and delete operation.
RowKey
25
MSATS es una BDD sin esquema
26
PartitionKey: str
2012102517USR91
P
V
RowKey: str
jobid0121
P
V
TimeStamp: dt
201210251715
P
V
Name: st
User_91
P
V
PartitionKey: str
2012102517USR10
P
V
RowKey: str
jobid0121
P
V
TimeStamp: dt
201210251735
P
V
Status: st
Processing
P
V
Name: st
User_10
P
V
PartitionKey: str
2012102517USR10
P
V
RowKey: str
jobid0125
P
V
TimeStamp: dt
201210251755
P
V
RoleExec: st
IN_121
P
V
Name: st
User_10
P
V
LastOp: st
Decrypt
P
V
PartitionKey: str
2012102517USR13
P
V
RowKey: str
jobid0002
P
V
TimeStamp: dt
201210251759
P
V
Name: st
User_13
P
V
PartitionKey: str
2012102517USR13
P
V
RowKey: str
jobid0001
P
V
TimeStamp: dt
201210251755
P
V
Name: st
User_13
P
V
Status: st
Aborted
P
V
TABLE JOBEXECUTION
Consulta del servicio de tabla
27
PartitionKey: str
2012102517USR91
P
V
RowKey: str
jobid0121
P
V
TimeStamp: dt
201210251715
P
V
Name: st
User_91
P
V
PartitionKey: str
2012102517USR10
P
V
RowKey: str
jobid0121
P
V
TimeStamp: dt
201210251735
P
V
Status: st
Processing
P
V
Name: st
User_10
P
V
PartitionKey: str
2012102517USR10
P
V
RowKey: str
jobid0125
P
V
TimeStamp: dt
201210251755
P
V
RoleExec: st
IN_121
P
V
Name: st
User_10
P
V
LastOp: st
Decrypt
P
V
PartitionKey: str
2012102517USR13
P
V
RowKey: str
jobid0002
P
V
TimeStamp: dt
201210251759
P
V
Name: st
User_13
P
V
PartitionKey: str
2012102517USR13
P
V
RowKey: str
jobid0001
P
V
TimeStamp: dt
201210251755
P
V
Name: st
User_13
P
V
Status: st
Aborted
P
V
TABLE JOBEXECUTION
Particiones (nodos) MSATS
28
Partitions and Partition Ranges
DEMO
30
Acceso a un sistema MSATS
en producción
Table Storage Design
Define your model
Key selection
31
Key selection: Considerations
Entity Group Transactions
Scalability
Efficient queries
32
DEMO
33
Gestión de tablas con cliente
Windows
Modelo de programación
Windows Azure Storage: Connection Strings
Managing tables in WATS
Entities: CRUD operations (Create, read, update, delete)
Querying tables
Perform Entity Group Transactions (EGT)
34
Connection Strings in Visual Studio 2013
Double click on the Web/Worker role in the solution
35© 2012 SolidQ
Managing tables in WATS
Use Microsoft.WindowsAzure.StorageClient. There are
several ways of creating tables.
Initialize tables once: for example using session or
Application start events.
Use CreateCloudTableClient to interact with WATS
For example, to create a table called ‘Products’:
36
using Microsoft.WindowsAzure;
using Microsoft.WindowsAzure.StorageClient;
var clAccount;
clAccount = CloudStorageAccount.FromConfigurationSettings(“ProductStorage")
var tableClient = clAccount.CreateCloudTableClient();
tableClient.CreateTableIfNotExists(“Products”)
Entidades: Operaciones CRUD
Configurar las entidades (modelo de clases)
Configurar un DataContext
37
Configuración de las entidades
Class modeling
38
Operaciones CRUD
Context class is required in .NET to access the WAT
using WCF Data Services and the correspondent entity
(GE06LDataEntry).
Setting up data context
39
namespace GE06L_Data {
public class GE06LDataContext : TableServiceContext {
public GE06LDataContext(string baseAddress,
Microsoft.WindowsAzure.StorageCredentials credentials)
: base(baseAddress, credentials) {}
public IQueryable<GE06LEntry> GE06LEntry {
get {
return this.CreateQuery<GE06LEntry>(“GE06LEntry");}
}
}
}
Entities CRUD operations
List, Add, Update
40
// List (read) operation for GE06LEntry entities
public IEnumerable<GE06LEntry> GetGE06LEntries() {
var results = from g in this.context.GE06LEntry
where g.PartitionKey == DateTime.UtcNow.ToString("MMddyyyy")
select g;
return results; }
// Add operation for GE06LEntry entities
public void AddGE06LEntry(GE06LEntry newItem) {
this.context.AddObject(“GE06LEntry", newItem);
this.context.SaveChanges(); }
// Update operation for GE06LEntry entities
public void UpdateFileURL(string partitionKey, string rowKey,
string fileUrl) {
var results = from g in this.context.GE06LEntry
where g.PartitionKey == partitionKey && g.RowKey == rowKey
select g;
var entry = results.FirstOrDefault<GE06LEntry>();
entry.FilelUrl = fileUrl;
this.context.UpdateObject(entry);
this.context.SaveChanges(); }
Consultar MSATS
Single Entity (a.k.a. Point Queries)
41
var q = (
from pais in context.CreateQuery<Pais>(tableName)
where pais.PartitionKey == “Paises“ &&
pais.RowKey == “España"
select movie);
Consultar MSATS
Range Queries - Row Range Scan
42© 2012 SolidQ
var q = (
from movie in context.CreateQuery<Movie>(tableName)
where
movie.PartitionKey == "Action" &&
movie.RowKey.CompareTo("Alien") >= 0 &&
movie.RowKey.CompareTo("Terminator") <= 0 &&
movie.IsFavorite
select movie
);
Consultar MSATS
Range Queries - Partition Range Scan
43
var q = (
from movie in context.CreateQuery<Movie>(tableName)
where
movie.PartitionKey == "Action" &&
movie.RowKey.CompareTo("Alien") >= 0 &&
movie.RowKey.CompareTo("Terminator") <= 0 &&
movie.IsFavorite
select movie
);
Consultar MSATS
Full Table Scan
44
var q = (from movie in context.CreateQuery<Movie>(tableName)
select movie );
var q = (from movie in context.CreateQuery<Movie>(tableName)
where movie.PartitionKey.CompareTo("Action") != 0
select movie );
var q = (
from movie in context.CreateQuery<Movie>(tableName)
where movie.IsFavorite select movie); var q =
(from movie in context.CreateQuery<Movie>(tableName)
where movie.RowKey.CompareTo("Sh") >= 0 &&
movie.RowKey.CompareTo("Si") < 0
select movie );
DEMO
45
Programación de MSATS
NoSQL: Azure Table Storage & MongoDB
BDD Relacionales y NoSQL
Almacenamiento de table de Azure (MSATS)
MongoDB
Escenarios
Costes
MongoDB
Motivación
47
• ¿”Problemas” en RDBMs tradicionales?
• Transaciones
• JOINs
• Prescindimos de ellos
• Transacciones a nivel de documento
• No dejamos hacer JOINs
MongoDB
48
Unidad de Información es el Documento
MongoDB: Otro Paradigma
49
• Filosofía Schema On-Read
• El Esquema es importante (aunque laxo)
• En algún momento necesitas “modelar”
• Antes o después
• Modelos Mapeados en Memoria
• “Cerveza con alcohol vs cerveza sin alcohol” by
Garrigós
• Importante arquitectura x64!
MongoDB: Conceptos Clave
50
• Aunque veamos JSON, almacenado en binario
– BSON
• Consola de administración  JavaScript y
JSON
• Varios GUI tipo SSMS
• Drivers de Mongo para facilitar desarrollo
• Driver para C# y usar LINQ
• Modelos de persistencia para mapeo
• MongoRepository
• Sharding y Replicasets
DEMO
51
MongoDB en Azure con
correos electrónicos
NoSQL: Azure Table Storage & MongoDB
BDD Relacionales y NoSQL
Almacenamiento de table de Azure (MSATS)
MongoDB
Escenarios
Costes
Aplicaciones altamente escalables que necesitan
consultas sencillas y rápidas
• ONU, datos georeferenciados, info calculada
• Energética, metadatos
• BIG Data, datos temporales/sensores
• Información social / redes sociales
• Aplicaciones de localización de correos, direcciones, etc.
Escenarios
53
NoSQL: Azure Table Storage & MongoDB
BDD Relacionales y NoSQL
Almacenamiento de table de Azure (MSATS)
MongoDB
Escenarios
Costes
Costes
Microsoft Azure Table Storage
MongoDB on Azure
55
NoSQL: Azure Table Storage & MongoDB
Bases de datos relacionales y NoSQL
Microsoft Azure Table Storage
– Fundamentos MSATS
– Diseño de NoSQL con MSATS
– Programación del modelo
MongoDB
– Fundamentos
– Diseño de NoSQL con MongoDB
– Programación del modelo
Escenarios
Evaluación de costes
56
¿Preguntas?
57
¡Gracias!
Siéntate a comer con nosotros o tómate un café y aclara tus
dudas 
@augurarte Miguel López
@erincon Eladio Rincón
58

Más contenido relacionado

La actualidad más candente

Administracion de base de datos oracle tarea#02
Administracion de base de datos oracle tarea#02Administracion de base de datos oracle tarea#02
Administracion de base de datos oracle tarea#02Celso
 
Administración de Oracle - Tema 3 - Creación de la BD
Administración de Oracle - Tema 3 - Creación de la BDAdministración de Oracle - Tema 3 - Creación de la BD
Administración de Oracle - Tema 3 - Creación de la BDHector Martinez
 
Oracle Spatial de la A a la Z - Unidad 1
Oracle Spatial de la A a la Z - Unidad 1Oracle Spatial de la A a la Z - Unidad 1
Oracle Spatial de la A a la Z - Unidad 1Jorge Ulises
 
Active directory
Active directoryActive directory
Active directoryErii Amaya
 
Active directory
Active directoryActive directory
Active directoryjosejosh56
 
[WEBINAR] 10 cosas que debes saber sobre Active Directory.
[WEBINAR] 10 cosas que debes saber sobre Active Directory.[WEBINAR] 10 cosas que debes saber sobre Active Directory.
[WEBINAR] 10 cosas que debes saber sobre Active Directory.Grupo Smartekh
 
Introducción mongodb y desarrollo
Introducción mongodb y desarrolloIntroducción mongodb y desarrollo
Introducción mongodb y desarrolloJuan Ladetto
 
Introducción a SQL sobre Oracle
Introducción a SQL sobre OracleIntroducción a SQL sobre Oracle
Introducción a SQL sobre OracleRaúl Galíndez
 
F:\basesdatos teo2 sistemas_db
F:\basesdatos teo2 sistemas_dbF:\basesdatos teo2 sistemas_db
F:\basesdatos teo2 sistemas_dbsuperinfopoderosas
 
Bases de datos desde visual basic 6.0
Bases de datos desde visual basic 6.0Bases de datos desde visual basic 6.0
Bases de datos desde visual basic 6.0LisbayUrdaneta
 
Primeros pasos con neo4j
Primeros pasos con neo4jPrimeros pasos con neo4j
Primeros pasos con neo4jUbaldo Taladriz
 
Manual de conexión de base de datos distribuida
Manual  de conexión de base de datos distribuidaManual  de conexión de base de datos distribuida
Manual de conexión de base de datos distribuidaJorch Mendez
 
Windows 2000 para cois
Windows 2000  para coisWindows 2000  para cois
Windows 2000 para coiseduardo5838
 
Así que pusiste MongoDB. Dime ¿cómo lo administras?
Así que pusiste MongoDB. Dime ¿cómo lo administras?Así que pusiste MongoDB. Dime ¿cómo lo administras?
Así que pusiste MongoDB. Dime ¿cómo lo administras?Alejandro E Brito Monedero
 
Dominios En Windows 2003 Server
Dominios En Windows 2003 ServerDominios En Windows 2003 Server
Dominios En Windows 2003 ServerDean1506
 
Dominios en-windows-2003-server-1220838475344065-8
Dominios en-windows-2003-server-1220838475344065-8Dominios en-windows-2003-server-1220838475344065-8
Dominios en-windows-2003-server-1220838475344065-8mpazguepa
 
My sql para principiantes
My sql para principiantesMy sql para principiantes
My sql para principiantesMichelle Torres
 
Presentacion sobre cassandra
Presentacion sobre cassandraPresentacion sobre cassandra
Presentacion sobre cassandrajesusnoseq
 

La actualidad más candente (20)

Tablespaces En Oracle
Tablespaces En OracleTablespaces En Oracle
Tablespaces En Oracle
 
Administracion de base de datos oracle tarea#02
Administracion de base de datos oracle tarea#02Administracion de base de datos oracle tarea#02
Administracion de base de datos oracle tarea#02
 
Administración de Oracle - Tema 3 - Creación de la BD
Administración de Oracle - Tema 3 - Creación de la BDAdministración de Oracle - Tema 3 - Creación de la BD
Administración de Oracle - Tema 3 - Creación de la BD
 
Oracle Spatial de la A a la Z - Unidad 1
Oracle Spatial de la A a la Z - Unidad 1Oracle Spatial de la A a la Z - Unidad 1
Oracle Spatial de la A a la Z - Unidad 1
 
Active directory
Active directoryActive directory
Active directory
 
Active directory
Active directoryActive directory
Active directory
 
[WEBINAR] 10 cosas que debes saber sobre Active Directory.
[WEBINAR] 10 cosas que debes saber sobre Active Directory.[WEBINAR] 10 cosas que debes saber sobre Active Directory.
[WEBINAR] 10 cosas que debes saber sobre Active Directory.
 
Introducción mongodb y desarrollo
Introducción mongodb y desarrolloIntroducción mongodb y desarrollo
Introducción mongodb y desarrollo
 
PostgreSQL
PostgreSQLPostgreSQL
PostgreSQL
 
Introducción a SQL sobre Oracle
Introducción a SQL sobre OracleIntroducción a SQL sobre Oracle
Introducción a SQL sobre Oracle
 
F:\basesdatos teo2 sistemas_db
F:\basesdatos teo2 sistemas_dbF:\basesdatos teo2 sistemas_db
F:\basesdatos teo2 sistemas_db
 
Bases de datos desde visual basic 6.0
Bases de datos desde visual basic 6.0Bases de datos desde visual basic 6.0
Bases de datos desde visual basic 6.0
 
Primeros pasos con neo4j
Primeros pasos con neo4jPrimeros pasos con neo4j
Primeros pasos con neo4j
 
Manual de conexión de base de datos distribuida
Manual  de conexión de base de datos distribuidaManual  de conexión de base de datos distribuida
Manual de conexión de base de datos distribuida
 
Windows 2000 para cois
Windows 2000  para coisWindows 2000  para cois
Windows 2000 para cois
 
Así que pusiste MongoDB. Dime ¿cómo lo administras?
Así que pusiste MongoDB. Dime ¿cómo lo administras?Así que pusiste MongoDB. Dime ¿cómo lo administras?
Así que pusiste MongoDB. Dime ¿cómo lo administras?
 
Dominios En Windows 2003 Server
Dominios En Windows 2003 ServerDominios En Windows 2003 Server
Dominios En Windows 2003 Server
 
Dominios en-windows-2003-server-1220838475344065-8
Dominios en-windows-2003-server-1220838475344065-8Dominios en-windows-2003-server-1220838475344065-8
Dominios en-windows-2003-server-1220838475344065-8
 
My sql para principiantes
My sql para principiantesMy sql para principiantes
My sql para principiantes
 
Presentacion sobre cassandra
Presentacion sobre cassandraPresentacion sobre cassandra
Presentacion sobre cassandra
 

Destacado

Installation joomla15
Installation joomla15Installation joomla15
Installation joomla15Becem Ghalleb
 
Formacion creditos documentarios importacion exportacion camen urbano camara ...
Formacion creditos documentarios importacion exportacion camen urbano camara ...Formacion creditos documentarios importacion exportacion camen urbano camara ...
Formacion creditos documentarios importacion exportacion camen urbano camara ...Carmen Urbano
 
ES-apresentacion avila business center soluciones de oficina e oficina virtua...
ES-apresentacion avila business center soluciones de oficina e oficina virtua...ES-apresentacion avila business center soluciones de oficina e oficina virtua...
ES-apresentacion avila business center soluciones de oficina e oficina virtua...Avila Spaces
 
INES CRM Presentación Corporativa
INES CRM Presentación CorporativaINES CRM Presentación Corporativa
INES CRM Presentación CorporativaINES CRM
 
Bajo tus alas (historia con el salmo-91-4)
Bajo tus alas (historia con el salmo-91-4)Bajo tus alas (historia con el salmo-91-4)
Bajo tus alas (historia con el salmo-91-4)Ramón Rivas
 
Kalrez o ring,Dupont perfluoroelastomer o ring,FFKM O ring,PAROFLUOR (FFKM) O...
Kalrez o ring,Dupont perfluoroelastomer o ring,FFKM O ring,PAROFLUOR (FFKM) O...Kalrez o ring,Dupont perfluoroelastomer o ring,FFKM O ring,PAROFLUOR (FFKM) O...
Kalrez o ring,Dupont perfluoroelastomer o ring,FFKM O ring,PAROFLUOR (FFKM) O...Banana Yuan
 
Spelend leren, ontwikkelen en ontmoeten
Spelend leren, ontwikkelen en ontmoetenSpelend leren, ontwikkelen en ontmoeten
Spelend leren, ontwikkelen en ontmoetenOvaal Speelconcepten
 
Mis rotaciones como R4 de Farmacia Hospitalaria
Mis rotaciones como R4 de Farmacia Hospitalaria  Mis rotaciones como R4 de Farmacia Hospitalaria
Mis rotaciones como R4 de Farmacia Hospitalaria Alfredo Montero
 
The Importance of Urban Agro-Recreation in the Formation of a Sustainable Int...
The Importance of Urban Agro-Recreation in the Formation of a Sustainable Int...The Importance of Urban Agro-Recreation in the Formation of a Sustainable Int...
The Importance of Urban Agro-Recreation in the Formation of a Sustainable Int...drboon
 
[Thuvienso.org] 150 bài toán tin
[Thuvienso.org] 150 bài toán tin[Thuvienso.org] 150 bài toán tin
[Thuvienso.org] 150 bài toán tinHiếu Nguyễn
 
Folleto SIT gtt
Folleto SIT gttFolleto SIT gtt
Folleto SIT gttgttgtt
 
Dual Coding Theory E Langhorst
Dual Coding Theory E LanghorstDual Coding Theory E Langhorst
Dual Coding Theory E LanghorstEric Langhorst
 
Metodos de preparo e calculos homeopaticos
Metodos de preparo e calculos homeopaticosMetodos de preparo e calculos homeopaticos
Metodos de preparo e calculos homeopaticosPriscilla Mota
 

Destacado (20)

Gestión de índices en MongoDB
Gestión de índices en MongoDBGestión de índices en MongoDB
Gestión de índices en MongoDB
 
Diário Oficial: 24-11-2015
Diário Oficial: 24-11-2015Diário Oficial: 24-11-2015
Diário Oficial: 24-11-2015
 
Installation joomla15
Installation joomla15Installation joomla15
Installation joomla15
 
Formacion creditos documentarios importacion exportacion camen urbano camara ...
Formacion creditos documentarios importacion exportacion camen urbano camara ...Formacion creditos documentarios importacion exportacion camen urbano camara ...
Formacion creditos documentarios importacion exportacion camen urbano camara ...
 
Certificados profesionalidad
Certificados profesionalidadCertificados profesionalidad
Certificados profesionalidad
 
ES-apresentacion avila business center soluciones de oficina e oficina virtua...
ES-apresentacion avila business center soluciones de oficina e oficina virtua...ES-apresentacion avila business center soluciones de oficina e oficina virtua...
ES-apresentacion avila business center soluciones de oficina e oficina virtua...
 
INES CRM Presentación Corporativa
INES CRM Presentación CorporativaINES CRM Presentación Corporativa
INES CRM Presentación Corporativa
 
Bajo tus alas (historia con el salmo-91-4)
Bajo tus alas (historia con el salmo-91-4)Bajo tus alas (historia con el salmo-91-4)
Bajo tus alas (historia con el salmo-91-4)
 
Kalrez o ring,Dupont perfluoroelastomer o ring,FFKM O ring,PAROFLUOR (FFKM) O...
Kalrez o ring,Dupont perfluoroelastomer o ring,FFKM O ring,PAROFLUOR (FFKM) O...Kalrez o ring,Dupont perfluoroelastomer o ring,FFKM O ring,PAROFLUOR (FFKM) O...
Kalrez o ring,Dupont perfluoroelastomer o ring,FFKM O ring,PAROFLUOR (FFKM) O...
 
Spelend leren, ontwikkelen en ontmoeten
Spelend leren, ontwikkelen en ontmoetenSpelend leren, ontwikkelen en ontmoeten
Spelend leren, ontwikkelen en ontmoeten
 
Mis rotaciones como R4 de Farmacia Hospitalaria
Mis rotaciones como R4 de Farmacia Hospitalaria  Mis rotaciones como R4 de Farmacia Hospitalaria
Mis rotaciones como R4 de Farmacia Hospitalaria
 
KBL European Private Bankers Profile
KBL European Private Bankers ProfileKBL European Private Bankers Profile
KBL European Private Bankers Profile
 
Cuaderno de trabajo: Lugares, plazas y calles de Cádiz
Cuaderno de trabajo: Lugares, plazas y calles de CádizCuaderno de trabajo: Lugares, plazas y calles de Cádiz
Cuaderno de trabajo: Lugares, plazas y calles de Cádiz
 
The Importance of Urban Agro-Recreation in the Formation of a Sustainable Int...
The Importance of Urban Agro-Recreation in the Formation of a Sustainable Int...The Importance of Urban Agro-Recreation in the Formation of a Sustainable Int...
The Importance of Urban Agro-Recreation in the Formation of a Sustainable Int...
 
Slide emgoldex
Slide emgoldexSlide emgoldex
Slide emgoldex
 
[Thuvienso.org] 150 bài toán tin
[Thuvienso.org] 150 bài toán tin[Thuvienso.org] 150 bài toán tin
[Thuvienso.org] 150 bài toán tin
 
Hercolubus
HercolubusHercolubus
Hercolubus
 
Folleto SIT gtt
Folleto SIT gttFolleto SIT gtt
Folleto SIT gtt
 
Dual Coding Theory E Langhorst
Dual Coding Theory E LanghorstDual Coding Theory E Langhorst
Dual Coding Theory E Langhorst
 
Metodos de preparo e calculos homeopaticos
Metodos de preparo e calculos homeopaticosMetodos de preparo e calculos homeopaticos
Metodos de preparo e calculos homeopaticos
 

Similar a No-SQL, Azure Table Storage y MongoDB

Database fundamental itprosdc_chapter2
Database fundamental itprosdc_chapter2Database fundamental itprosdc_chapter2
Database fundamental itprosdc_chapter2Julián Castiblanco
 
Servicios de base de datos multimodelo NoSQL con Azure CosmosDB y aplicación...
Servicios de base de datos multimodelo  NoSQL con Azure CosmosDB y aplicación...Servicios de base de datos multimodelo  NoSQL con Azure CosmosDB y aplicación...
Servicios de base de datos multimodelo NoSQL con Azure CosmosDB y aplicación...Daniel Gomez Jaramillo
 
SQL Server rápido y furioso
SQL Server rápido y furiosoSQL Server rápido y furioso
SQL Server rápido y furiosoSpanishPASSVC
 
Azure SQL Data Warehouse desde cada_angulo
Azure SQL Data Warehouse desde cada_anguloAzure SQL Data Warehouse desde cada_angulo
Azure SQL Data Warehouse desde cada_anguloAdrian Miranda
 
Introducción a Microsoft Azure SQL Data Warehouse
Introducción a Microsoft Azure SQL Data WarehouseIntroducción a Microsoft Azure SQL Data Warehouse
Introducción a Microsoft Azure SQL Data WarehouseJoseph Lopez
 
Administración y programación en sql server
Administración y programación en sql serverAdministración y programación en sql server
Administración y programación en sql serverIsabel_Samir
 
Rendimiento en aplicaciones web con Symfony2
Rendimiento en aplicaciones web con Symfony2Rendimiento en aplicaciones web con Symfony2
Rendimiento en aplicaciones web con Symfony2Asier Marqués
 
Bases de datos NoSQL - Huancayo - 2010
Bases de datos NoSQL - Huancayo - 2010Bases de datos NoSQL - Huancayo - 2010
Bases de datos NoSQL - Huancayo - 2010Antonio Ognio
 
Linq to sql 2
Linq to sql 2Linq to sql 2
Linq to sql 2jcfarit
 

Similar a No-SQL, Azure Table Storage y MongoDB (20)

Base de datos - Clase 1
Base de datos - Clase 1Base de datos - Clase 1
Base de datos - Clase 1
 
Postgresql expo
Postgresql expoPostgresql expo
Postgresql expo
 
Database fundamental itprosdc_chapter2
Database fundamental itprosdc_chapter2Database fundamental itprosdc_chapter2
Database fundamental itprosdc_chapter2
 
Servicios de base de datos multimodelo NoSQL con Azure CosmosDB y aplicación...
Servicios de base de datos multimodelo  NoSQL con Azure CosmosDB y aplicación...Servicios de base de datos multimodelo  NoSQL con Azure CosmosDB y aplicación...
Servicios de base de datos multimodelo NoSQL con Azure CosmosDB y aplicación...
 
SQL Server rápido y furioso
SQL Server rápido y furiosoSQL Server rápido y furioso
SQL Server rápido y furioso
 
Azure SQL Data Warehouse desde cada_angulo
Azure SQL Data Warehouse desde cada_anguloAzure SQL Data Warehouse desde cada_angulo
Azure SQL Data Warehouse desde cada_angulo
 
Introducción a Microsoft Azure SQL Data Warehouse
Introducción a Microsoft Azure SQL Data WarehouseIntroducción a Microsoft Azure SQL Data Warehouse
Introducción a Microsoft Azure SQL Data Warehouse
 
Rila
RilaRila
Rila
 
Presentacion BD NoSQL
Presentacion  BD NoSQLPresentacion  BD NoSQL
Presentacion BD NoSQL
 
Base datos f03
Base datos f03Base datos f03
Base datos f03
 
Administración y programación en sql server
Administración y programación en sql serverAdministración y programación en sql server
Administración y programación en sql server
 
Base de datos
Base de datosBase de datos
Base de datos
 
MongoDB: la BBDD NoSQL más popular del mercado
MongoDB: la BBDD NoSQL más popular del mercadoMongoDB: la BBDD NoSQL más popular del mercado
MongoDB: la BBDD NoSQL más popular del mercado
 
Rendimiento en aplicaciones web con Symfony2
Rendimiento en aplicaciones web con Symfony2Rendimiento en aplicaciones web con Symfony2
Rendimiento en aplicaciones web con Symfony2
 
Bases de datos NoSQL - Huancayo - 2010
Bases de datos NoSQL - Huancayo - 2010Bases de datos NoSQL - Huancayo - 2010
Bases de datos NoSQL - Huancayo - 2010
 
Base de Datos
Base de DatosBase de Datos
Base de Datos
 
Base De Datos
Base De DatosBase De Datos
Base De Datos
 
Linq to sql 2
Linq to sql 2Linq to sql 2
Linq to sql 2
 
Conceptos Basicos Oracle
Conceptos Basicos OracleConceptos Basicos Oracle
Conceptos Basicos Oracle
 
Sql server2000-tuto
Sql server2000-tutoSql server2000-tuto
Sql server2000-tuto
 

Más de Eladio Rincón Herrera

Carga y procesamiento de datos en HDInsight
Carga y procesamiento de datos en HDInsightCarga y procesamiento de datos en HDInsight
Carga y procesamiento de datos en HDInsightEladio Rincón Herrera
 
Keynote Relacional SQL Server para hobbits y enanos
Keynote Relacional  SQL Server para hobbits y enanosKeynote Relacional  SQL Server para hobbits y enanos
Keynote Relacional SQL Server para hobbits y enanosEladio Rincón Herrera
 
Some Features on SQL Server 2012 from the Accidental DBA and the ITPro perspe...
Some Features on SQL Server 2012 from the Accidental DBA and the ITPro perspe...Some Features on SQL Server 2012 from the Accidental DBA and the ITPro perspe...
Some Features on SQL Server 2012 from the Accidental DBA and the ITPro perspe...Eladio Rincón Herrera
 
Summit 2013: Optimizando SharePoint2013 para grandes volumenes de informacion
Summit 2013: Optimizando SharePoint2013 para grandes volumenes de informacionSummit 2013: Optimizando SharePoint2013 para grandes volumenes de informacion
Summit 2013: Optimizando SharePoint2013 para grandes volumenes de informacionEladio Rincón Herrera
 
Data E2E. el ciclo de vida de los datos
Data E2E. el ciclo de vida de los datosData E2E. el ciclo de vida de los datos
Data E2E. el ciclo de vida de los datosEladio Rincón Herrera
 

Más de Eladio Rincón Herrera (7)

Carga y procesamiento de datos en HDInsight
Carga y procesamiento de datos en HDInsightCarga y procesamiento de datos en HDInsight
Carga y procesamiento de datos en HDInsight
 
Windows Azure SQL Databases
Windows Azure SQL DatabasesWindows Azure SQL Databases
Windows Azure SQL Databases
 
Keynote Relacional SQL Server para hobbits y enanos
Keynote Relacional  SQL Server para hobbits y enanosKeynote Relacional  SQL Server para hobbits y enanos
Keynote Relacional SQL Server para hobbits y enanos
 
03 24 hopes_2014_eladiorincon
03 24 hopes_2014_eladiorincon03 24 hopes_2014_eladiorincon
03 24 hopes_2014_eladiorincon
 
Some Features on SQL Server 2012 from the Accidental DBA and the ITPro perspe...
Some Features on SQL Server 2012 from the Accidental DBA and the ITPro perspe...Some Features on SQL Server 2012 from the Accidental DBA and the ITPro perspe...
Some Features on SQL Server 2012 from the Accidental DBA and the ITPro perspe...
 
Summit 2013: Optimizando SharePoint2013 para grandes volumenes de informacion
Summit 2013: Optimizando SharePoint2013 para grandes volumenes de informacionSummit 2013: Optimizando SharePoint2013 para grandes volumenes de informacion
Summit 2013: Optimizando SharePoint2013 para grandes volumenes de informacion
 
Data E2E. el ciclo de vida de los datos
Data E2E. el ciclo de vida de los datosData E2E. el ciclo de vida de los datos
Data E2E. el ciclo de vida de los datos
 

Último

CLASE DE TECNOLOGIA E INFORMATICA PRIMARIA
CLASE  DE TECNOLOGIA E INFORMATICA PRIMARIACLASE  DE TECNOLOGIA E INFORMATICA PRIMARIA
CLASE DE TECNOLOGIA E INFORMATICA PRIMARIAWilbisVega
 
KELA Presentacion Costa Rica 2024 - evento Protégeles
KELA Presentacion Costa Rica 2024 - evento ProtégelesKELA Presentacion Costa Rica 2024 - evento Protégeles
KELA Presentacion Costa Rica 2024 - evento ProtégelesFundación YOD YOD
 
Proyecto integrador. Las TIC en la sociedad S4.pptx
Proyecto integrador. Las TIC en la sociedad S4.pptxProyecto integrador. Las TIC en la sociedad S4.pptx
Proyecto integrador. Las TIC en la sociedad S4.pptx241521559
 
guía de registro de slideshare por Brayan Joseph
guía de registro de slideshare por Brayan Josephguía de registro de slideshare por Brayan Joseph
guía de registro de slideshare por Brayan JosephBRAYANJOSEPHPEREZGOM
 
International Women's Day Sucre 2024 (IWD)
International Women's Day Sucre 2024 (IWD)International Women's Day Sucre 2024 (IWD)
International Women's Day Sucre 2024 (IWD)GDGSucre
 
trabajotecologiaisabella-240424003133-8f126965.pdf
trabajotecologiaisabella-240424003133-8f126965.pdftrabajotecologiaisabella-240424003133-8f126965.pdf
trabajotecologiaisabella-240424003133-8f126965.pdfIsabellaMontaomurill
 
Trabajo Mas Completo De Excel en clase tecnología
Trabajo Mas Completo De Excel en clase tecnologíaTrabajo Mas Completo De Excel en clase tecnología
Trabajo Mas Completo De Excel en clase tecnologíassuserf18419
 
9egb-lengua y Literatura.pdf_texto del estudiante
9egb-lengua y Literatura.pdf_texto del estudiante9egb-lengua y Literatura.pdf_texto del estudiante
9egb-lengua y Literatura.pdf_texto del estudianteAndreaHuertas24
 
POWER POINT YUCRAElabore una PRESENTACIÓN CORTA sobre el video película: La C...
POWER POINT YUCRAElabore una PRESENTACIÓN CORTA sobre el video película: La C...POWER POINT YUCRAElabore una PRESENTACIÓN CORTA sobre el video película: La C...
POWER POINT YUCRAElabore una PRESENTACIÓN CORTA sobre el video película: La C...silviayucra2
 
Presentación guía sencilla en Microsoft Excel.pptx
Presentación guía sencilla en Microsoft Excel.pptxPresentación guía sencilla en Microsoft Excel.pptx
Presentación guía sencilla en Microsoft Excel.pptxLolaBunny11
 
pruebas unitarias unitarias en java con JUNIT
pruebas unitarias unitarias en java con JUNITpruebas unitarias unitarias en java con JUNIT
pruebas unitarias unitarias en java con JUNITMaricarmen Sánchez Ruiz
 
Herramientas de corte de alta velocidad.pptx
Herramientas de corte de alta velocidad.pptxHerramientas de corte de alta velocidad.pptx
Herramientas de corte de alta velocidad.pptxRogerPrieto3
 
Global Azure Lima 2024 - Integración de Datos con Microsoft Fabric
Global Azure Lima 2024 - Integración de Datos con Microsoft FabricGlobal Azure Lima 2024 - Integración de Datos con Microsoft Fabric
Global Azure Lima 2024 - Integración de Datos con Microsoft FabricKeyla Dolores Méndez
 
Redes direccionamiento y subredes ipv4 2024 .pdf
Redes direccionamiento y subredes ipv4 2024 .pdfRedes direccionamiento y subredes ipv4 2024 .pdf
Redes direccionamiento y subredes ipv4 2024 .pdfsoporteupcology
 
EPA-pdf resultado da prova presencial Uninove
EPA-pdf resultado da prova presencial UninoveEPA-pdf resultado da prova presencial Uninove
EPA-pdf resultado da prova presencial UninoveFagnerLisboa3
 

Último (15)

CLASE DE TECNOLOGIA E INFORMATICA PRIMARIA
CLASE  DE TECNOLOGIA E INFORMATICA PRIMARIACLASE  DE TECNOLOGIA E INFORMATICA PRIMARIA
CLASE DE TECNOLOGIA E INFORMATICA PRIMARIA
 
KELA Presentacion Costa Rica 2024 - evento Protégeles
KELA Presentacion Costa Rica 2024 - evento ProtégelesKELA Presentacion Costa Rica 2024 - evento Protégeles
KELA Presentacion Costa Rica 2024 - evento Protégeles
 
Proyecto integrador. Las TIC en la sociedad S4.pptx
Proyecto integrador. Las TIC en la sociedad S4.pptxProyecto integrador. Las TIC en la sociedad S4.pptx
Proyecto integrador. Las TIC en la sociedad S4.pptx
 
guía de registro de slideshare por Brayan Joseph
guía de registro de slideshare por Brayan Josephguía de registro de slideshare por Brayan Joseph
guía de registro de slideshare por Brayan Joseph
 
International Women's Day Sucre 2024 (IWD)
International Women's Day Sucre 2024 (IWD)International Women's Day Sucre 2024 (IWD)
International Women's Day Sucre 2024 (IWD)
 
trabajotecologiaisabella-240424003133-8f126965.pdf
trabajotecologiaisabella-240424003133-8f126965.pdftrabajotecologiaisabella-240424003133-8f126965.pdf
trabajotecologiaisabella-240424003133-8f126965.pdf
 
Trabajo Mas Completo De Excel en clase tecnología
Trabajo Mas Completo De Excel en clase tecnologíaTrabajo Mas Completo De Excel en clase tecnología
Trabajo Mas Completo De Excel en clase tecnología
 
9egb-lengua y Literatura.pdf_texto del estudiante
9egb-lengua y Literatura.pdf_texto del estudiante9egb-lengua y Literatura.pdf_texto del estudiante
9egb-lengua y Literatura.pdf_texto del estudiante
 
POWER POINT YUCRAElabore una PRESENTACIÓN CORTA sobre el video película: La C...
POWER POINT YUCRAElabore una PRESENTACIÓN CORTA sobre el video película: La C...POWER POINT YUCRAElabore una PRESENTACIÓN CORTA sobre el video película: La C...
POWER POINT YUCRAElabore una PRESENTACIÓN CORTA sobre el video película: La C...
 
Presentación guía sencilla en Microsoft Excel.pptx
Presentación guía sencilla en Microsoft Excel.pptxPresentación guía sencilla en Microsoft Excel.pptx
Presentación guía sencilla en Microsoft Excel.pptx
 
pruebas unitarias unitarias en java con JUNIT
pruebas unitarias unitarias en java con JUNITpruebas unitarias unitarias en java con JUNIT
pruebas unitarias unitarias en java con JUNIT
 
Herramientas de corte de alta velocidad.pptx
Herramientas de corte de alta velocidad.pptxHerramientas de corte de alta velocidad.pptx
Herramientas de corte de alta velocidad.pptx
 
Global Azure Lima 2024 - Integración de Datos con Microsoft Fabric
Global Azure Lima 2024 - Integración de Datos con Microsoft FabricGlobal Azure Lima 2024 - Integración de Datos con Microsoft Fabric
Global Azure Lima 2024 - Integración de Datos con Microsoft Fabric
 
Redes direccionamiento y subredes ipv4 2024 .pdf
Redes direccionamiento y subredes ipv4 2024 .pdfRedes direccionamiento y subredes ipv4 2024 .pdf
Redes direccionamiento y subredes ipv4 2024 .pdf
 
EPA-pdf resultado da prova presencial Uninove
EPA-pdf resultado da prova presencial UninoveEPA-pdf resultado da prova presencial Uninove
EPA-pdf resultado da prova presencial Uninove
 

No-SQL, Azure Table Storage y MongoDB

  • 1. NoSQL: Azure Table Storage & MongoDB Alternativas y escenarios de uso NoSQL @erincon Eladio Rincón Director Relacional MCT, MVP SQL Server @augurarte Miguel López Director Cloud | mlopez@solidq.com MCT, MCPD, MCTS, MCP 1
  • 2. EN CUMPLIMIENTO CON LA LEY 15/1999 DE PROTECCION DE DATOS DE CARÁCTER PERSONAL, PONEMOS EN TU CONOCIMIENTO QUE ESTA SESIÓN VA A SER GRABADA POR SOLIDQ Y QUE ESTA GRABACIÓN PODRÍA SER UTILIZADA COMO MATERIAL DE MARKETING Y HACERSE PUBLICA A TRAVÉS DE DIVERSOS MEDIOS, COMO POR EJEMPLO NUESTRA PAGINA WEB. TENIENDO EN CUENTA QUE TU IMAGEN PUEDE APARECER EN ESA GRABACIÓN, SI NO DESEAS APARECER, ROGAMOS NOS LO COMUNIQUES POR LOS MEDIOS QUE YA CONOCES. COMUNICADO 2
  • 3. Agenda Bases de datos relacionales y NoSQL Microsoft Azure Table Storage – Fundamentos MSATS – Diseño de NoSQL con MSATS – Programación del modelo MongoDB – Fundamentos – Diseño de NoSQL con MongoDB – Programación del modelo Escenarios Evaluación de costes 3
  • 4. NoSQL: Azure Table Storage & MongoDB BDD Relacionales y NoSQL Almacenamiento de table de Azure (MSATS) MongoDB Escenarios Costes
  • 5. BDD Relacionales y NoSQL Las BDD Relacionales lideran el conjunto de sistemas de almacenamiento transaccional, escritura atómica, indexación de columnas, optimización de consultas y lenguaje de consulta declarative orientado a conjuntos. Las BDD NoSQL se emplean de forma generalizada en sitios Web de tipo social masivamente accedidos y que necesitan escalar de forma intensiva, donde la característica principal son conjuntos de datos simples (frente a consultas complejas) 5© 2012 SolidQ
  • 6. Donde gasta el tiempo RDBMS en TPCC http://static.cs.brown.edu/courses/csci2270/papers/looking-glass.pdf
  • 8. Teorema de CAP: Selección de variables 8
  • 9. Next Generation Databases mostly addressing some of the points: being non-relational, distributed, open-source and horizontally scalable. NoSQL 9http://NoSQL-database.org
  • 10. • Surgen a principios de 2009 • Crecimiento exponencial. • Características comunes más importantes: • No se basan en esquema • Soporte de replicación sencillo • API de fácil utilización • Consistencia parcial (eventually consistent) / BASE (not ACID) • Enormes cantidades de información. • "nosql" es traducido tradicionalmente como "not only sql“, y se considera un alias que referencia la definición anterior. NoSQL Evolución y características 10
  • 11. Modelos de datos NoSQL 11 http://www.slideshare.net/emileifrem/nosql-east-a-nosql-overview-and-the-benefits-of-graph-databases
  • 12. • Wide Column Store / Column Families • Document Store • Key Value / Tuple Store • Graph Databases • Multimodel Databases • Object Databases • Grid & Cloud Database Solutions • XML Databases • Multidimensional Databases • Multivalue Databases • Event Sourcing • Network Model Grandes familias NoSQL 12
  • 14. NoSQL: Azure Table Storage & MongoDB BDD Relacionales y NoSQL Almacenamiento de table de Azure (MSATS) MongoDB Escenarios Costes
  • 15. Almacenamiento de table Azure Windows Azure Table Service Windows Azure tables Designing Windows Azure Tables Implementing Windows Azure Tables Querying Windows Azure Tables Accessing table storage Table Storage Security – Set container permissions. – Use Shared Access Signatures (SAS) – Stored Access Policies 15
  • 16. Cuentas de almacenamiento MSA User creates a globally unique storage account name Choose the primary location to host storage account Three regions: – “North Central US”, “South Central US” – “North Europe”, “Europe West” – “South East Asia”, “East Asia” Table Service: http://myaccount.table.core.windows.net 16
  • 17. DEMO 17 Aprovisionamiento de una cuenta de almacenamiento de Azure
  • 18. Características MSATS • Tabla de almacenamiento de Azure • Colección de entidades (parejas clave, valor) • La entidad tiene una clave principal y un conjunto aleatorio no definido (schema-less) de propiedades. • PartitionKey (Particionamiento / distribución de carga / escalado) • RowKey (conjuntos de filas relacionadas en una partición) • TimeStamp (Sólo lectura, TS creación) • Una propiedad es un par de nombre/valor (con tipo) similar a una columna • MSATS no fuerza la creación o validación de esquema • El desarrollador necesitará implementar un esquema concreto para su acceso 18
  • 21. Entidades del MSATS Entities are the basic data item stored in a table Collections of properties that are name value pairs. Each entity has 3 fixed properties called PartitionKey, RowKey and Timestamp. If we were to map this to concepts in a conventional database system, an entity is analogous to a row and property is analogous to a column. An entity can have up to 255 – 3 properties = 252 (3 system properties are reserved). 1 Entity = 1 MB of data (Maximum) 21
  • 22. Entidades: Tipos de datos de propiedades • Byte[] • Bool • DateTime • Double • Guid • Int32/Int • Int64/long • String 22
  • 23. Entidades: Indexación (Primary Key) • PartitionKey property • RowKey property • Timestamp property 23
  • 24. Características de las propiedades PK • Tablas particionadas para soportar balanceo de carga entre nodos de almacenamiento. • Las entidades se organizan por partición. • Una partición es un rango consecutive de entidades con la misma clave de partición. • Partition key: Identificador único de partición dentro de una tabla. • PK es la primera parte de la clave principal de una entidad. • PK puede ser una cadena de hasta 1KB de tamaño. • Incluir PartitionKey property en cada insert, update, y delete. 24
  • 25. Características de las propiedades RowKey • The row key is a unique identifier for an entity within a given partition. • Together the PartitionKey and RowKey uniquely identify every entity within a table. • The row key is a string value that may be up to 1 KB in size. • You must include the RowKey property in every insert, update, and delete operation. RowKey 25
  • 26. MSATS es una BDD sin esquema 26 PartitionKey: str 2012102517USR91 P V RowKey: str jobid0121 P V TimeStamp: dt 201210251715 P V Name: st User_91 P V PartitionKey: str 2012102517USR10 P V RowKey: str jobid0121 P V TimeStamp: dt 201210251735 P V Status: st Processing P V Name: st User_10 P V PartitionKey: str 2012102517USR10 P V RowKey: str jobid0125 P V TimeStamp: dt 201210251755 P V RoleExec: st IN_121 P V Name: st User_10 P V LastOp: st Decrypt P V PartitionKey: str 2012102517USR13 P V RowKey: str jobid0002 P V TimeStamp: dt 201210251759 P V Name: st User_13 P V PartitionKey: str 2012102517USR13 P V RowKey: str jobid0001 P V TimeStamp: dt 201210251755 P V Name: st User_13 P V Status: st Aborted P V TABLE JOBEXECUTION
  • 27. Consulta del servicio de tabla 27 PartitionKey: str 2012102517USR91 P V RowKey: str jobid0121 P V TimeStamp: dt 201210251715 P V Name: st User_91 P V PartitionKey: str 2012102517USR10 P V RowKey: str jobid0121 P V TimeStamp: dt 201210251735 P V Status: st Processing P V Name: st User_10 P V PartitionKey: str 2012102517USR10 P V RowKey: str jobid0125 P V TimeStamp: dt 201210251755 P V RoleExec: st IN_121 P V Name: st User_10 P V LastOp: st Decrypt P V PartitionKey: str 2012102517USR13 P V RowKey: str jobid0002 P V TimeStamp: dt 201210251759 P V Name: st User_13 P V PartitionKey: str 2012102517USR13 P V RowKey: str jobid0001 P V TimeStamp: dt 201210251755 P V Name: st User_13 P V Status: st Aborted P V TABLE JOBEXECUTION
  • 30. DEMO 30 Acceso a un sistema MSATS en producción
  • 31. Table Storage Design Define your model Key selection 31
  • 32. Key selection: Considerations Entity Group Transactions Scalability Efficient queries 32
  • 33. DEMO 33 Gestión de tablas con cliente Windows
  • 34. Modelo de programación Windows Azure Storage: Connection Strings Managing tables in WATS Entities: CRUD operations (Create, read, update, delete) Querying tables Perform Entity Group Transactions (EGT) 34
  • 35. Connection Strings in Visual Studio 2013 Double click on the Web/Worker role in the solution 35© 2012 SolidQ
  • 36. Managing tables in WATS Use Microsoft.WindowsAzure.StorageClient. There are several ways of creating tables. Initialize tables once: for example using session or Application start events. Use CreateCloudTableClient to interact with WATS For example, to create a table called ‘Products’: 36 using Microsoft.WindowsAzure; using Microsoft.WindowsAzure.StorageClient; var clAccount; clAccount = CloudStorageAccount.FromConfigurationSettings(“ProductStorage") var tableClient = clAccount.CreateCloudTableClient(); tableClient.CreateTableIfNotExists(“Products”)
  • 37. Entidades: Operaciones CRUD Configurar las entidades (modelo de clases) Configurar un DataContext 37
  • 38. Configuración de las entidades Class modeling 38
  • 39. Operaciones CRUD Context class is required in .NET to access the WAT using WCF Data Services and the correspondent entity (GE06LDataEntry). Setting up data context 39 namespace GE06L_Data { public class GE06LDataContext : TableServiceContext { public GE06LDataContext(string baseAddress, Microsoft.WindowsAzure.StorageCredentials credentials) : base(baseAddress, credentials) {} public IQueryable<GE06LEntry> GE06LEntry { get { return this.CreateQuery<GE06LEntry>(“GE06LEntry");} } } }
  • 40. Entities CRUD operations List, Add, Update 40 // List (read) operation for GE06LEntry entities public IEnumerable<GE06LEntry> GetGE06LEntries() { var results = from g in this.context.GE06LEntry where g.PartitionKey == DateTime.UtcNow.ToString("MMddyyyy") select g; return results; } // Add operation for GE06LEntry entities public void AddGE06LEntry(GE06LEntry newItem) { this.context.AddObject(“GE06LEntry", newItem); this.context.SaveChanges(); } // Update operation for GE06LEntry entities public void UpdateFileURL(string partitionKey, string rowKey, string fileUrl) { var results = from g in this.context.GE06LEntry where g.PartitionKey == partitionKey && g.RowKey == rowKey select g; var entry = results.FirstOrDefault<GE06LEntry>(); entry.FilelUrl = fileUrl; this.context.UpdateObject(entry); this.context.SaveChanges(); }
  • 41. Consultar MSATS Single Entity (a.k.a. Point Queries) 41 var q = ( from pais in context.CreateQuery<Pais>(tableName) where pais.PartitionKey == “Paises“ && pais.RowKey == “España" select movie);
  • 42. Consultar MSATS Range Queries - Row Range Scan 42© 2012 SolidQ var q = ( from movie in context.CreateQuery<Movie>(tableName) where movie.PartitionKey == "Action" && movie.RowKey.CompareTo("Alien") >= 0 && movie.RowKey.CompareTo("Terminator") <= 0 && movie.IsFavorite select movie );
  • 43. Consultar MSATS Range Queries - Partition Range Scan 43 var q = ( from movie in context.CreateQuery<Movie>(tableName) where movie.PartitionKey == "Action" && movie.RowKey.CompareTo("Alien") >= 0 && movie.RowKey.CompareTo("Terminator") <= 0 && movie.IsFavorite select movie );
  • 44. Consultar MSATS Full Table Scan 44 var q = (from movie in context.CreateQuery<Movie>(tableName) select movie ); var q = (from movie in context.CreateQuery<Movie>(tableName) where movie.PartitionKey.CompareTo("Action") != 0 select movie ); var q = ( from movie in context.CreateQuery<Movie>(tableName) where movie.IsFavorite select movie); var q = (from movie in context.CreateQuery<Movie>(tableName) where movie.RowKey.CompareTo("Sh") >= 0 && movie.RowKey.CompareTo("Si") < 0 select movie );
  • 46. NoSQL: Azure Table Storage & MongoDB BDD Relacionales y NoSQL Almacenamiento de table de Azure (MSATS) MongoDB Escenarios Costes
  • 47. MongoDB Motivación 47 • ¿”Problemas” en RDBMs tradicionales? • Transaciones • JOINs • Prescindimos de ellos • Transacciones a nivel de documento • No dejamos hacer JOINs
  • 49. MongoDB: Otro Paradigma 49 • Filosofía Schema On-Read • El Esquema es importante (aunque laxo) • En algún momento necesitas “modelar” • Antes o después • Modelos Mapeados en Memoria • “Cerveza con alcohol vs cerveza sin alcohol” by Garrigós • Importante arquitectura x64!
  • 50. MongoDB: Conceptos Clave 50 • Aunque veamos JSON, almacenado en binario – BSON • Consola de administración  JavaScript y JSON • Varios GUI tipo SSMS • Drivers de Mongo para facilitar desarrollo • Driver para C# y usar LINQ • Modelos de persistencia para mapeo • MongoRepository • Sharding y Replicasets
  • 51. DEMO 51 MongoDB en Azure con correos electrónicos
  • 52. NoSQL: Azure Table Storage & MongoDB BDD Relacionales y NoSQL Almacenamiento de table de Azure (MSATS) MongoDB Escenarios Costes
  • 53. Aplicaciones altamente escalables que necesitan consultas sencillas y rápidas • ONU, datos georeferenciados, info calculada • Energética, metadatos • BIG Data, datos temporales/sensores • Información social / redes sociales • Aplicaciones de localización de correos, direcciones, etc. Escenarios 53
  • 54. NoSQL: Azure Table Storage & MongoDB BDD Relacionales y NoSQL Almacenamiento de table de Azure (MSATS) MongoDB Escenarios Costes
  • 55. Costes Microsoft Azure Table Storage MongoDB on Azure 55
  • 56. NoSQL: Azure Table Storage & MongoDB Bases de datos relacionales y NoSQL Microsoft Azure Table Storage – Fundamentos MSATS – Diseño de NoSQL con MSATS – Programación del modelo MongoDB – Fundamentos – Diseño de NoSQL con MongoDB – Programación del modelo Escenarios Evaluación de costes 56
  • 58. ¡Gracias! Siéntate a comer con nosotros o tómate un café y aclara tus dudas  @augurarte Miguel López @erincon Eladio Rincón 58

Notas del editor

  1. Key-Value Stores: Dynamo DHT, Voldemort (Used in Linkedin) Column Families: Google BigTable, Cassandra (Facebook) Document DBs: CouchDB, MongoDB () Graph DBs: Neo4j
  2. http://voltdb.com/downloads/datasheets_collateral/technical_overview.pdf http://static.cs.brown.edu/courses/csci2270/papers/looking-glass.pdf
  3. Note: Windows Azure Blob service has support for taking snapshots of blobs. The different between a snapshot and a blob copy is that snapshots are read-only and the original blob maintains a relationship to its snapshots; blob copies on the other hand are editable. Once a snapshot has been taken for a blob, this source blob can no longer be deleted. Before a source blob can be deleted, all of its snapshots must be deleted first. Security in WATS Once you have created a storage service account, you will receive two 512 bit secret keys called primary and secondary access keys. Any one of these secret keys is then used to authenticate user requests to the storage system by creating a HMAC SHA256 signature for the request. The signature is passed with each request to authenticate the user requests. The reason for the two access keys is that it allows you to regenerate keys by rotating between primary and secondary access keys in your existing live applications.
  4. Property Types The Table service supports a subset of data types defined by the WCF Data Services specification. By default a property is created as type String, unless you specify a different type. To explicitly type a property, specify its data type by using the appropriate WCF Data Services type in the Atom feed for an Insert Entity (REST API) or Update Entity (REST API) operation.
  5. This table contains a small subset of data for footrace event registrations. It presents a conceptual view of partitioning where the PartitionKey contains three different values comprised of the event's name and distance. In this example, there are two partition servers. Server A contains registrations for the half-marathon and 10 Km distances Server B contains only the full-marathon distances. The RowKey values are shown to provide context but are not meaningful for this example. Scalability Because a partition is always served from a single partition server and each partition server can serve one or more partitions, the efficiency of serving entities is correlated with the health of the server. Servers that encounter high traffic for their partitions may not be able to sustain a high throughput. For example, in the figure in the slide, if there are many requests for "2011 New York City Marathon__Half", server A may become too hot. To increase the throughput of the server, the storage system load-balances the partitions to other servers. The result is that the traffic is distributed across many other servers. For optimal load balancing of traffic, you should use more partitions because it will allow the Windows Azure Table service to distribute the partitions to more partition servers.
  6. Note: the TableServiceContext class is in the storage client API. This class derives from DataServiceContext in WCF Data Services and manages the credentials required to access your storage account as well as providing support for a retry policy for its operations.
  7. Type A. Single Entity (a.k.a. Point Queries): Point query is a query is to retrieve a single entity by specifying a single PartitionKey and RowKey using equality predicates. var q = (from movie in context.CreateQuery<Movie>(tableName) where movie.PartitionKey == "Action" && movie.RowKey == "Terminator" select movie);
  8. Type B: Row Range Scan: Query results in scanning a range of rows within a single partition var q = (from movie in context.CreateQuery<Movie>(tableName) where movie.PartitionKey == "Action" && movie.RowKey.CompareTo("Alien") >= 0   && movie.RowKey.CompareTo("Terminator") <= 0   && movie.IsFavorite select movie);
  9. Type C: Partition Range Scan: Query results in scanning a range of rows that may span across several partitions. var q = (from movie in context.CreateQuery<Movie>(tableName) where movie.PartitionKey.CompareTo("Action") >= 0 && movie.PartitionKey.CompareTo("War") < 0 && movie.IsFavorite select movie);
  10. Type D: Full Table Scan: Query results in scanning the entire table i.e. all rows in all partitions in a table. var q = (from movie in context.CreateQuery<Movie>(tableName) select movie ); var q = (from movie in context.CreateQuery<Movie>(tableName) where movie.PartitionKey.CompareTo("Action") != 0 select movie ); var q = ( from movie in context.CreateQuery<Movie>(tableName) where movie.IsFavorite select movie); var q = (from movie in context.CreateQuery<Movie>(tableName) where movie.RowKey.CompareTo("Sh") >= 0 && movie.RowKey.CompareTo("Si") < 0 select movie );