SlideShare a Scribd company logo
Querying MongoDB without
   programming using
       FUNQL
FUNQL?
  Federated
    Unified
Query Language
What does this mean?

    Federated - Integrates different independent
    stand alone data sources into one coherent
    view

    Unified – One query for different database
    technologies: Relational, Document Oriented,
    Object Oriented, Key/Value (yes its possible!)

    Query Language – Domain: Filtering, data
    transformation, aggregation. Can be executed
    interatively. No programming knowledge
    required.
When to Use

    Ad-Hoc queries

    When Map/Reduce is overkill

    When you don't want to get lost in $}':“{ syntax

    Data integration

    Business Intelligence

    Pre aggregation
Benefits for Mongo

    Easier use of MongoDB and quicker completion of
    projects.

    Standardizes the heterogeneous NoSQL Market.

    Protects customer investments by making MongoDB part
    of a larger market.

    Enlarges the pool of skilled users.

    Learning environment for non-technical users and SQL
    users.

    Co-existence with relational databases and migration
    made easy.
Benefits for developers

    Skill applicable to different database systems.

    Faster development.

    Easy testing and data cleaning.

    Larger market for developer skills.

    Protects your investment in learning NoSQL.

    Fast prototyping.
Benefits for developers

    Skill applicable to different database systems.

    Faster development.

    Easy testing and data cleaning.

    Larger market for developer skills.

    Protects your investment in learning NoSQL.

    Fast prototyping.
Example
from collection
where object.subobject.field = $parameter
select field, { nested, fields, … }
group by field, aggregates, sub_groups
where condition // on aggregate //= having
into … // File (json/xml) or other database/collection
From - Where - Select
         why it makes a big difference to
          SQL's select - from - where

    Seemingly unimportant syntactical sugar

    But it completely changes the execution model of a
    query.

    Simplifies it from declarative to data-flow

    Each statement is a pipeline, reading data from the
    previous statement and passing (modified) data to the
    next.

    Can easily be executed in parallel.

    Not invented here: Pioneered by Microsoft with Linq
Dealing with relational data

    The join operation fits into the same model.
from table1
join table2 on table1.id = table2.foreign_id

    Is now just an pipeline stage, that adds the data from
    table2 into the dataflow.

    Tables can come from different systems. E.g one is
    from MongoDB, the other from DB2

    Join grouped operator – returns a 1-n relationship a a
    collection of nested documents.
Nested/Recursive Data Structures

    flatten operator transforms a (fixed) nested
    structure into one linear table.

    enumerate linearizes (walks through) an
    arbitrarily deeply nested tree.

    group turns a linear structure into a nested
    structure.

    Funql understands database references. You
    can use dot-notation for navigation.
Aggregation

    The model allows much more advanced
    aggregation operations than SQL

    Multi dimensional grouping

    Mixing of normal select and aggregation

    Analytics directly in the query

    Can leverage MongoDBs new aggregation
    operators
Funql and the Aggregation
                 Framework

    Both use the same pipeline model

    select statement == mongos project

    flatten stetement ~~ mongo's unwind

    range == first, last

    Simple mapping, so Funql can operate at
    Mongo's native speed.
db.zips.aggregate({$group:{_id: '$city', pop: {$sum: '$pop'}}}, {$sort: {pop: -1}}})

from zips
   group by city, sum pop as pop
   sort by pop descending
Status

    Formal language spec at
    reportsanywhere.com/pebble

    Twitter: @reportsanywhere

    funql.org is coming up

    Reference implementation in Java currently for
       MongoDB
       Generic Json data
       Cassandra (coming)
       Relational Databases (coming)

    Fork it on Bitbucket (coming up)
Architecture

    Core Engine

    Can filter, select, join, sort, group, aggregate

    Extremely simple driver API: 5 Methods.
    open/close, iterate, lookup, range

    Not necessarily optimized

    Advanced driver API: Examines the syntax tree
    and invokes native operations.

More Related Content

What's hot (20)

PDF
guacamole: an Object Document Mapper for ArangoDB
Max Neunhöffer
 
PPT
Connecting to a REST API in iOS
gillygize
 
PPTX
Object Relational Database Management System(ORDBMS)
Rabin BK
 
PDF
Introduction to ArangoDB (nosql matters Barcelona 2012)
ArangoDB Database
 
PPTX
Using Webservice in iOS
Mahboob Nur
 
PDF
MongoDB - An Introduction
sethfloydjr
 
PDF
FOXX - a Javascript application framework on top of ArangoDB
ArangoDB Database
 
PDF
An introduction to MongoDB
César Trigo
 
PDF
EKAW - Linked Data Publishing
Ruben Taelman
 
PDF
iOS: Web Services and XML parsing
Jussi Pohjolainen
 
PDF
Papers We Love Kyiv, July 2018: A Conflict-Free Replicated JSON Datatype
Max Klymyshyn
 
PDF
An introduction to U1db
David Planella
 
