Slide 1

Slide 1 text

NoSQL Kyotaro Nonaka Technology Solutions Architect Oracle Corporation Japan November 25th, 2020

Slide 2

Slide 2 text

Copyright © 2020, Oracle and/or its affiliates 2

Slide 3

Slide 3 text

NoSQL Copyright © 2020, Oracle and/or its affiliates 3

Slide 4

Slide 4 text

4 Copyright © 2020, Oracle and/or its affiliates 1. 2. NoSQL 3. / 4. NoSQL

Slide 5

Slide 5 text

• • • EC • OCHaCafe 3 4 • Copyright © 2020, Oracle and/or its affiliates 5 @non_kyon

Slide 6

Slide 6 text

Copyright © 2020, Oracle and/or its affiliates 6 NoSQL RDBMS

Slide 7

Slide 7 text

RDB NoSQL RDB Copyright © 2020, Oracle and/or its affiliates 7

Slide 8

Slide 8 text

RDB ⇒RDB NoSQL ⇒ NoSQL RDB NoSQL Copyright © 2020, Oracle and/or its affiliates 8

Slide 9

Slide 9 text

RDB • / • / • • • 9 RDBMS NoSQL

Slide 10

Slide 10 text

SQL(RDB) NoSQL Not Only SQL • • 10 Document KVS key value key value key value NoSQL

Slide 11

Slide 11 text

NoSQL CAP CAP • 3 2 • • • Copyright © 2020, Oracle and/or its affiliates 11 C A P Availability( ) Consistency( ) (Partition Tolerance) CA Oracle, MySQL, Postgres etc… AP DynamoDB, Cassandra etc… CP MongoDB, HBase etc…

Slide 12

Slide 12 text

CA • (C) (A) • 2 (P) CP • (C) (P) • AP • (A) (P) • Copyright © 2020, Oracle and/or its affiliates 12 C A P Availability( ) Consistency( ) (Partition Tolerance) CA Oracle, MySQL, Postgres etc… AP DynamoDB, Cassandra etc… CP MongoDB, HBase etc…

Slide 13

Slide 13 text

NoSQL Copyright © 2020, Oracle and/or its affiliates 13

Slide 14

Slide 14 text

Copyright © 2020, Oracle and/or its affiliates 14

Slide 15

Slide 15 text

Copyright © 2020, Oracle and/or its affiliates 15 ※Redis Coherence …

Slide 16

Slide 16 text

• • / • SPOF CP ( CA ) • JSON-like • • • MongoDB Value • OSS OnP/IaaS • • Copyright © 2020, Oracle and/or its affiliates 16 database Collection Document Document Document RDB RDB

Slide 17

Slide 17 text

shard Copyright © 2020, Oracle and/or its affiliates 17 Load Balancer App mongos App mongos mongod mongod mongod mongod mongod mongod mongod mongod mongod shard1 shard3 shard2 1 2 3

Slide 18

Slide 18 text

Copyright © 2020, Oracle and/or its affiliates 18 Document(JSON ) - MongoDB - OnP/IaaS/Managed Atlas Sharding TTL GUI Compass( ) Robo 3T mongo-express

Slide 19

Slide 19 text

Copyright © 2020, Oracle and/or its affiliates 19 database collection query query

Slide 20

Slide 20 text

Document Document Document Document Copyright © 2020, Oracle and/or its affiliates 20 ..insert(<{Document}>) ..find() ..findOne() //1 ..update(,{$set: {: }}) ..remove()

Slide 21

Slide 21 text

• ( ) • GUI MongoDB Compass • • • • • Copyright © 2020, Oracle and/or its affiliates 21

Slide 22

Slide 22 text

• Facebook OSS NoSQL • KVS • CAP AP • Table Key Value Row • • • • SQL-like CQL • • • Copyright © 2020, Oracle and/or its affiliates 22 Keyspace Table Row Column1 Partition Key1 Value Column2 arr[v,…] Column3 map{k:v,…} Row Column1 Partition Key2 Value Column2 arr[v,…] Column3 map{k:v,…} Row Column1 Partition Key3 Value Column2 arr[v,…] Column3 map{k:v,…}

Slide 23

Slide 23 text

• Partition Key • • Partition Clustering Key Copyright © 2020, Oracle and/or its affiliates 23

Slide 24

Slide 24 text

Copyright © 2020, Oracle and/or its affiliates 24 KVS - CQL - - OnP/IaaS/Managed AWS (Amazon MCS) ( ) GUI Table Plus -

