Upload
genexus
View
748
Download
0
Tags:
Embed Size (px)
Citation preview
UN MODELO DE DATOS UNIVERSAL INTERESANTE:
PERMATRONJuan Nicolás Jodal Matteo
Escenario: extensibilidad de datos
Customer{ CustomerId* CustomerName CustomerPhone}
Solución I: Pattern OAV
Customer{ CustomerId* CustomerName CustomerPhone}
CustomerAttributeValue{ CustomerId* CustomerAttributeId* CustomerAttributeValue}
CustomerAttribute{ CustomerAttributeId* CustomerAttributeName CustomerAttributeType}
Solución II: UDM
o Modelos Universales de Datos (UDM)
UDM Existentes
o Modelo de David Hayo Topics Mapso CM Hypergraphso Google BigTableo Amazon CoachDBo FreeBaseo ThingDBo FluidDBo RDF
Modelo de David Hay
Objetivos
o Almacenar datos no planificadoso Información no uniformeo Versiones de la información
Un enfoque común
Entidades
• Entity• Object• Subject• Class• Topic• Resource• Thing
Propiedades
• Property• Attribute• Verb• Predicate
Relaciones
Relaciones entre lasentidadeso Explícitas
o Orientación a Objetos
o Implícitaso Modelo Relacional
Permatron
DatosNotebook{ Id = 1234 Marca = Lenovo Modelo = T500 Disco { Tipo = SSD Tamaño { Unidad = 128 Medida = GB } }}
Persona{ Id = 5678 Nombre = Camila Padre = Nicolas}Persona{ Id = 9123 Nombre = Nicolas Cuadro = Peñarol}
Origen
File{ FileId* FileName FileContent}
Contenido Abierto
Entity{ EntityId* EntityName}
EntityProperties{ EntityId* RowId* IndentLevel PropertyName PropertyValue}
Repositorio de Valores
Entity{ EntityId* EntityName}
EntityProperties{ EntityId* RowId* IndentLevel PropertyName PropertyValueId}
PropertyValue{ PropertyValueId* PropertyValueType PropertyValueValue}
Repositorio de Propiedades
Entity{ EntityId* EntityName}
EntityProperties{ EntityId* RowId* IndentLevel PropertyId PropertyValueId}
PropertyValue{ PropertyValueId* PropertyValueType PropertyValueValue}
Property{ PropertyId* PropertyName}
Una Propiedad es una Entidad!Entity{ EntityId* EntityName}
EntityProperties{ EntityId* RowId* IndentLevel PropertyId //subtype EntityId PropertyValueId}
PropertyValue{ PropertyValueId* PropertyValueType PropertyValueValue}
Link entre Entidades
PropertyValue{ PropertyValueId* PropertyValueType PropertyValueValue}
PropertyValue{ PropertyValueId* PropertyValueType PropertyValueCharacter PropertyValueBlob PropertyValueEntityId // Subtype EntityId}
UDM Entity Oriented
Entity{ EntityId* EntityName}
EntityProperties{ EntityId* RowId* IndentLevel PropertyId PropertyValueId}
PropertyValue{ PropertyValueId* PropertyValueType PropertyValueCharacter PropertyValueBlob PropertyValueEntityId}
UDM Attribute Oriented
ValueProperties{ SubjectId* // subtype ValueId RowId* IndentLevel PropertyId // subtype ValueId PropertyValueId // subtype ValueId}
Value{ ValueId* ValueType ValueData}
Ejemplo
Persona{ Id = 5678 Nombre = Camila Padre = Nicolas}
ValueId
ValueData
1 IsA
2 Entity
3 Persona
4 Id
5 5678
6 9123
7 Nombre
8 Camila
9 Padre
10 NicolasSubjectId RowId Indent PropertyId PropertyValueId
5 (5678) 1 0 1 (IsA) 3 (Persona)
5 (5678) 2 0 7 (Nombre) 8 (Camila)
5 (5678) 3 0 9 (Padre) 10 (Nicolas)
Versionado
ValueProperties{ SubjectId* SubjectVersionId* RowId* IndentLevel PropertyId PropertyValueId }
Value{ ValueId* ValueType ValueData ValueLastVersionId}
ValueVersion{ SubjectId* SubjectVersionId* SubjectTimeStamp SubjectLastRowId }
UDM Versionado!
ValueVersion{ SubjectId* SubjectVersionId* SubjectTimeStamp ValueVersionProperties { RowId* IndentLevel PropertyId PropertyValueId } }
Value{ ValueId* ValueType ValueData ValueLastVersionId}
KB Permatron: Arquitectura
Persistency Layer
Entity API
Web MonitorPrototyperDB API
Demo
Escenarios de Uso: Datos existentes
Cada fila de cada tabla puede ser una EntityValueId = <TableName><PrimaryKey>
Relaciones:• DB / UDM• UDM / DB• DB / DB
Ventajas
Información no uniforme
Todo tipo de relaciones entre datos
Versionado
Igual potencia para la Metadata
Desventajas
Almacenamiento
Performance
Reflexiones: Modelo Relacionalo Igual potencia
Confabulation Theory
Futuro
Mejora en la UI
Query
Reglas
Permatron as a Service
R-Tree