Building a
Machine Learning
Recommendation Engine
in SQL
@garyorenstein @memsql
MemSQL 1
Today’s Talk
1. State of Data 2018 according to Gartner
2. Rise of Machine Learning
3. Live Demo - A SQL Recommendation Engine
MemSQL 2
SECTION 1
The State of DataAccording to Gartner 2018
MemSQL 3
Hype Cycle for Data
Management
26 July 2017
Donald Feinberg
Adam M. Ronthal
G00313950
MemSQL 4
MemSQL 5
Multimodel has the potential
to support both relational and
nonrelational use cases
while reducing the number of
disparate DBMS products
in an organization.
MemSQL 6
the idea of a
Hadoop distribution
will become obsolete
before it reaches
the Plateau of Productivity
MemSQL 7
Penetration continues to increase and organizations
should be evaluating these resources for
— cost-efficiency
— infrastructure simplification and
— new use cases, such as Hybrid Transactional/
Analytical Processing (HTAP)
MemSQL 8
Build Your Digital Business
Platform Around Data and
Analytics
31 January 2018
Andrew White
W. Roy Schulte
Roxane Edjlali
Joao Tapadinhas
Svetlana Sicular
G00350435
MemSQL 9
Select Challenges
Data and analytics investments that are tied to
measurable business outcomes are more likely to
produce reportable benefits.
MemSQL 10
Magic Quadrant for Data
Management Solutions for
Analytics
13 February 2018
Adam M. Ronthal
Roxane Edjlali
Rick Greenwald
G00326691
MemSQL 11
We define four primary use cases for DMSAs that reflect
this diversity of data and use cases:
— Traditional data warehouse
— Real-time data warehouse
— Context-independent data warehouse
— Logical data warehouse
MemSQL 12
MemSQL 13
MemSQL 14
Real-Time Data Warehouse
This use case adds a real-time component to analytics
use cases, with the aim of reducing latency — the time
lag between when data is generated and when it can be
analyzed.
MemSQL 15
MemSQL 16
Other Vendors to Consider for
Operational DBMSs
23 November 2017
Donald Feinberg
Merv Adrian
Nick Heudecker
G00327284
MemSQL 17
Other Vendors to Consider for Operational DBMSs
Actian
Aerospike
Alibaba Cloud
Altibase
ArangoDB
Cloudera
Clustrix
Couchbase
FairCom
Fujitsu
General Data Technology
Hortonworks
MariaDB
MemSQL
MongoDB
Neo4j
NuoDB
Percona
Redis Labs
SequoiaDB
TmaxSoft
VoltDB
MemSQL 18
Other Vendors to Consider for Operational DBMSs
also listed as Challenger or Leader
in the Magic Quadrant
for Data Management Solutions for Analytics
MemSQL
MemSQL 19
MemSQL 20
Over the next five years,
the OPDBMS and DMSA
markets converge to a
single DBMS market.
MemSQL 21
Look to your operational DBMS
vendor for both transactional
and analytical workloads.
MemSQL 22
SECTION 2
Rise of Machine Learning
MemSQL 23
MemSQL 24
MemSQL 25
MemSQL 26
MemSQL 27
MemSQL 28
MemSQL 29
2018 Outlook Survey
MemSQL and O’Reilly
1600+ respondents
memsql.com/MLsurvey
MemSQL 30
MemSQL 31
MemSQL 32
Machine Learning and
Databases
MemSQL 33
MemSQL 34
MemSQL 35
MemSQL 36
MemSQL 37
MemSQL 38
MemSQL 39
MemSQL 40
MemSQL 41
MemSQL 42
MemSQL 43
MemSQL 44
MemSQL 45
MemSQL 46
MemSQL 47
SECTION 3
DEMO with Yelp Dataset
MemSQL 48
MemSQL 49
MemSQL 50
MemSQL 51
MemSQL 52
Can you build a machine
learning recommendation
engine in SQL?
Yes
MemSQL 53
Can you build a machine learning
recommendation engine in SQL?
Yes
Should you?
For training? Maybe, maybe not.
For Operational Scoring?
Absolutely!
MemSQL 54
MemSQL 55
MemSQL 56
Secret Weapons to Machine Learning in SQL
— Extensibility
— Stored Procedures
— User Defined Functions
— User Defined Aggregates
— DOT_PRODUCT
— Compare two vectors
MemSQL 57
MemSQL 58
MemSQL 59
Sequel Pro Mac app for MySQL databases
MemSQL 60
MemSQL in one slide
— Distributed SQL database
— Massively parallel, lock-free, fast
— Full ACID features
— In-memory and on-disk
— JSON, key-value, geospatial, full-text search
— Robust security
— Built for transactions and analytics
MemSQL 61
MemSQL 62
MemSQL 63
Why do ML in SQL?
— Train in any number of systems
— Score in the database for applications from real-time
drilling to fraud detection to personalization
— Complete certain functions within the database to
radically simplify operational infrastructure
MemSQL 64
“It is a fine line between
a well executed SQL query on
live data and ML/AI”
MemSQL 65
MemSQL 66
Thank you!
Please visit our booth
www.memsql.com
@garyorenstein
@memsql
MemSQL 67
Abstract: Building a Machine Learning Recommendation Engine in SQL
Modern businesses constantly seek deeper customer relationships and more
compelling experiences.
To accomplish this, companies are looking to machine learning and artificial
intelligence solutions; however, that often involves a host of new systems and
approaches.
With a modern database architecture, it is possible to build compelling machine
learning solutions with SQL, deliver real-time engagements, and rapidly move to
operational applications.
See live, how a modern database can accomplish these feats within a single
integrated solution.
MemSQL 68

