SlideShare a Scribd company logo
SQL Gene in NoSQL
How SQL Extensions are making flexible data structures Query-able
Cihan Biyikoglu
cihanb@live.com - @cihangirb
NoSQL Now – Aug 2015 – San Jose
Agenda
 Nature of Data
 Relational vs NoSQL DatabaseApproach
 Extending SQL for JSON
1. Ingest JSON and Return JSON
2. Accessing JSON Hierarchies – the dot notation
3. Bring full syntax – including JOINs and Sub-Queries
4. Handle missing values – MISSING , UNSET
5. Fold & Unfold JSON Hierarchies
6. Native Set/Collection Handling
7. Adapt Indexing to JSON
Nature of Real-World Data
 Rich structure
 Attributes, Sub-structure
 Relationships
 To other data
 Value evolution
 Data is updated
 Structure evolution
 Data is reshaped
Models for Real-World Data
Data Concern Tabular Model Document Model
Rich Structure
 Multiple flat tables
 Constant assembly / disassembly
 Documents
 No assembly required!
Relationships
 Represented
 Queried (SQL)
 Represented
 Queried with limitations
Value Evolution  Data can be updated  Data can be updated
Structure Evolution
 Uniform and rigid
 Manual change (disruptive)
 Flexible
 Dynamic change
Models for Real World Data
Data Concern Tabular Model Document Model JSON + SQL
Rich Structure
 Multiple flat tables
 Constant assembly /
disassembly
 Documents
 No assembly
required!
 Document
Relationships
 Represented
 Queried (SQL)
 Represented
 Queried with
limitations
 SQL
Value Evolution  Data can be updated  Data can be updated  Data can be updated
Structure
Evolution
 Uniform and rigid
 Manual change
(disruptive)
 Flexible
 Dynamic change
 Flexible & Dynamic
For the Best of Both, Bring SQL to NoSQL
 From JSON
 Rich structure, no assembly
 Schema flexibility
 From SQL
 General, proven, and pervasive query capabilities
 Querying across relationships
SQL + JSON
For the Best of Both, Bring SQL to NoSQL
 SQL + JSON isn’t new and many are doing it already
 Couchbase Server, SQL++ , DocumentDB,
 Apache Spark, Datastax, RelationalGuys – SQL Server, Postgress,
MySQL, Memsql And so on…
However these implementation are very different!
SQL Extensions
Requirements for the Best SQL+JSON Implementation
Bring SQL to JSON
 Requirements for Full SQL + JSON Solution
1. Ingest JSON and Return JSON
2. Accessing JSON Hierarchies – the dot notation
3. Bring full syntax – including JOINs and Sub-Queries
4. Handle missing values – MISSING , UNSET
5. Fold & Unfold JSON Hierarchies
6. Native Set/Collection Handling
#1
 Ingest JSON and Return JSON
 Tables and Rows require constant assembly and disassembly…