PPTX
Working with xml data
aspnet123
 
PPT
MongoDb - Details on the POC
Amardeep Vishwakarma
 
PPTX
MongoDB Introduction and Data Modelling
Sachin Bhosale
 
PPTX
NoSql evaluation
Karthik Mohan
 
PPTX
Klevis Mino: MongoDB
Carlo Vaccari
 
PPT
Hatkit Project - Datafiddler
holiman
 
PDF
Graph Analytics with ArangoDB
ArangoDB Database
 
guacamole: an Object Document Mapper for ArangoDB
Max Neunhöffer
 
Connecting to a REST API in iOS
gillygize
 
Object Relational Database Management System(ORDBMS)
Rabin BK
 
Introduction to ArangoDB (nosql matters Barcelona 2012)
ArangoDB Database
 
Using Webservice in iOS
Mahboob Nur
 
MongoDB - An Introduction
sethfloydjr
 
FOXX - a Javascript application framework on top of ArangoDB
ArangoDB Database
 
An introduction to MongoDB
César Trigo
 
EKAW - Linked Data Publishing
Ruben Taelman
 
iOS: Web Services and XML parsing
Jussi Pohjolainen
 
Papers We Love Kyiv, July 2018: A Conflict-Free Replicated JSON Datatype
Max Klymyshyn
 
An introduction to U1db
David Planella
 
Working with xml data
aspnet123
 
MongoDb - Details on the POC
Amardeep Vishwakarma
 
MongoDB Introduction and Data Modelling
Sachin Bhosale
 
NoSql evaluation
Karthik Mohan
 
Klevis Mino: MongoDB
Carlo Vaccari
 
Hatkit Project - Datafiddler
holiman
 
Graph Analytics with ArangoDB
ArangoDB Database
 

Similar to Querying Mongo Without Programming Using Funql (20)

PDF
Which Questions We Should Have
Oracle Korea
 
PDF
MongoDB Atlas Workshop - Singapore
Ashnikbiz
 
PDF
Buildingsocialanalyticstoolwithmongodb
MongoDB APAC
 
PPTX
introtomongodb
saikiran
 
PDF
Using MongoDB and Python
Mike Bright
 
PDF
2016 feb-23 pyugre-py_mongo
Michael Bright
 
PDF
Full metal mongo
Israel Gutiérrez
 
PPTX
Introduction to MongoDB at IGDTUW
Ankur Raina
 
PDF
Confluent & MongoDB APAC Lunch & Learn
confluent
 
PDF
MongoDB FabLab León
Juan Antonio Roy Couto
 
PPTX
MongoDB Evenings Minneapolis: MongoDB is Cool But When Should I Use It?
MongoDB
 
ODP
MongoDB Distilled
b0ris_1
 
KEY
NOSQL101, Or: How I Learned To Stop Worrying And Love The Mongo!
Daniel Cousineau
 
PDF
MongoDB Meetup
Maxime Beugnet
 
PPTX
Querying mongo db
Bogdan Sabău
 
PPTX
MongoDB_ppt.pptx
1AP18CS037ShirishKul
 
PDF
MongoDB 4.0 새로운 기능 소개
Ha-Yang(White) Moon
 
PDF
Simplifying & accelerating application development with MongoDB's intelligent...
Maxime Beugnet
 
PDF
Aggregation Framework MongoDB Days Munich
Norberto Leite
 
PDF
From SQL to MongoDB
Nuxeo
 
Which Questions We Should Have
Oracle Korea
 
MongoDB Atlas Workshop - Singapore
Ashnikbiz
 
Buildingsocialanalyticstoolwithmongodb
MongoDB APAC
 
introtomongodb
saikiran
 
Using MongoDB and Python
Mike Bright
 
2016 feb-23 pyugre-py_mongo
Michael Bright
 
Full metal mongo
Israel Gutiérrez
 
Introduction to MongoDB at IGDTUW
Ankur Raina
 
Confluent & MongoDB APAC Lunch & Learn
confluent
 
MongoDB FabLab León
Juan Antonio Roy Couto
 
MongoDB Evenings Minneapolis: MongoDB is Cool But When Should I Use It?
MongoDB
 
MongoDB Distilled
b0ris_1
 
NOSQL101, Or: How I Learned To Stop Worrying And Love The Mongo!
Daniel Cousineau
 
MongoDB Meetup
Maxime Beugnet
 
Querying mongo db
Bogdan Sabău
 
MongoDB_ppt.pptx
1AP18CS037ShirishKul
 
MongoDB 4.0 새로운 기능 소개
Ha-Yang(White) Moon
 
Simplifying & accelerating application development with MongoDB's intelligent...
Maxime Beugnet
 
Aggregation Framework MongoDB Days Munich
Norberto Leite
 
From SQL to MongoDB
Nuxeo
 
Ad

More from MongoDB (20)

PDF
MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB
 
PDF
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
MongoDB
 
PDF
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB
 
PDF
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
MongoDB
 