Building a Machine Learning Recommendation Engine in SQL

  • 1.
    Building a Machine Learning RecommendationEngine in SQL @garyorenstein @memsql MemSQL 1
  • 2.
    Today’s Talk 1. Stateof Data 2018 according to Gartner 2. Rise of Machine Learning 3. Live Demo - A SQL Recommendation Engine MemSQL 2
  • 3.
    SECTION 1 The Stateof DataAccording to Gartner 2018 MemSQL 3
  • 4.
    Hype Cycle forData Management 26 July 2017 Donald Feinberg Adam M. Ronthal G00313950 MemSQL 4
  • 5.
  • 6.
    Multimodel has thepotential to support both relational and nonrelational use cases while reducing the number of disparate DBMS products in an organization. MemSQL 6
  • 7.
    the idea ofa Hadoop distribution will become obsolete before it reaches the Plateau of Productivity MemSQL 7
  • 8.
    Penetration continues toincrease and organizations should be evaluating these resources for — cost-efficiency — infrastructure simplification and — new use cases, such as Hybrid Transactional/ Analytical Processing (HTAP) MemSQL 8
  • 9.
    Build Your DigitalBusiness Platform Around Data and Analytics 31 January 2018 Andrew White W. Roy Schulte Roxane Edjlali Joao Tapadinhas Svetlana Sicular G00350435 MemSQL 9
  • 10.
    Select Challenges Data andanalytics investments that are tied to measurable business outcomes are more likely to produce reportable benefits. MemSQL 10
  • 11.
    Magic Quadrant forData Management Solutions for Analytics 13 February 2018 Adam M. Ronthal Roxane Edjlali Rick Greenwald G00326691 MemSQL 11
  • 12.
    We define fourprimary use cases for DMSAs that reflect this diversity of data and use cases: — Traditional data warehouse — Real-time data warehouse — Context-independent data warehouse — Logical data warehouse MemSQL 12
  • 13.
  • 14.
  • 15.
    Real-Time Data Warehouse Thisuse case adds a real-time component to analytics use cases, with the aim of reducing latency — the time lag between when data is generated and when it can be analyzed. MemSQL 15
  • 16.
  • 17.
    Other Vendors toConsider for Operational DBMSs 23 November 2017 Donald Feinberg Merv Adrian Nick Heudecker G00327284 MemSQL 17
  • 18.
    Other Vendors toConsider for Operational DBMSs Actian Aerospike Alibaba Cloud Altibase ArangoDB Cloudera Clustrix Couchbase FairCom Fujitsu General Data Technology Hortonworks MariaDB MemSQL MongoDB Neo4j NuoDB Percona Redis Labs SequoiaDB TmaxSoft VoltDB MemSQL 18
  • 19.
    Other Vendors toConsider for Operational DBMSs also listed as Challenger or Leader in the Magic Quadrant for Data Management Solutions for Analytics MemSQL MemSQL 19
  • 20.
  • 21.
    Over the nextfive years, the OPDBMS and DMSA markets converge to a single DBMS market. MemSQL 21
  • 22.
    Look to youroperational DBMS vendor for both transactional and analytical workloads. MemSQL 22
  • 23.
    SECTION 2 Rise ofMachine Learning MemSQL 23
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
    2018 Outlook Survey MemSQLand O’Reilly 1600+ respondents memsql.com/MLsurvey MemSQL 30
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.
  • 43.
  • 44.
  • 45.
  • 46.
  • 47.
  • 48.
    SECTION 3 DEMO withYelp Dataset MemSQL 48
  • 49.
  • 50.
  • 51.
  • 52.
  • 53.
    Can you builda machine learning recommendation engine in SQL? Yes MemSQL 53
  • 54.
    Can you builda machine learning recommendation engine in SQL? Yes Should you? For training? Maybe, maybe not. For Operational Scoring? Absolutely! MemSQL 54
  • 55.
  • 56.
  • 57.
    Secret Weapons toMachine Learning in SQL — Extensibility — Stored Procedures — User Defined Functions — User Defined Aggregates — DOT_PRODUCT — Compare two vectors MemSQL 57
  • 58.
  • 59.
  • 60.
    Sequel Pro Macapp for MySQL databases MemSQL 60
  • 61.
    MemSQL in oneslide — Distributed SQL database — Massively parallel, lock-free, fast — Full ACID features — In-memory and on-disk — JSON, key-value, geospatial, full-text search — Robust security — Built for transactions and analytics MemSQL 61
  • 62.
  • 63.
  • 64.
    Why do MLin SQL? — Train in any number of systems — Score in the database for applications from real-time drilling to fraud detection to personalization — Complete certain functions within the database to radically simplify operational infrastructure MemSQL 64
  • 65.
    “It is afine line between a well executed SQL query on live data and ML/AI” MemSQL 65
  • 66.
  • 67.
    Thank you! Please visitour booth www.memsql.com @garyorenstein @memsql MemSQL 67
  • 68.
    Abstract: Building aMachine Learning Recommendation Engine in SQL Modern businesses constantly seek deeper customer relationships and more compelling experiences. To accomplish this, companies are looking to machine learning and artificial intelligence solutions; however, that often involves a host of new systems and approaches. With a modern database architecture, it is possible to build compelling machine learning solutions with SQL, deliver real-time engagements, and rapidly move to operational applications. See live, how a modern database can accomplish these feats within a single integrated solution. MemSQL 68