Slide 25

Slide 25 text

1. String CQL 2. QueryBuilder CQL 3. PreparedStatement CQL Copyright © 2020, Oracle and/or its affiliates 25

Slide 26

Slide 26 text

CQL • / (=, >, <, >=, <=) • IN • LIKE • ORDER BY • GROUP BY • LIMIT CQL • != • NOT • OR • IS NULL/ IS NOT NULL NULL • JOIN • OFFSET Copyright © 2020, Oracle and/or its affiliates 26 SQL

Slide 27

Slide 27 text

• • • • • • Copyright © 2020, Oracle and/or its affiliates 27 CQL RDB

Slide 28

Slide 28 text

• Oracle NoSQL • KVS Document(JSON) • CAP AP C • KVS • • (KVS)/ (JSON) • API/SQL • / • Oracle Copyright © 2020, Oracle and/or its affiliates 28 Integer (key) String (data) String (data) Json (data) num1 string1 string1 json1 num2 string2 string2 json2 num3 string3 string3 json3 num4 string4 string4 json4 DATA CAPACITY PROVISIONED STORAGE READ WRITE NoSQL Table

Slide 29

Slide 29 text

Copyright © 2020, Oracle and/or its affiliates 29 KVS/Document - API/SQL - JSON Managed - ACID order by, group by (table 5 ) GUI OCI OCI

Slide 30

Slide 30 text

Copyright © 2020, Oracle and/or its affiliates 30 (OCI IAM ) request

Slide 31

Slide 31 text

• • • Not Null/Nullable • JSON Document • API(NoSQL SDK/OCI SDK) + SQL • / / Copyright © 2020, Oracle and/or its affiliates 31 RDB

Slide 32

Slide 32 text

• Hadoop OSS • • MongoDB CP CA • Table Row Row key Column Qualifier Column Qualifier Column Family • • • • API • Copyright © 2020, Oracle and/or its affiliates 32 Namespace Table Row Key Column Family Column Family Qualifier Qualifier Qualifier Qualifier Row1 value1 value2 value3 value4 Row2 value5 value6 value7 value8 …

Slide 33

Slide 33 text

• Region: HBase Region • • Region Server: Region HDFS + • • Row Key, Column Family, Column Qualifier key Value Copyright © 2020, Oracle and/or its affiliates 33 Row Key CF1 CF2 CQ1 CQ2 CQ3 CQ4 Row1 value1 value2 value4 Row2 value5 value7 value8 Row Key CF CQ Value Row1 CF1 CQ1 value1 Row1 CF1 CQ2 value2 Row1 CF2 CQ4 value4 Row2 CF1 CQ1 value5 Row2 CF2 CQ3 value7 Row2 CF2 CQ4 value8 HDFS Region Server Region Region Server Region HBase Client

Slide 34

Slide 34 text

Copyright © 2020, Oracle and/or its affiliates 34 - API Apache Phoenix SQL OnP/IaaS - Region Server OCC: (Row Key > CF > CQ > Timestamp) GUI HUE: Hadoop HUE: Hadoop

Slide 35

Slide 35 text

Copyright © 2020, Oracle and/or its affiliates 35

Slide 36

Slide 36 text

• MySQL (V5.7~) • Document(JSON) • MySQL RDBMS CA • JSON • • API/SQL • • OCI Copyright © 2020, Oracle and/or its affiliates 36

Slide 37

Slide 37 text

Copyright © 2020, Oracle and/or its affiliates 37 Document - API/SQL - - OnP/IaaS/Managed - - MySQL ACID GUI MySQL Workbench( ) MySQL Workbench/OCI

Slide 38

Slide 38 text

• • • • • • X DevAPI: X API DocumentStore API • X DevAPI CRUD • Collection ⇒add(), find(), modify(), remove() • Table ⇒insert(), select(), update(), delete() Copyright © 2020, Oracle and/or its affiliates 38 SQL X DevAPI WHERE ->”$. ” =

Slide 39

Slide 39 text

• Oracle Database Document 1 • JSON • RDBMS CA • JSON • • • • SODA NoSQL API /SQL Copyright © 2020, Oracle and/or its affiliates 39 id col1 col2 json … … … … … … … … …

Slide 40

Slide 40 text

Copyright © 2020, Oracle and/or its affiliates 40 Document API/SQL - Managed Auto Scaling ACID JSON Search Index GUI SQL Developer Web Free Tier (ATP/ADW JSON ) OCI

