simple way for mysql to nosql

22
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Simple Way for MySQL to NoSQL Okcan Yasin Saygılı [email protected]

Upload: okcan-yasin-saygili

Post on 15-Feb-2017

274 views

Category:

Data & Analytics


0 download

TRANSCRIPT

Page 1: Simple Way for MySQL to NoSQL

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |

Simple Way for MySQL to NoSQL

Okcan Yasin Saygılı

[email protected]

Page 2: Simple Way for MySQL to NoSQL

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 2

Agenda

1.MySQL Fundementals

2.Bigdata

3.Cassandra

2.Migrating data from MySQL to Cassandra

Page 3: Simple Way for MySQL to NoSQL

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 3

MySql Fundementals

MySQL is the world’s most popular open source database,

Why we use this ?

1. Enabling the cost-effective delivery of reliable

2. High-performance and scalable

3. Embedded database applications,

The top five websites and so on .

Page 4: Simple Way for MySQL to NoSQL

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 4

MySql Fundementals

It is an integrated, transaction safe, ACID−compliant database with full commit, rollback, crash recovery, and row-level locking capabilities.

MySQL delivers the ease of use, scalability, and high performance, as well as a full suite of database drivers and visual tools to help developers and DBAs build and manage their MySQL applications.

Page 5: Simple Way for MySQL to NoSQL

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 5

MySql Fundementals

High Performance & Scalability to meet the demands of exponentially growing data loads and users.

• Self-healing Replication Clusters to improve scalability, performance and availability.

• Online Schema Changes to meet changing business requirements.

• Performance Schema for monitoring user & application level performance and resource consumption.

Page 6: Simple Way for MySQL to NoSQL

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 6

Agenda

1.MySQL Fundementals

2.Bigdata

3.Cassandra

2.Migrating data from MySQL to Cassandra

Page 7: Simple Way for MySQL to NoSQL

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 7

Bigdata

Big data is a broad term for data sets so large or complex that traditional data processing applications are inadequate.

Challenges include analysis, capture, data curation, search, sharing, storage, transfer, visualization, querying and information privacy.

Page 8: Simple Way for MySQL to NoSQL

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 8

Agenda

1.MySQL Fundementals

2.Bigdata

3.Cassandra

2.Migrating data from MySQL to Cassandra

Page 9: Simple Way for MySQL to NoSQL

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 9

NoSQL

NoSQL DEFINITION:Next Generation Databases mostly addressing some of the points: being non-relational, distributed, open-source and horizontally scalable.

The original intention has been modern web-scale databases. The movement began early 2009 and is growing rapidly.

Page 10: Simple Way for MySQL to NoSQL

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 10

NoSQL

Often more characteristics apply such as: schema-free, easy replication support, simple API, eventually consistent / BASE (not ACID), a huge amount of data and more.

So the misleading term "nosql" (the community now translates it mostly with "not only sql") should be seen as an alias to something like the definition above

Page 11: Simple Way for MySQL to NoSQL

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 11

Agenda

1.MySQL Fundementals

2.Bigdata

3.Cassandra

2.Migrating data from MySQL to Cassandra

Page 12: Simple Way for MySQL to NoSQL

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 12

Cassandra

Apache Cassandra is an open source distributed database management system designed to handle large amounts of data across many commodity servers, providing high availability with no single point of failure.

Cassandra offers robust support for clusters spanning multiple datacenters, with asynchronous masterless replication allowing low latency operations for all clients.

Page 13: Simple Way for MySQL to NoSQL

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 13

DataStax

DataStax Enterprise 2.0 includes support for Sqoop, which is a tool designed to transfer data between an RDBMS and Hadoop.

Page 14: Simple Way for MySQL to NoSQL

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 14

1.Please download and extract binary (tar.gz).

2.Please aware JAVA_HOME for setting.

3. Include the connector to the relational database into a location reachable by sqoop.

4.Please put mysql-connector-java-5.1.12-bin.jar .

5.setted env.

6.bin/dse

Page 15: Simple Way for MySQL to NoSQL

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 15

DATASTAX

CREATE TABLE `test_table` (

`test_key` varchar(16) NOT NULL,

`test1` varchar(50) DEFAULT NULL,

`test2` varchar(50) DEFAULT NULL,

PRIMARY KEY (`test_key_pk`)

) ENGINE=InnoDB

Page 16: Simple Way for MySQL to NoSQL

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 16

DATASTAX

./dse sqoop import --connect jdbc:mysql://127.0.0.1/dev\

--username root \

--table test_table \

--cassandra-keyspace dev \

--cassandra-column-family test_table_cf \

--cassandra-row-key test_table_pk \

--cassandra-thrift-host 127.0.0.1 \

--cassandra-create-schema

Page 17: Simple Way for MySQL to NoSQL

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 17

MySql

• Full ACID compliant (with InnoDB)

• Stored routines, views, triggers

• Built-in replication

• Built-in partitioning

• Plugin architecture

• MySQL Cluster

Page 18: Simple Way for MySQL to NoSQL

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 18

Support

Community always near you . Please Click http://dev.mysql.com/community/

Page 19: Simple Way for MySQL to NoSQL

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 19

References1. http://www.datastax.com/2012/03/how-to-move-data-from-relational-databases-to-datastax-enterprise-cassandra-using-

sqoop2. http://nosql-database.org/3. https://en.wikipedia.org/wiki/Apache_Cassandra4. http://www.inspiredtechies.com/mysql-cassandra-db-migration/5. https://en.wikipedia.org/wiki/MySQL6. http://www.mysql.com/products/enterprise/mysql-datasheet.en.pdf7. https://dzone.com/articles/my-experience-moving-data8. http://www.datastax.com/wp-content/themes/datastax-2013/images/common/logo.png9. https://en.wikipedia.org/wiki/Apache_Cassandra#/media/File:Cassandra_logo.svg10. http://christopher-batey.blogspot.com.tr/2015/02/a-simple-mysql-to-cassandra-migration.html11. http://kkpradeeban.blogspot.com.tr/2012/06/moving-data-from-mysql-to-cassandra.html12. http://www.inspiredtechies.com/mysql-cassandra-db-migration/13. http://www.slideshare.net/GeorgiKodinov/bgoug-2014-developing-using-my-sql14. http://www.slideshare.net/gkodinov/bgoug15-json-support-in-mysql-57?qid=409fcf82-1139-498e-9f14-c4176d26212a&v

=default&b=&from_search=1

Page 20: Simple Way for MySQL to NoSQL

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 20

Questions ?

Page 21: Simple Way for MySQL to NoSQL

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 21

Safe Harbor StatementThe preceding is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.

Page 22: Simple Way for MySQL to NoSQL

Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 22