VS
"default": {
"Company": "Some Company",
"Organization": {
"Research": {
"Robotics": {
"AI": {
"People": [
{
"manager": true,
"name": "p2"
},
{
"manager": false,
"name": "p3"
},
{
"manager": false,
"name": "p4"
}
]
#2
 Access the JSON Hierarchies - Dot Notation
<>.Company
<>.Organization.Research
<>.Organization.Research.Robotics.AI.People[0]
#3
 Bring full syntax – including JOINs and Sub-Queries
…You don’t need JOINs & Subqueries
in Document Models…
#3
Embedded vs. Referenced
{
“Name”: “Pike Brewing”,
…
“City”:”Seattle”,
“Country”:”USA”
}
“Beers”: [
{“Name”: “Blond”,
…
},
{“Name”:”Dark”,
…
}
],
Key: Brewery_Pike_Brewing
{
“Name”: “Pike Brewing”,
“Beers”:[“Pike_Brewing_Blond”,
“Pike_Brewing_Dark”],
…
“City”:”Seattle”,
“Country”:”USA”
}
Key: Brewery_Pike_Brewing
{
“Name”:”Pike Brewing Blond”,
“Type”:”Blond Beer”
…
}
Key: Pike_Brewing_Blond
#4
 Handling MissingValues
 Schema evolves fast and SQL should accommodate
SELECT * FROM …
WHERE (trips IS MISSING AND departing_code = …)
OR (trips IS NOT MISSING AND trips[0].departing_code = …)
v1 v2
{
“flight_plan_id”:…,
“departing_code”…,
“arriving_code”:…,
…
}
{
“flight_plan_id”:…,
“trips”:[
{“departing_code”…,
“arriving_code”:…},
{“departing_code”…,
“arriving_code”:…},
]
…
}
#5
 Fold and Unfold JSON Hierarchies
{
“flight_plan_id”:…,
“trips”:[
{“departing_code”:…,
“arriving_code”:…},
{“departing_code”:…,
“arriving_code”:…},
]
…
}
#6
 Native Set/Collection Handling
 Search a Level or Sub-Hierarchy
SELECT * FROM …
WHERE ANY item IN/WITHIN Robotics
SATISFY item.name=“P3”
Research
Robotics
AI
P1 P2
Speech
Listen
P3 P4
Speak
Group 1
P5
Group 2
P6
P3
Conclusion
Models for Real World Data
Data Concern Tabular Model Document Model JSON + SQL
Rich Structure
 Multiple flat tables
 Constant assembly /
disassembly
 Documents
 No assembly
required!
 Document
Relationships
 Represented
 Queried (SQL)
 Represented
 Queried with
limitations
 SQL
Value Evolution  Data can be updated  Data can be updated  Data can be updated
Structure
Evolution
 Uniform and rigid
 Manual change
(disruptive)
 Flexible
 Dynamic change
 Flexible & Dynamic
ThankYou
@cihangirb
cihanb@live.com
Cihan Biyikoglu

More Related Content

Viewers also liked

Change management: a hiking journey
Change management: a hiking journeyChange management: a hiking journey
Change management: a hiking journey
sebastien gerard
 
Apresentação LinhaTotal
Apresentação LinhaTotalApresentação LinhaTotal
Apresentação LinhaTotal
Lia Afonso
 
Osmの使い方(相島)
Osmの使い方(相島)Osmの使い方(相島)
Osmの使い方(相島)kensuke-aijima
 
Tuning N1QL Query Performance with Couchbase Server 4.0
Tuning N1QL Query Performance with Couchbase Server 4.0Tuning N1QL Query Performance with Couchbase Server 4.0
Tuning N1QL Query Performance with Couchbase Server 4.0
Cihan Biyikoglu
 
토토속임수┣〓〓┫▶SX797.COM ◀┣〓〓┫토토속임수 월드컵 광고
토토속임수┣〓〓┫▶SX797.COM ◀┣〓〓┫토토속임수 월드컵 광고토토속임수┣〓〓┫▶SX797.COM ◀┣〓〓┫토토속임수 월드컵 광고
토토속임수┣〓〓┫▶SX797.COM ◀┣〓〓┫토토속임수 월드컵 광고
hsldkfsld
 
簡報規劃與技巧-20090817
簡報規劃與技巧-20090817簡報規劃與技巧-20090817
簡報規劃與技巧-20090817
Steven, Shih-Yung Chuang (莊士勇)
 
Phụ nữ bị hiếm muộn vì những lý do gì
Phụ nữ bị hiếm muộn vì những lý do gì Phụ nữ bị hiếm muộn vì những lý do gì
Phụ nữ bị hiếm muộn vì những lý do gì rufus585
 
Artigo - ANÁLISE COMPARATIVA DO DESEMPENHO ELÉTRICO DO CONJUNTO MOTOR GERADOR...
Artigo - ANÁLISE COMPARATIVA DO DESEMPENHO ELÉTRICO DO CONJUNTO MOTOR GERADOR...Artigo - ANÁLISE COMPARATIVA DO DESEMPENHO ELÉTRICO DO CONJUNTO MOTOR GERADOR...
Artigo - ANÁLISE COMPARATIVA DO DESEMPENHO ELÉTRICO DO CONJUNTO MOTOR GERADOR...
Thiago Huçulak
 
Nexo Ps Proyectos
Nexo Ps ProyectosNexo Ps Proyectos
Nexo Ps Proyectos
Alekandro
 
강원랜드카지노 실시간바둑
강원랜드카지노 실시간바둑강원랜드카지노 실시간바둑
강원랜드카지노 실시간바둑
hsldkfsld
 
Bao cao tmdt 2014 final
Bao cao tmdt 2014 finalBao cao tmdt 2014 final
Bao cao tmdt 2014 final
UDCNTT
 
Empathy by Design
Empathy by DesignEmpathy by Design
Juha Kilponen: Outlook for the Finnish economy 2016-2019
Juha Kilponen: Outlook for the Finnish economy 2016-2019Juha Kilponen: Outlook for the Finnish economy 2016-2019
Juha Kilponen: Outlook for the Finnish economy 2016-2019
Suomen Pankki
 
Handout: 'Future of Augmented & Virtual Reality' (BDPA Cincinnati, Oct 2015)
Handout: 'Future of Augmented & Virtual Reality' (BDPA Cincinnati, Oct 2015)Handout: 'Future of Augmented & Virtual Reality' (BDPA Cincinnati, Oct 2015)
Handout: 'Future of Augmented & Virtual Reality' (BDPA Cincinnati, Oct 2015)
BDPA Education and Technology Foundation
 
Conours master fpj[WWW.COURS-ECONOMIE.COM]
Conours master fpj[WWW.COURS-ECONOMIE.COM]Conours master fpj[WWW.COURS-ECONOMIE.COM]
Conours master fpj[WWW.COURS-ECONOMIE.COM]
jamal yasser
 
The Value of Business Intelligence in Operations
The Value of Business Intelligence in OperationsThe Value of Business Intelligence in Operations
The Value of Business Intelligence in Operations
ICFAIEDGE
 
Производительность WebGL-приложений / Дмитренко Кирилл (Яндекс)
Производительность WebGL-приложений / Дмитренко Кирилл (Яндекс)Производительность WebGL-приложений / Дмитренко Кирилл (Яндекс)
Производительность WebGL-приложений / Дмитренко Кирилл (Яндекс)
Ontico
 
Planning Adaptive Interfaces [RWD Summit 2016]
Planning Adaptive Interfaces [RWD Summit 2016]Planning Adaptive Interfaces [RWD Summit 2016]
Planning Adaptive Interfaces [RWD Summit 2016]
Aaron Gustafson
 
Strategic Culture: 3 Keys to Creating a High Performance Culture in Your Orga...
Strategic Culture: 3 Keys to Creating a High Performance Culture in Your Orga...Strategic Culture: 3 Keys to Creating a High Performance Culture in Your Orga...
Strategic Culture: 3 Keys to Creating a High Performance Culture in Your Orga...
Rob Lewis Jr., M.S.
 
Comptabilité des societes chapitre cas de l4actionnaire défaillant s4 mr. maz...
Comptabilité des societes chapitre cas de l4actionnaire défaillant s4 mr. maz...Comptabilité des societes chapitre cas de l4actionnaire défaillant s4 mr. maz...
Comptabilité des societes chapitre cas de l4actionnaire défaillant s4 mr. maz...
Jamal Yasser
 

Viewers also liked (20)

Change management: a hiking journey
Change management: a hiking journeyChange management: a hiking journey
Change management: a hiking journey
 
Apresentação LinhaTotal
Apresentação LinhaTotalApresentação LinhaTotal
Apresentação LinhaTotal
 
Osmの使い方(相島)
Osmの使い方(相島)Osmの使い方(相島)
Osmの使い方(相島)
 
Tuning N1QL Query Performance with Couchbase Server 4.0
Tuning N1QL Query Performance with Couchbase Server 4.0Tuning N1QL Query Performance with Couchbase Server 4.0
Tuning N1QL Query Performance with Couchbase Server 4.0
 
토토속임수┣〓〓┫▶SX797.COM ◀┣〓〓┫토토속임수 월드컵 광고
토토속임수┣〓〓┫▶SX797.COM ◀┣〓〓┫토토속임수 월드컵 광고토토속임수┣〓〓┫▶SX797.COM ◀┣〓〓┫토토속임수 월드컵 광고
토토속임수┣〓〓┫▶SX797.COM ◀┣〓〓┫토토속임수 월드컵 광고
 
簡報規劃與技巧-20090817
簡報規劃與技巧-20090817簡報規劃與技巧-20090817
簡報規劃與技巧-20090817
 
Phụ nữ bị hiếm muộn vì những lý do gì
Phụ nữ bị hiếm muộn vì những lý do gì Phụ nữ bị hiếm muộn vì những lý do gì
Phụ nữ bị hiếm muộn vì những lý do gì
 
Artigo - ANÁLISE COMPARATIVA DO DESEMPENHO ELÉTRICO DO CONJUNTO MOTOR GERADOR...
Artigo - ANÁLISE COMPARATIVA DO DESEMPENHO ELÉTRICO DO CONJUNTO MOTOR GERADOR...Artigo - ANÁLISE COMPARATIVA DO DESEMPENHO ELÉTRICO DO CONJUNTO MOTOR GERADOR...
Artigo - ANÁLISE COMPARATIVA DO DESEMPENHO ELÉTRICO DO CONJUNTO MOTOR GERADOR...
 
Nexo Ps Proyectos
Nexo Ps ProyectosNexo Ps Proyectos
Nexo Ps Proyectos
 
강원랜드카지노 실시간바둑
강원랜드카지노 실시간바둑강원랜드카지노 실시간바둑
강원랜드카지노 실시간바둑
 
Bao cao tmdt 2014 final
Bao cao tmdt 2014 finalBao cao tmdt 2014 final
Bao cao tmdt 2014 final
 
Empathy by Design
Empathy by DesignEmpathy by Design
Empathy by Design
 
Juha Kilponen: Outlook for the Finnish economy 2016-2019
Juha Kilponen: Outlook for the Finnish economy 2016-2019Juha Kilponen: Outlook for the Finnish economy 2016-2019
Juha Kilponen: Outlook for the Finnish economy 2016-2019
 
Handout: 'Future of Augmented & Virtual Reality' (BDPA Cincinnati, Oct 2015)
Handout: 'Future of Augmented & Virtual Reality' (BDPA Cincinnati, Oct 2015)Handout: 'Future of Augmented & Virtual Reality' (BDPA Cincinnati, Oct 2015)
Handout: 'Future of Augmented & Virtual Reality' (BDPA Cincinnati, Oct 2015)
 
Conours master fpj[WWW.COURS-ECONOMIE.COM]
Conours master fpj[WWW.COURS-ECONOMIE.COM]Conours master fpj[WWW.COURS-ECONOMIE.COM]
Conours master fpj[WWW.COURS-ECONOMIE.COM]
 
The Value of Business Intelligence in Operations
The Value of Business Intelligence in OperationsThe Value of Business Intelligence in Operations
The Value of Business Intelligence in Operations
 
Производительность WebGL-приложений / Дмитренко Кирилл (Яндекс)
Производительность WebGL-приложений / Дмитренко Кирилл (Яндекс)Производительность WebGL-приложений / Дмитренко Кирилл (Яндекс)
Производительность WebGL-приложений / Дмитренко Кирилл (Яндекс)
 
Planning Adaptive Interfaces [RWD Summit 2016]
Planning Adaptive Interfaces [RWD Summit 2016]Planning Adaptive Interfaces [RWD Summit 2016]
Planning Adaptive Interfaces [RWD Summit 2016]
 
Strategic Culture: 3 Keys to Creating a High Performance Culture in Your Orga...
Strategic Culture: 3 Keys to Creating a High Performance Culture in Your Orga...Strategic Culture: 3 Keys to Creating a High Performance Culture in Your Orga...
Strategic Culture: 3 Keys to Creating a High Performance Culture in Your Orga...
 
Comptabilité des societes chapitre cas de l4actionnaire défaillant s4 mr. maz...
Comptabilité des societes chapitre cas de l4actionnaire défaillant s4 mr. maz...Comptabilité des societes chapitre cas de l4actionnaire défaillant s4 mr. maz...
Comptabilité des societes chapitre cas de l4actionnaire défaillant s4 mr. maz...
 

Similar to SQL gene in NoSQL

Native JSON Support in SQL2016
Native JSON Support in SQL2016Native JSON Support in SQL2016
Native JSON Support in SQL2016
Ivo Andreev
 
Big data technology unit 3
Big data technology unit 3Big data technology unit 3
Big data technology unit 3
RojaT4
 
To SQL or NoSQL, that is the question
To SQL or NoSQL, that is the questionTo SQL or NoSQL, that is the question
To SQL or NoSQL, that is the question
Krishnakumar S
 
Postgres vs Mongo / Олег Бартунов (Postgres Professional)
Postgres vs Mongo / Олег Бартунов (Postgres Professional)Postgres vs Mongo / Олег Бартунов (Postgres Professional)
Postgres vs Mongo / Олег Бартунов (Postgres Professional)
Ontico
 
Hyperion Essbase Course Curriculum
Hyperion Essbase Course Curriculum Hyperion Essbase Course Curriculum
Hyperion Essbase Course Curriculum
Faculties Online
 
MySQL Document Store for Modern Applications
MySQL Document Store for Modern ApplicationsMySQL Document Store for Modern Applications
MySQL Document Store for Modern Applications
Olivier DASINI
 
Azure SQL & SQL Server 2016 JSON
Azure SQL & SQL Server 2016 JSONAzure SQL & SQL Server 2016 JSON
Azure SQL & SQL Server 2016 JSON
Davide Mauri
 
SQL VS NoSQL
SQL VS NoSQLSQL VS NoSQL
SQL VS NoSQL
simonedaniels3
 
NoSQL Databases
NoSQL DatabasesNoSQL Databases
NoSQL Databases
zahid-mian
 
LSC - Synchronizing identities @ Loadays 2010
LSC - Synchronizing identities @ Loadays 2010LSC - Synchronizing identities @ Loadays 2010
LSC - Synchronizing identities @ Loadays 2010
Jonathan Clarke
 
NoSQL and SQL Databases
NoSQL and SQL DatabasesNoSQL and SQL Databases
NoSQL and SQL Databases
Gaurav Paliwal
 
Simon Elliston Ball – When to NoSQL and When to Know SQL - NoSQL matters Barc...
Simon Elliston Ball – When to NoSQL and When to Know SQL - NoSQL matters Barc...Simon Elliston Ball – When to NoSQL and When to Know SQL - NoSQL matters Barc...
Simon Elliston Ball – When to NoSQL and When to Know SQL - NoSQL matters Barc...
NoSQLmatters
 
LSC - Synchronizing identities @ Loadays 2010
 LSC - Synchronizing identities @ Loadays 2010 LSC - Synchronizing identities @ Loadays 2010
LSC - Synchronizing identities @ Loadays 2010
RUDDER
 
Easy JSON Data Manipulation in Spark
Easy JSON Data Manipulation in SparkEasy JSON Data Manipulation in Spark
Easy JSON Data Manipulation in Spark
Yin Huai
 
Kultam MM UI - MySQL for Data Analytics and Business Intelligence.pdf
Kultam MM UI - MySQL for Data Analytics and Business Intelligence.pdfKultam MM UI - MySQL for Data Analytics and Business Intelligence.pdf
Kultam MM UI - MySQL for Data Analytics and Business Intelligence.pdf
ShaNatasha1
 
#Microsoft #BusinessIntelligence - #MSBI Online Training (#LIVE, Instructor-L...
#Microsoft #BusinessIntelligence - #MSBI Online Training (#LIVE, Instructor-L...#Microsoft #BusinessIntelligence - #MSBI Online Training (#LIVE, Instructor-L...
#Microsoft #BusinessIntelligence - #MSBI Online Training (#LIVE, Instructor-L...
SequelGate
 
Introducción a NoSQL
Introducción a NoSQLIntroducción a NoSQL
Introducción a NoSQL
MongoDB
 
Polyglot Database - Linuxcon North America 2016
Polyglot Database - Linuxcon North America 2016Polyglot Database - Linuxcon North America 2016
Polyglot Database - Linuxcon North America 2016
Dave Stokes
 
Mongo Bb - NoSQL tutorial
Mongo Bb - NoSQL tutorialMongo Bb - NoSQL tutorial
Mongo Bb - NoSQL tutorial
Mohan Rathour
 
Demystifying JSON in SQL Server
Demystifying JSON in SQL ServerDemystifying JSON in SQL Server
Demystifying JSON in SQL Server
kristinferrier
 

Similar to SQL gene in NoSQL (20)

Native JSON Support in SQL2016
Native JSON Support in SQL2016Native JSON Support in SQL2016
Native JSON Support in SQL2016
 
Big data technology unit 3
Big data technology unit 3Big data technology unit 3
Big data technology unit 3
 
To SQL or NoSQL, that is the question
To SQL or NoSQL, that is the questionTo SQL or NoSQL, that is the question
To SQL or NoSQL, that is the question
 
Postgres vs Mongo / Олег Бартунов (Postgres Professional)
Postgres vs Mongo / Олег Бартунов (Postgres Professional)Postgres vs Mongo / Олег Бартунов (Postgres Professional)
Postgres vs Mongo / Олег Бартунов (Postgres Professional)
 
Hyperion Essbase Course Curriculum
Hyperion Essbase Course Curriculum Hyperion Essbase Course Curriculum
Hyperion Essbase Course Curriculum
 
MySQL Document Store for Modern Applications
MySQL Document Store for Modern ApplicationsMySQL Document Store for Modern Applications
MySQL Document Store for Modern Applications
 
Azure SQL & SQL Server 2016 JSON
Azure SQL & SQL Server 2016 JSONAzure SQL & SQL Server 2016 JSON
Azure SQL & SQL Server 2016 JSON
 
SQL VS NoSQL
SQL VS NoSQLSQL VS NoSQL
SQL VS NoSQL
 
NoSQL Databases
NoSQL DatabasesNoSQL Databases
NoSQL Databases
 
LSC - Synchronizing identities @ Loadays 2010
LSC - Synchronizing identities @ Loadays 2010LSC - Synchronizing identities @ Loadays 2010
LSC - Synchronizing identities @ Loadays 2010
 
NoSQL and SQL Databases
NoSQL and SQL DatabasesNoSQL and SQL Databases
NoSQL and SQL Databases
 
Simon Elliston Ball – When to NoSQL and When to Know SQL - NoSQL matters Barc...
Simon Elliston Ball – When to NoSQL and When to Know SQL - NoSQL matters Barc...Simon Elliston Ball – When to NoSQL and When to Know SQL - NoSQL matters Barc...
Simon Elliston Ball – When to NoSQL and When to Know SQL - NoSQL matters Barc...
 
LSC - Synchronizing identities @ Loadays 2010
 LSC - Synchronizing identities @ Loadays 2010 LSC - Synchronizing identities @ Loadays 2010
LSC - Synchronizing identities @ Loadays 2010
 
Easy JSON Data Manipulation in Spark
Easy JSON Data Manipulation in SparkEasy JSON Data Manipulation in Spark
Easy JSON Data Manipulation in Spark
 
Kultam MM UI - MySQL for Data Analytics and Business Intelligence.pdf
Kultam MM UI - MySQL for Data Analytics and Business Intelligence.pdfKultam MM UI - MySQL for Data Analytics and Business Intelligence.pdf
Kultam MM UI - MySQL for Data Analytics and Business Intelligence.pdf
 
#Microsoft #BusinessIntelligence - #MSBI Online Training (#LIVE, Instructor-L...
#Microsoft #BusinessIntelligence - #MSBI Online Training (#LIVE, Instructor-L...#Microsoft #BusinessIntelligence - #MSBI Online Training (#LIVE, Instructor-L...
#Microsoft #BusinessIntelligence - #MSBI Online Training (#LIVE, Instructor-L...
 
Introducción a NoSQL
Introducción a NoSQLIntroducción a NoSQL
Introducción a NoSQL
 
Polyglot Database - Linuxcon North America 2016
Polyglot Database - Linuxcon North America 2016Polyglot Database - Linuxcon North America 2016
Polyglot Database - Linuxcon North America 2016
 
Mongo Bb - NoSQL tutorial
Mongo Bb - NoSQL tutorialMongo Bb - NoSQL tutorial
Mongo Bb - NoSQL tutorial
 
Demystifying JSON in SQL Server
Demystifying JSON in SQL ServerDemystifying JSON in SQL Server
Demystifying JSON in SQL Server
 

More from Cihan Biyikoglu

Securing Redis
Securing RedisSecuring Redis
Securing Redis
Cihan Biyikoglu
 
Real-time Analytics with Redis
Real-time Analytics with RedisReal-time Analytics with Redis
Real-time Analytics with Redis
Cihan Biyikoglu
 
Developing Active-Active Geo-Distributed Apps with Redis
Developing Active-Active Geo-Distributed Apps with RedisDeveloping Active-Active Geo-Distributed Apps with Redis
Developing Active-Active Geo-Distributed Apps with Redis
Cihan Biyikoglu
 
Cross Data Center Replication with Redis using Redis Enterprise
Cross Data Center Replication with Redis using Redis EnterpriseCross Data Center Replication with Redis using Redis Enterprise
Cross Data Center Replication with Redis using Redis Enterprise
Cihan Biyikoglu
 
Under the Hood - Couchbase Server Architecture - June 2015
Under the Hood - Couchbase Server Architecture - June 2015Under the Hood - Couchbase Server Architecture - June 2015
Under the Hood - Couchbase Server Architecture - June 2015
Cihan Biyikoglu
 
Global Secondary Indexes in Couchbase Server 4.0 - JUNE 2015
Global Secondary Indexes in Couchbase Server 4.0 - JUNE 2015Global Secondary Indexes in Couchbase Server 4.0 - JUNE 2015
Global Secondary Indexes in Couchbase Server 4.0 - JUNE 2015
Cihan Biyikoglu
 
Document Data Modelling with Couchbase Server 4.0
Document Data Modelling with Couchbase Server 4.0Document Data Modelling with Couchbase Server 4.0
Document Data Modelling with Couchbase Server 4.0
Cihan Biyikoglu
 
Deploying couchbaseserverazure cihanbiyikoglu_microsoft
Deploying couchbaseserverazure cihanbiyikoglu_microsoftDeploying couchbaseserverazure cihanbiyikoglu_microsoft
Deploying couchbaseserverazure cihanbiyikoglu_microsoft
Cihan Biyikoglu
 
Inside Sql Azure - Cihan Biyikoglu - SQL Azure
Inside Sql Azure - Cihan Biyikoglu - SQL AzureInside Sql Azure - Cihan Biyikoglu - SQL Azure
Inside Sql Azure - Cihan Biyikoglu - SQL Azure
Cihan Biyikoglu
 

More from Cihan Biyikoglu (9)

Securing Redis
Securing RedisSecuring Redis
Securing Redis
 
Real-time Analytics with Redis
Real-time Analytics with RedisReal-time Analytics with Redis
Real-time Analytics with Redis
 
Developing Active-Active Geo-Distributed Apps with Redis
Developing Active-Active Geo-Distributed Apps with RedisDeveloping Active-Active Geo-Distributed Apps with Redis
Developing Active-Active Geo-Distributed Apps with Redis
 
Cross Data Center Replication with Redis using Redis Enterprise
Cross Data Center Replication with Redis using Redis EnterpriseCross Data Center Replication with Redis using Redis Enterprise
Cross Data Center Replication with Redis using Redis Enterprise
 
Under the Hood - Couchbase Server Architecture - June 2015
Under the Hood - Couchbase Server Architecture - June 2015Under the Hood - Couchbase Server Architecture - June 2015
Under the Hood - Couchbase Server Architecture - June 2015
 
Global Secondary Indexes in Couchbase Server 4.0 - JUNE 2015
Global Secondary Indexes in Couchbase Server 4.0 - JUNE 2015Global Secondary Indexes in Couchbase Server 4.0 - JUNE 2015
Global Secondary Indexes in Couchbase Server 4.0 - JUNE 2015
 
Document Data Modelling with Couchbase Server 4.0
Document Data Modelling with Couchbase Server 4.0Document Data Modelling with Couchbase Server 4.0
Document Data Modelling with Couchbase Server 4.0
 
Deploying couchbaseserverazure cihanbiyikoglu_microsoft
Deploying couchbaseserverazure cihanbiyikoglu_microsoftDeploying couchbaseserverazure cihanbiyikoglu_microsoft
Deploying couchbaseserverazure cihanbiyikoglu_microsoft
 
Inside Sql Azure - Cihan Biyikoglu - SQL Azure
Inside Sql Azure - Cihan Biyikoglu - SQL AzureInside Sql Azure - Cihan Biyikoglu - SQL Azure
Inside Sql Azure - Cihan Biyikoglu - SQL Azure
 

Recently uploaded

在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
obonagu
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
camseq
 
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTSHeap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Soumen Santra
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation & Control
 
Building Electrical System Design & Installation
Building Electrical System Design & InstallationBuilding Electrical System Design & Installation
Building Electrical System Design & Installation
symbo111
 
Water billing management system project report.pdf
Water billing management system project report.pdfWater billing management system project report.pdf
Water billing management system project report.pdf
Kamal Acharya
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
Kamal Acharya
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 
Unbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptxUnbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptx
ChristineTorrepenida1
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
SUTEJAS
 
Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
Dr Ramhari Poudyal
 
Forklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella PartsForklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella Parts
Intella Parts
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
Kamal Acharya
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
Kerry Sado
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
zwunae
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
Aditya Rajan Patra
 

Recently uploaded (20)

在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
 
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTSHeap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
 
Building Electrical System Design & Installation
Building Electrical System Design & InstallationBuilding Electrical System Design & Installation
Building Electrical System Design & Installation
 
Water billing management system project report.pdf
Water billing management system project report.pdfWater billing management system project report.pdf
Water billing management system project report.pdf
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 
Unbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptxUnbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptx
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
 
Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
 
Forklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella PartsForklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella Parts
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
 

SQL gene in NoSQL

  • 1. SQL Gene in NoSQL How SQL Extensions are making flexible data structures Query-able Cihan Biyikoglu cihanb@live.com - @cihangirb NoSQL Now – Aug 2015 – San Jose
  • 2. Agenda  Nature of Data  Relational vs NoSQL DatabaseApproach  Extending SQL for JSON 1. Ingest JSON and Return JSON 2. Accessing JSON Hierarchies – the dot notation 3. Bring full syntax – including JOINs and Sub-Queries 4. Handle missing values – MISSING , UNSET 5. Fold & Unfold JSON Hierarchies 6. Native Set/Collection Handling 7. Adapt Indexing to JSON
  • 3. Nature of Real-World Data  Rich structure  Attributes, Sub-structure  Relationships  To other data  Value evolution  Data is updated  Structure evolution  Data is reshaped
  • 4. Models for Real-World Data Data Concern Tabular Model Document Model Rich Structure  Multiple flat tables  Constant assembly / disassembly  Documents  No assembly required! Relationships  Represented  Queried (SQL)  Represented  Queried with limitations Value Evolution  Data can be updated  Data can be updated Structure Evolution  Uniform and rigid  Manual change (disruptive)  Flexible  Dynamic change
  • 5. Models for Real World Data Data Concern Tabular Model Document Model JSON + SQL Rich Structure  Multiple flat tables  Constant assembly / disassembly  Documents  No assembly required!  Document Relationships  Represented  Queried (SQL)  Represented  Queried with limitations  SQL Value Evolution  Data can be updated  Data can be updated  Data can be updated Structure Evolution  Uniform and rigid  Manual change (disruptive)  Flexible  Dynamic change  Flexible & Dynamic
  • 6. For the Best of Both, Bring SQL to NoSQL  From JSON  Rich structure, no assembly  Schema flexibility  From SQL  General, proven, and pervasive query capabilities  Querying across relationships SQL + JSON
  • 7. For the Best of Both, Bring SQL to NoSQL  SQL + JSON isn’t new and many are doing it already  Couchbase Server, SQL++ , DocumentDB,  Apache Spark, Datastax, RelationalGuys – SQL Server, Postgress, MySQL, Memsql And so on… However these implementation are very different!
  • 8. SQL Extensions Requirements for the Best SQL+JSON Implementation
  • 9. Bring SQL to JSON  Requirements for Full SQL + JSON Solution 1. Ingest JSON and Return JSON 2. Accessing JSON Hierarchies – the dot notation 3. Bring full syntax – including JOINs and Sub-Queries 4. Handle missing values – MISSING , UNSET 5. Fold & Unfold JSON Hierarchies 6. Native Set/Collection Handling
  • 10. #1  Ingest JSON and Return JSON  Tables and Rows require constant assembly and disassembly… VS
  • 11.
  • 12. "default": { "Company": "Some Company", "Organization": { "Research": { "Robotics": { "AI": { "People": [ { "manager": true, "name": "p2" }, { "manager": false, "name": "p3" }, { "manager": false, "name": "p4" } ] #2  Access the JSON Hierarchies - Dot Notation <>.Company <>.Organization.Research <>.Organization.Research.Robotics.AI.People[0]
  • 13. #3  Bring full syntax – including JOINs and Sub-Queries …You don’t need JOINs & Subqueries in Document Models…
  • 14. #3 Embedded vs. Referenced { “Name”: “Pike Brewing”, … “City”:”Seattle”, “Country”:”USA” } “Beers”: [ {“Name”: “Blond”, … }, {“Name”:”Dark”, … } ], Key: Brewery_Pike_Brewing { “Name”: “Pike Brewing”, “Beers”:[“Pike_Brewing_Blond”, “Pike_Brewing_Dark”], … “City”:”Seattle”, “Country”:”USA” } Key: Brewery_Pike_Brewing { “Name”:”Pike Brewing Blond”, “Type”:”Blond Beer” … } Key: Pike_Brewing_Blond
  • 15. #4  Handling MissingValues  Schema evolves fast and SQL should accommodate SELECT * FROM … WHERE (trips IS MISSING AND departing_code = …) OR (trips IS NOT MISSING AND trips[0].departing_code = …) v1 v2 { “flight_plan_id”:…, “departing_code”…, “arriving_code”:…, … } { “flight_plan_id”:…, “trips”:[ {“departing_code”…, “arriving_code”:…}, {“departing_code”…, “arriving_code”:…}, ] … }
  • 16. #5  Fold and Unfold JSON Hierarchies { “flight_plan_id”:…, “trips”:[ {“departing_code”:…, “arriving_code”:…}, {“departing_code”:…, “arriving_code”:…}, ] … }
  • 17.
  • 18. #6  Native Set/Collection Handling  Search a Level or Sub-Hierarchy SELECT * FROM … WHERE ANY item IN/WITHIN Robotics SATISFY item.name=“P3” Research Robotics AI P1 P2 Speech Listen P3 P4 Speak Group 1 P5 Group 2 P6 P3
  • 19.
  • 21. Models for Real World Data Data Concern Tabular Model Document Model JSON + SQL Rich Structure  Multiple flat tables  Constant assembly / disassembly  Documents  No assembly required!  Document Relationships  Represented  Queried (SQL)  Represented  Queried with limitations  SQL Value Evolution  Data can be updated  Data can be updated  Data can be updated Structure Evolution  Uniform and rigid  Manual change (disruptive)  Flexible  Dynamic change  Flexible & Dynamic

Editor's Notes

  1. Select * from default use keys ["2”]; { "flight_plan_id": "2", "trips": [ { "departing_code": "A", "arriving_code": "B" }, { "departing_code": "C", "arriving_code": "D" } ] } select default.flight_plan_id, b from default use keys ["2"] unnest default.trips b; select default.flight_plan_id, b.* from default use keys ["2"] unnest default.trips b;
  2. Select * from default use keys ["2”]; { "flight_plan_id": "2", "trips": [ { "departing_code": "A", "arriving_code": "B" }, { "departing_code": "C", "arriving_code": "D" } ] } select default.flight_plan_id, b from default use keys ["2"] unnest default.trips b; select default.flight_plan_id, b.* from default use keys ["2"] unnest default.trips b;
  3. "results": [ { "default": { "a": { "id": 1, "name": "Cihan" } }, "id": "00" }, { "default": { "Company": "Some Company", "Organization": { "Research": { "Robotics": { "AI": { "People": [ { "manager": true, "name": "p2" }, { "manager": false, "name": "p3" }, { "manager": false, "name": "p4" } ] }, "People": [ { "manager": true, "name": "p1" } ], "Speech": { "Listen": { "Group_1": { "People": [ { "manager": true, "name": "p6" } ] }, "Group_2": { "People": [ { "manager": true, "name": "p7" }, { "manager": false, "name": "p8" }, { "manager": false, "name": "p9" } ] } }, "People": [ { "manager": true, "name": "p5" } ], "Speak": { "People": [ { "manager": true, "name": "p10" }, { "manager": false, "name": "p11" }, { "manager": false, "name": "p12" } ] } } } } } }, "id": "1" }, { "default": { "flight_plan_id": "2", "trips": [ { "arriving_code": "B", "departing_code": "A" }, { "arriving_code": "D", "departing_code": "C" } ] }, "id": "2" }