PDF
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
MongoDB
 
PDF
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
MongoDB
 
PDF
MongoDB SoCal 2020: MongoDB Atlas Jump Start
MongoDB
 
PDF
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
MongoDB
 
PDF
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
MongoDB
 
PDF
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
MongoDB
 
PDF
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
MongoDB
 
PDF
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
MongoDB
 
PDF
MongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
MongoDB
 
PDF
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
MongoDB
 
PDF
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
MongoDB
 
PDF
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
MongoDB
 
PDF
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
MongoDB
 
PDF
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
MongoDB
 
PDF
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
MongoDB
 
PDF
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
MongoDB
 
MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB
 
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
MongoDB
 
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB
 
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
MongoDB
 
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
MongoDB
 
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
MongoDB
 
MongoDB SoCal 2020: MongoDB Atlas Jump Start
MongoDB
 
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
MongoDB
 
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
MongoDB
 
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
MongoDB
 
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
MongoDB
 
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
MongoDB
 
MongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
MongoDB
 
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
MongoDB
 
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
MongoDB
 
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
MongoDB
 
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
MongoDB
 
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
MongoDB
 
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
MongoDB
 
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
MongoDB
 
Ad

Querying Mongo Without Programming Using Funql

  • 1. Querying MongoDB without programming using FUNQL
  • 2. FUNQL? Federated Unified Query Language
  • 3. What does this mean?  Federated - Integrates different independent stand alone data sources into one coherent view  Unified – One query for different database technologies: Relational, Document Oriented, Object Oriented, Key/Value (yes its possible!)  Query Language – Domain: Filtering, data transformation, aggregation. Can be executed interatively. No programming knowledge required.
  • 4. When to Use  Ad-Hoc queries  When Map/Reduce is overkill  When you don't want to get lost in $}':“{ syntax  Data integration  Business Intelligence  Pre aggregation
  • 5. Benefits for Mongo  Easier use of MongoDB and quicker completion of projects.  Standardizes the heterogeneous NoSQL Market.  Protects customer investments by making MongoDB part of a larger market.  Enlarges the pool of skilled users.  Learning environment for non-technical users and SQL users.  Co-existence with relational databases and migration made easy.
  • 6. Benefits for developers  Skill applicable to different database systems.  Faster development.  Easy testing and data cleaning.  Larger market for developer skills.  Protects your investment in learning NoSQL.  Fast prototyping.
  • 7. Benefits for developers  Skill applicable to different database systems.  Faster development.  Easy testing and data cleaning.  Larger market for developer skills.  Protects your investment in learning NoSQL.  Fast prototyping.
  • 8. Example from collection where object.subobject.field = $parameter select field, { nested, fields, … } group by field, aggregates, sub_groups where condition // on aggregate //= having into … // File (json/xml) or other database/collection
  • 9. From - Where - Select why it makes a big difference to SQL's select - from - where  Seemingly unimportant syntactical sugar  But it completely changes the execution model of a query.  Simplifies it from declarative to data-flow  Each statement is a pipeline, reading data from the previous statement and passing (modified) data to the next.  Can easily be executed in parallel.  Not invented here: Pioneered by Microsoft with Linq
  • 10. Dealing with relational data  The join operation fits into the same model. from table1 join table2 on table1.id = table2.foreign_id  Is now just an pipeline stage, that adds the data from table2 into the dataflow.  Tables can come from different systems. E.g one is from MongoDB, the other from DB2  Join grouped operator – returns a 1-n relationship a a collection of nested documents.
  • 11. Nested/Recursive Data Structures  flatten operator transforms a (fixed) nested structure into one linear table.  enumerate linearizes (walks through) an arbitrarily deeply nested tree.  group turns a linear structure into a nested structure.  Funql understands database references. You can use dot-notation for navigation.
  • 12. Aggregation  The model allows much more advanced aggregation operations than SQL  Multi dimensional grouping  Mixing of normal select and aggregation  Analytics directly in the query  Can leverage MongoDBs new aggregation operators
  • 13. Funql and the Aggregation Framework  Both use the same pipeline model  select statement == mongos project  flatten stetement ~~ mongo's unwind  range == first, last  Simple mapping, so Funql can operate at Mongo's native speed. db.zips.aggregate({$group:{_id: '$city', pop: {$sum: '$pop'}}}, {$sort: {pop: -1}}}) from zips group by city, sum pop as pop sort by pop descending
  • 14. Status  Formal language spec at reportsanywhere.com/pebble  Twitter: @reportsanywhere  funql.org is coming up  Reference implementation in Java currently for  MongoDB  Generic Json data  Cassandra (coming)  Relational Databases (coming)  Fork it on Bitbucket (coming up)
  • 15. Architecture  Core Engine  Can filter, select, join, sort, group, aggregate  Extremely simple driver API: 5 Methods. open/close, iterate, lookup, range  Not necessarily optimized  Advanced driver API: Examines the syntax tree and invokes native operations.