O slideshow foi denunciado.
Utilizamos seu perfil e dados de atividades no LinkedIn para personalizar e exibir anúncios mais relevantes. Altere suas preferências de anúncios quando desejar.

Couchbase Live Europe 2015: Introducing N1QL – SQL for Documents

461 visualizações

Publicada em

A N1QL ("nickel") for Every Query: Extending SQL to a Document Database: This session will provide an overview, update, and demo of N1QL, the upcoming query language from Couchbase. In addition to introducing N1QL and the current developer preview available at query.couchbase.com, we will discuss and show exciting new features as N1QL advances towards beta and production release.

Publicada em: Software
  • Seja o primeiro a comentar

  • Seja a primeira pessoa a gostar disto

Couchbase Live Europe 2015: Introducing N1QL – SQL for Documents

  1. 1. Introducing N1QL — SQL for Documents Gerald Sangudi | Couchbase @sangudi
  2. 2. ©2015 Couchbase Inc. 2 Agenda  N1QL sessions today  What is N1QL  Language highlights  Architecture  Ecosystem  Next steps  Q & A
  3. 3. ©2015 Couchbase Inc. 3 N1QL SessionsToday  Introduction  Hands on workshops (“Querying Big Data”)  Performance and scaling tips  Client-side development
  4. 4. What is N1QL?
  5. 5. ©2015 Couchbase Inc. 5 What is N1QL?  N1QL is a new query language that systematically extends SQL to document-oriented data  N1QL extends SQL to handle data that is:  Nested:Contains nested objects, arrays  Heterogeneous: Schema-optional, non-uniform  Distributed: Partitioned across a cluster
  6. 6. ©2015 Couchbase Inc. 6 What is N1QL? 6 Document Model: Richness and Flexibility SQL: Expressiveness and Soundness  N1QL is SQL for Documents
  7. 7. Language Highlights
  8. 8. ©2015 Couchbase Inc. 8 SELECT  Standard SELECT pipeline  SELECT, FROM,WHERE, GROUP BY, ORDER BY, LIMIT, OFFSET  JOINs (by keys)  Subqueries  Aggregation  Set operators  UNION, INTERSECT, EXCEPT  EXPLAIN
  9. 9. ©2015 Couchbase Inc. 9 Indexing  CREATE / DROP INDEX  Two types of indexes  View indexes  GSI indexes (new secondary indexes)
  10. 10. ©2015 Couchbase Inc. 10 Data writes*  UPDATE  UPDATE …WHERE …  DELETE  DELETE …WHERE …  INSERT  INSERT …VALUES …  INSERT … SELECT …  MERGE *Experimental in CB 4.0. *Single-document atomicity.
  11. 11. ©2015 Couchbase Inc. 11 Document-oriented Extensions  Nested  Paths—user.profile.email, children[0], children[0:2]  NEST, UNNEST  Ranging—FOR EVERY child IN children  Transformations—SELECT {“name”: first_name || last_name}  Non-uniform  IS MISSING  Type checking and conversion  Distributed  Direct lookup—USE KEYS  Efficient joins—ON KEYS
  12. 12. Architecture
  13. 13. ©2015 Couchbase Inc. 13 Topology Client SDK App Index CB Node ODBC / JDBC App Query Manager Data Index CB Node Query Manager Data Index CB Node Query Manager Data Index CB Node Query Manager Data Index CB Node Query Manager Data Index CB Node Query Manager Data Connectivity, ecosystem, & rich apps Node services & modular scaling Query throughput scales with nodes ODBC / JDBC BI Tool
  14. 14. ©2015 Couchbase Inc. 14 Inside a Cluster Index Services Clients Data Services (1) Request (6) Response Query Services (2) Plan: Query to execution plan (5) Evaluate: Documents to results (3) Scan: Attributes to keys (4) Fetch: Keys to documents
  15. 15. ©2015 Couchbase Inc. 15 Inside a Query Node Index Services Client Data Services FetchScanParse Plan Join Filter Pre-Aggregate Offset Limit Project Data-parallel — Query latency scales with cores Memory-bound Pluggable architecture — datastore, indexer, client, … Request Response SortAggregate
  16. 16. ©2015 Couchbase Inc. 16 Data Service Projector & Router Secondary Indexing Index Scan Query ServiceIndex Service Supervisor Index maintenance & Scan coordinator Index#2Index#1 Query Engine Bucket#1 Bucket#2 DCP Stream Index#4Index#3 ... B u c k e t # 2 B u c k e t # 1
  17. 17. Ecosystem
  18. 18. ©2015 Couchbase Inc. 18 Ecosystem xDBC App CB Node xDBC ETL xDBC BI xDBC Visualization CB Node CB Node Standards-based drivers Integrations, partnerships
  19. 19. Next steps
  20. 20. ©2015 Couchbase Inc. 20 Roadmap DP1 DP2 DP3 DP4 CB4.0 DP CB4.0 Beta CB4.0 GA 9/2013 2014 Q1 CB Live London 2015
  21. 21. ©2015 Couchbase Inc. 21 Resources ©2014 Couchbase, Inc. 21  query.couchbase.com  Downloads  Tutorial  Forums  Resources  @N1QL, @couchbase  Stack Overflow
  22. 22. Q & A
  23. 23. Thank you. Gerald Sangudi | Couchbase @sangudi
  24. 24. ©2015 Couchbase Inc. 24

×