3. SkySQL
â˘Leading provider of open
source databases, services and
solutions
â˘Home for the founders and the
original developers of the core
of MySQL
â˘The creators of MariaDB, the
drop-off, innovative
replacement of MySQL
Friday, 3 May 13
6. PAGE
[Allegedly] Reasons to adopt NoSQL
â˘Not all the needs for a database
fit with the relational model
â˘Key/value stores?
â˘Who needsACID?
â˘Who needs schemas?
â˘Relational databases cannot
handle many modern workloads
â˘Scalability is an issue in general
â˘RDBMSs are pretty inflexible
â˘There is no elasticity
â˘Schemas and administration is
too complicated, especially
during the development phase
â˘SQL is unnecessarily complicated
â˘NOSQL = Not Only SQL
6
Friday, 3 May 13
7. PAGE
NoSQL vs SQL
7
NoSQL
â˘Schema-less (or dynamic schema)
â˘Dynamic horizontal scaling
â˘Good to store and retrieve a great quantity of
data
â˘Great Flexibility
â˘FullACID not required - âBASE is betterâ
â˘BasicallyAvailable, Soft state, Eventually
consistent
â˘Objects: Collections, Documents, Fields
â˘NoSQL DBs:
â˘Key/Value
â˘BigTable
â˘Document
â˘Graph
(My)SQL
â˘Rigid Schema design
â˘Static or no horizontal scaling
â˘Good to store and retrieve data that has
relationship between the elements
â˘Pretty inflexible
â˘ACID as a given
â˘Atomic, Consistent, Isolated, Durable
â˘Objects: Tables, Rows, Columns
â˘SQL DBs:
â˘Row-based
â˘Columnar
â˘Object Relational
Friday, 3 May 13
8. PAGE
Understanding the CAP Theorem
â˘CA
â˘Synchronous Replication
â˘Two Phase Commit
â˘MySQL,ACID/RDBMSs
â˘CP
â˘MongoDB, HBase, Redis, MemcacheD
â˘AP
â˘Cassandra, Riak, CouchDB
8
C A
P
Friday, 3 May 13
12. PAGE
When is MySQL a good fit?
â˘Complex (but well defined)
schema
â˘ACID and Consistency as a must
â˘Interaction/Integration with
tools and applications that speak
MySQL
â˘Typically âsimpleâ data
â˘Data âlimitedâ in size
â˘Application-based scalability
â˘Applications require âcomplexâ
queries (read: joins)
â˘Many developers / Few DBs
â˘In-house expertise
12
Friday, 3 May 13
13. PAGE
When is NoSQL a good fit?
â˘Schema-less for startup
applications
â˘Performance is more important
than consistency andACID
features
â˘Documents, binary data and
more
â˘Lots of data, unstructured
â˘Scalability and elasticity out of
the box will solve lots of
problems
â˘Applications mainly have
âsimpleâ queries (read: access
to single tables, by key or simple
conditions)
â˘One man job (for each module)
13
Friday, 3 May 13
22. PAGE
Additions to the core MySQL
â˘MySQL Cluster/NDB
â˘Galera
â˘ScaleDB
â˘Continuent
â˘ScaleBase
â˘ScaleArc
â˘CodeFutures
22
Friday, 3 May 13
27. PAGE
Cassandra Storage Engine
â˘Column Family == Table
â˘Rowkey, static and dynamic
columns allowed
â˘Batch key access support
SET cassandra_default_thrift_host =
'192.168.0.10'
CREATE TABLE cassandra_tbl (
rowkey INT PRIMARY KEY,
col1 VARCHAR(25),
col2 BIGINT,
dyn_cols BLOB DYNAMIC_COLUMN_STORAGE = yes )
ENGINE = cassandra
KEYSPACE = 'cassandra_key_space'
COLUMN_FAMILY = 'column_family_name';
27
Friday, 3 May 13
28. PAGE
Connect Storage Engine
â˘Any file format as MySQLTABLE:
â˘ODBC
â˘Text, XML, *ML
â˘Excel,Access etc.
â˘MariaDB CREATE TABLE options
â˘Multi-file table
â˘TableAutocreation
â˘Condition push down
â˘Read/Write and Multi Storage Engine Join
â˘CREATE INDEX
28
CREATE TABLE handout
ENGINE = CONNECT
TABLE_TYPE = XML
FILE_NAME = 'handout.htm'
HEADER = yes OPTION_LIST =
'name = TABLE,
coltype = HTML,
attribute =
(border=1;cellpadding=5)';
Friday, 3 May 13
29. PAGE
Join us at the Solutions Day
â˘Cassandra and Connect Storage Engine
â˘Map/Reduce approach - Proxy optimisation
â˘Multiple protocols and more
29
Friday, 3 May 13