Elephants vs. Dolphins: Comparing PostgreSQL and MySQL for use in the DoD
-
Upload
jamey-hanson -
Category
Documents
-
view
154 -
download
3
Transcript of Elephants vs. Dolphins: Comparing PostgreSQL and MySQL for use in the DoD
![Page 1: Elephants vs. Dolphins: Comparing PostgreSQL and MySQL for use in the DoD](https://reader030.fdocuments.net/reader030/viewer/2022032621/55cf740fbb61eb5d488b45bd/html5/thumbnails/1.jpg)
Elephant vs. Dolphin
Comparing PostgreSQL and MySQL in the DoD
James Hanson
@jamey_hanson
Freedom Consulting Group
http://www.freedomconsultinggroup.com
14-Ju1-2015
![Page 2: Elephants vs. Dolphins: Comparing PostgreSQL and MySQL for use in the DoD](https://reader030.fdocuments.net/reader030/viewer/2022032621/55cf740fbb61eb5d488b45bd/html5/thumbnails/2.jpg)
What are the similarities and differences between
PostgreSQL and MySQL?
Highlight features that support projects delivering
capabilities in our environment
Elephant vs. Dolphin in the DoD
PostgreSQL Migration Team 14-Jul-2015
2
vs.
![Page 3: Elephants vs. Dolphins: Comparing PostgreSQL and MySQL for use in the DoD](https://reader030.fdocuments.net/reader030/viewer/2022032621/55cf740fbb61eb5d488b45bd/html5/thumbnails/3.jpg)
They are both Relational Database Management
Systems (RDBMS)
Store data in tables and views
Relate tables with foreign keys that are automatically
updated with triggers
Interact with data using ANSI SQL
Support procedural programming language(s)
Support "transactions"
COMMIT statement to make a permanent change
Support multiple, concurrent connections working with the
same data
How are PostgreSQL and MySQL similar?
PostgreSQL Migration Team 14-Jul-2015
3
![Page 4: Elephants vs. Dolphins: Comparing PostgreSQL and MySQL for use in the DoD](https://reader030.fdocuments.net/reader030/viewer/2022032621/55cf740fbb61eb5d488b45bd/html5/thumbnails/4.jpg)
On-line ("hot") backups and database exports
Full or partial replication from Master to Standby
Including “hot” Standby for reporting
Multiple Standby with automatic failover
Clustering support with virtual IP interface
Command-line interface that can run scripts
Bulk load tools for OS files
Connection pooling tool(s)
Both have the expected suite of tools
PostgreSQL Migration Team 14-Jul-2015
4
![Page 5: Elephants vs. Dolphins: Comparing PostgreSQL and MySQL for use in the DoD](https://reader030.fdocuments.net/reader030/viewer/2022032621/55cf740fbb61eb5d488b45bd/html5/thumbnails/5.jpg)
PostgreSQL Migration Team 14-Jul-2015
5
Both have a GUI
![Page 6: Elephants vs. Dolphins: Comparing PostgreSQL and MySQL for use in the DoD](https://reader030.fdocuments.net/reader030/viewer/2022032621/55cf740fbb61eb5d488b45bd/html5/thumbnails/6.jpg)
PostgreSQL Migration Team 14-Jul-2015
6
Both have a GUI
![Page 7: Elephants vs. Dolphins: Comparing PostgreSQL and MySQL for use in the DoD](https://reader030.fdocuments.net/reader030/viewer/2022032621/55cf740fbb61eb5d488b45bd/html5/thumbnails/7.jpg)
Free and “freemium” versions
PostgreSQL has an active FOSS development
community.
MySQL FOSS development forked to MariaDB
EnterpriseDB only supports PostgreSQL.
Oracle also supports (protects) Oracle RDBMS
Both are included in CentOS / Fedora / RHEL
Similar distribution and business models
PostgreSQL Migration Team 14-Jul-2015
7
![Page 8: Elephants vs. Dolphins: Comparing PostgreSQL and MySQL for use in the DoD](https://reader030.fdocuments.net/reader030/viewer/2022032621/55cf740fbb61eb5d488b45bd/html5/thumbnails/8.jpg)
Dr. Google has multiple, conflicting performance
comparisons. An (over)simplification …
MySQL is considered to be slightly faster in simple
(i.e. no join) queries
PostgreSQL is faster in queries with joins and more
complex transactions
Similar performance
PostgreSQL Migration Team 14-Jul-2015
8
![Page 9: Elephants vs. Dolphins: Comparing PostgreSQL and MySQL for use in the DoD](https://reader030.fdocuments.net/reader030/viewer/2022032621/55cf740fbb61eb5d488b45bd/html5/thumbnails/9.jpg)
Magic Quadrant for Operational Database
Management Systems. http://www.gartner.com/technology/reprints.do?id=1-
23A415Q&ct=141020&st=sb
What does the Gartner say?
PostgreSQL Migration Team 14-Jul-2015
9
![Page 10: Elephants vs. Dolphins: Comparing PostgreSQL and MySQL for use in the DoD](https://reader030.fdocuments.net/reader030/viewer/2022032621/55cf740fbb61eb5d488b45bd/html5/thumbnails/10.jpg)
What does the Gartner say?
PostgreSQL Migration Team 14-Jul-2015
10
![Page 11: Elephants vs. Dolphins: Comparing PostgreSQL and MySQL for use in the DoD](https://reader030.fdocuments.net/reader030/viewer/2022032621/55cf740fbb61eb5d488b45bd/html5/thumbnails/11.jpg)
Strategic planning assumptions
By 2017, the "NoSQL" label will cease to distinguish
DBMSs, which will reduce its value and result in it falling
out of use.
By 2017, all leading operational DBMSs will offer multiple
data models, relational and NoSQL, in a single platform.
EnterpriseDB (i.e. PostgreSQL) has higher
Completeness of Vision and Ability to Execute
What does the Gartner say?
PostgreSQL Migration Team 14-Jul-2015
11
![Page 12: Elephants vs. Dolphins: Comparing PostgreSQL and MySQL for use in the DoD](https://reader030.fdocuments.net/reader030/viewer/2022032621/55cf740fbb61eb5d488b45bd/html5/thumbnails/12.jpg)
The MySQL™ software delivers a very fast, multi-
threaded, multi-user, and robust SQL (Structured
Query Language) database server. (https://dev.mysql.com/)
MySQL implements a subset of ANSI SQL and features
that are used by simple and (typically) ORM-based
applications.
PostgreSQL delivers a fast, robust implementation of
the ANSI SQL standard with NoSQL*, geospatial,
row-level-security and partitioning support. It is also
extensible with multiple programming languages.
* JSON, XML, key-value-pair, limited graph queries and natural
language full-text search.
Different missions and visions:
PostgreSQL Migration Team 14-Jul-2015
12
![Page 13: Elephants vs. Dolphins: Comparing PostgreSQL and MySQL for use in the DoD](https://reader030.fdocuments.net/reader030/viewer/2022032621/55cf740fbb61eb5d488b45bd/html5/thumbnails/13.jpg)
Why the passion?
13
MySQL PostgreSQL
![Page 14: Elephants vs. Dolphins: Comparing PostgreSQL and MySQL for use in the DoD](https://reader030.fdocuments.net/reader030/viewer/2022032621/55cf740fbb61eb5d488b45bd/html5/thumbnails/14.jpg)
Oracle owns MySQL, which effectively means it will never
have a feature set that competes with Oracle RDBMS.
Not everyone wants their database to support Larry’s
private island and America’s Cup
Business reasons …
PostgreSQL Migration Team 14-Jul-2015
14
![Page 15: Elephants vs. Dolphins: Comparing PostgreSQL and MySQL for use in the DoD](https://reader030.fdocuments.net/reader030/viewer/2022032621/55cf740fbb61eb5d488b45bd/html5/thumbnails/15.jpg)
PostgreSQL’s mission is bigger than MySQL’s and
so it does more
Full implementation of ANSI SQL (vs. MySQL subset)
Native NoSQL support including JSON, XML, key-value-
pair and recursive (graph) queries.
Only Oracle RDBMS has these.
GeoSpatial support with PostGIS
Support for common language procedural extensions
Java, Python, Perl, Program/R
Application-customized data types including IPv4/6,
range, array and ENUM
Technical reasons …
PostgreSQL Migration Team 14-Jul-2015
15
![Page 16: Elephants vs. Dolphins: Comparing PostgreSQL and MySQL for use in the DoD](https://reader030.fdocuments.net/reader030/viewer/2022032621/55cf740fbb61eb5d488b45bd/html5/thumbnails/16.jpg)
Analytic functions (a.k.a. Windowing functions)
Calculate moving average and similar statistics that can
only be done in the application tier with MySQL
How does that impact my mission?
PostgreSQL Migration Team 14-Jul-2015
16
![Page 17: Elephants vs. Dolphins: Comparing PostgreSQL and MySQL for use in the DoD](https://reader030.fdocuments.net/reader030/viewer/2022032621/55cf740fbb61eb5d488b45bd/html5/thumbnails/17.jpg)
Find events within a user-select box, IP-location,
nearest event(s), event(s) within radius
Use internal mapping and related services … for free
GeoSpatial data
PostgreSQL Migration Team 14-Jul-2015
17
![Page 18: Elephants vs. Dolphins: Comparing PostgreSQL and MySQL for use in the DoD](https://reader030.fdocuments.net/reader030/viewer/2022032621/55cf740fbb61eb5d488b45bd/html5/thumbnails/18.jpg)
Validate IP’s on input (hard to do with IPv6)
Find IPs within subnet (CIDR notation) or range
Associate array’s of ports and/or MAC addresses
with IP(s)
PostgreSQL lets you think like a router when working
with IPs rather than thinking like a parser
IPv4 / 6 data types (+ MAC)
PostgreSQL Migration Team 14-Jul-2015
18
![Page 19: Elephants vs. Dolphins: Comparing PostgreSQL and MySQL for use in the DoD](https://reader030.fdocuments.net/reader030/viewer/2022032621/55cf740fbb61eb5d488b45bd/html5/thumbnails/19.jpg)
Beyond the Relational model for …
Large data sets that need to be stored efficiently
Focus on queries, relationships and analysis
(vs. transactions)
Read-only data
Does any of this sound applicable to our domain?
Arrays
PostgreSQL Migration Team 14-Jul-2015
19
![Page 20: Elephants vs. Dolphins: Comparing PostgreSQL and MySQL for use in the DoD](https://reader030.fdocuments.net/reader030/viewer/2022032621/55cf740fbb61eb5d488b45bd/html5/thumbnails/20.jpg)
Similar to Apache SOLR, but automatically updated
and part of the database
Not as fast or full-featured
Ranked results base on search-term frequency
weighted for document size. Similar to TF/IDF.
Highlighted surrounding phrases
Full-text search w/ranked results
PostgreSQL Migration Team 14-Jul-2015
20
![Page 21: Elephants vs. Dolphins: Comparing PostgreSQL and MySQL for use in the DoD](https://reader030.fdocuments.net/reader030/viewer/2022032621/55cf740fbb61eb5d488b45bd/html5/thumbnails/21.jpg)
Leverage the skills your team has today
(any) Procedural language support
PostgreSQL Migration Team 14-Jul-2015
21
![Page 22: Elephants vs. Dolphins: Comparing PostgreSQL and MySQL for use in the DoD](https://reader030.fdocuments.net/reader030/viewer/2022032621/55cf740fbb61eb5d488b45bd/html5/thumbnails/22.jpg)
Per Gartner – “By 2017, all leading operational DBMSs will
offer multiple data models, relational and NoSQL, in a single
platform.” (PostgreSQL does today)
JSON support similar to MongoDB, but integrated with the
rest of your data
NoSQL support … JSON & XML
PostgreSQL Migration Team 14-Jul-2015
22
![Page 23: Elephants vs. Dolphins: Comparing PostgreSQL and MySQL for use in the DoD](https://reader030.fdocuments.net/reader030/viewer/2022032621/55cf740fbb61eb5d488b45bd/html5/thumbnails/23.jpg)
HSTORE data type stores key-value pairs as a column in a
relational table
NoSQL support … key value pair
PostgreSQL Migration Team 14-Jul-2015
23
![Page 24: Elephants vs. Dolphins: Comparing PostgreSQL and MySQL for use in the DoD](https://reader030.fdocuments.net/reader030/viewer/2022032621/55cf740fbb61eb5d488b45bd/html5/thumbnails/24.jpg)
PostgreSQL recursive* queries support graphs. * “recursive”
is the ANSI-SQL term.
Similar functionality to Neo4J and SPARQL, but on smaller
data sets
NoSQL support … graph data
PostgreSQL Migration Team 14-Jul-2015
24
![Page 25: Elephants vs. Dolphins: Comparing PostgreSQL and MySQL for use in the DoD](https://reader030.fdocuments.net/reader030/viewer/2022032621/55cf740fbb61eb5d488b45bd/html5/thumbnails/25.jpg)
PostgreSQL and MySQL are both good products for
simple, pure-relational applications using a subset of
ANSI-SQL
They have similar performance & tools
Both are free and “fremium”
But MySQL will never have the features of Oracle RDBMS
… because Larry Ellison won’t allow it.
MariaDB has FOSS active development, but it is a fork – not
MySQL
Summary
PostgreSQL Migration Team 14-Jul-2015
25
![Page 26: Elephants vs. Dolphins: Comparing PostgreSQL and MySQL for use in the DoD](https://reader030.fdocuments.net/reader030/viewer/2022032621/55cf740fbb61eb5d488b45bd/html5/thumbnails/26.jpg)
Consider PostgreSQL if, over the lifespan of your project,
you ever envision …
Using JSON, XML, key-value pair or other NoSQL data
Validating, storing or analyzing IPv4/6 or MAC addresses
Points on a map, selecting records based on a bounding-box,
searching for nearby/far-away records or looking for
communication that crosses a geographic boundary
Performing moving averages, Excel pivot-table queries or
advanced statistics
Leveraging your team’s Java, Python, Perl, TCL or Program /R
skills
Using (simple) graph analysis to find a path between records
Summary
PostgreSQL Migration Team 14-Jul-2015
26
![Page 27: Elephants vs. Dolphins: Comparing PostgreSQL and MySQL for use in the DoD](https://reader030.fdocuments.net/reader030/viewer/2022032621/55cf740fbb61eb5d488b45bd/html5/thumbnails/27.jpg)
Contact any member of the PostgreSQL Migration Team
James Hanson, Chris Fort and Russell Janusz
Connect to our YUM repository (or GUI installer) … and go
Contact Corporate Hosting … and let them host your
PostgreSQL database and VM
Contact Aaron Pestel or James Hanson for capability and
license information on EnterpriseDB
OK great … how do I move forward?
PostgreSQL Migration Team 14-Jul-2015
27
![Page 28: Elephants vs. Dolphins: Comparing PostgreSQL and MySQL for use in the DoD](https://reader030.fdocuments.net/reader030/viewer/2022032621/55cf740fbb61eb5d488b45bd/html5/thumbnails/28.jpg)
Are
there
any
Questions
or
follow up?
PGConf US, NYC 26-
Mar-2015
28