Slide 41

Slide 41 text

• SQL Developer Web • SODA(NoSQL API) SQL • • • Copyright © 2020, Oracle and/or its affiliates 41 SQL MongoDB

Slide 42

Slide 42 text

Copyright © 2020, Oracle and/or its affiliates 42

Slide 43

Slide 43 text

• NoSQL • • • • • • • • • • Copyright © 2020, Oracle and/or its affiliates 43 : 表 書

Slide 44

Slide 44 text

Copyright © 2020, Oracle and/or its affiliates 44 MongoDB Aggregation Cassandra Oracle NoSQL HBase MySQL JSON_TABLE() AJD JSON_*AGG()

Slide 45

Slide 45 text

MongoDB Copyright © 2020, Oracle and/or its affiliates 45

Slide 46

Slide 46 text

• ( ) • GUI MongoDB Compass • • • • • Copyright © 2020, Oracle and/or its affiliates 46

Slide 47

Slide 47 text

JSON • • • • • • • • Copyright © 2020, Oracle and/or its affiliates 47 ID SNS_ID 0001 A 00001 0002 B 00002 { “entities”: { “hashtags”: [], “user_mentions”: [ “screen_name”: …, ] } } : SNS ID JSON 00001 json 00002 json

Slide 48

Slide 48 text

Copyright © 2020, Oracle and/or its affiliates 48 Document / MongoDB Cassandra Oracle NoSQL HBase MySQL AJD

Slide 49

Slide 49 text

Autonomous JSON Database Copyright © 2020, Oracle and/or its affiliates 49

Slide 50

Slide 50 text

• SQL Developer Web • SODA(NoSQL API) SQL • • • Copyright © 2020, Oracle and/or its affiliates 50 SQL MongoDB

Slide 51

Slide 51 text

NoSQL • • • • • • • Copyright © 2020, Oracle and/or its affiliates 51 ID SNS_ID 0001 A 00001 0002 B 00002 { “entities”: { “hashtags”: [], “user_mentions”: [ “screen_name”: …, ] } } : SNS ID JSON 00001 json 00002 json

Slide 52

Slide 52 text

Copyright © 2020, Oracle and/or its affiliates 52 MongoDB MongoDB Document Cassandra CQL KVS Oracle NoSQL API + SQL KVS/Document HBase API + (SQL) HDFS MySQL SQL MySQL Document AJD SQL (SODA) Oracle Database Document

Slide 53

Slide 53 text

MySQL Document Store Copyright © 2020, Oracle and/or its affiliates 53

Slide 54

Slide 54 text

• • • • • • X DevAPI: X API DocumentStore API • X DevAPI CRUD • Collection ⇒add(), find(), modify(), remove() • Table ⇒insert(), select(), update(), delete() Copyright © 2020, Oracle and/or its affiliates 54 SQL X DevAPI WHERE ->”$. ” =

Slide 55

Slide 55 text

• NoSQL • • • • • • • • Copyright © 2020, Oracle and/or its affiliates 55 NoSQL Web App

Slide 56

Slide 56 text

Copyright © 2020, Oracle and/or its affiliates 56 MongoDB Sharding Cassandra Oracle NoSQL Aggregate Expressions HBase Region MySQL AJD Auto Scaling

Slide 57

Slide 57 text

Cassandra Copyright © 2020, Oracle and/or its affiliates 57

Slide 58

Slide 58 text

• • • • • • Copyright © 2020, Oracle and/or its affiliates 58 CQL RDB

Slide 59

Slide 59 text

• NoSQL • • • • • • • • • Copyright © 2020, Oracle and/or its affiliates 59 front NoSQL Server backend

Slide 60

Slide 60 text

TTL MongoDB remove Cassandra Oracle NoSQL HBase MySQL AJD (Oracle Database) Copyright © 2020, Oracle and/or its affiliates 60

Slide 61

Slide 61 text

1. Oracle NoSQL Database(CS) 2. / • API Gateway Functions Object Storage HTML • Oracle NoSQL SessionID(TTL ) • • Copyright © 2020, Oracle and/or its affiliates 61 API Gateway user_id password ochacafe ochacafe1234 … user_id session_id ochacafe … HTML Functions

Slide 62

Slide 62 text

62 Copyright © 2020, Oracle and/or its affiliates

Slide 63

Slide 63 text

No content

Slide 64

Slide 64 text

Our mission is to help people see data in new ways, discover insights, unlock endless possibilities.