SlideShare una empresa de Scribd logo
1 de 49
Descargar para leer sin conexión
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal
MySQL Document Store를 활용한
NoSQL 개발
Sumi Ryu
MySQL Principal Solution Engineer
May 18, 2019
Presented with
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Safe Harbor Statement
The following 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.
Confidential – Oracle Internal
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
류수미
LGCNS : Java 개발 및 AA, Laf/J@Fin
SUN : Pre sales for Web, WAS, Java
EE, MySQL
Oracle : Pre sales for MySQL
sumi.ryu@oracle.com
Confidential – Oracle Internal
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
MySQL Presentations at OOW
4
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
5
NoSQL
JSON Documents
Schemaless JSON Collections
MySQL
Relational Tables
Foreign Keys
X Dev API
SQL
CRUD
MySQL
Document
Store
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
InnoDB
Cluster
6
App Servers with
MySQL Router
MySQL Group Replication
MySQL Shell
Setup, Manage,
Orchestrate
“High Availability becomes a core
first class feature of MySQL!”
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
NoSQL의 유혹
• 대부분의 사용자 / 회사는 어느 시점에서 NoSQL을 사용해 보도록 강요
받고 있음
• 그들은 RDBMS가 확장되지 않거나 개발자가 SQL 또는 다른 것을 좋아하지
않기 때문이라고 믿음
• 나중에서야 모든 제한사항을 알게 됨 (보통 처음부터 완전히 새로운
도구를 배울 수있는 충분한 시간이 없었기 때문에)
• 결과는 대개 다음 중 하나:
- JSON을 지원하는 일부 RDBMS 사용 (소규모 회사 / 사용자)
- 신뢰할 수 있는 스토리지 엔진 (예 : 우버의 Schemaless 와 Facebook 의
MyRocks/RocksDB ) 위에 NoSQL 인터페이스를 구현
Confidential – Oracle Internal
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
What is a Document Store
Database?
Confidential – Oracle Internal
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
What is Document Store Database?
A document store database (also known as a document-oriented database,
aggregate database, or simply document store or document database) is a
database that uses a document-oriented model to store data.
Document store databases store each record and its associated data within a
single document. Each document contains semi-structured data that can be
queried against using various query and analytics tools of the DBMS.
출처: https://database.guide/what-is-a-document-store-database/
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
예제
< XML > < JSON >
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
The MySQL Approach
• “관계형 데이터베이스와 문서 데이터베이스 간의 크로스오버”
• 다양한 언어 및 환경을 커버하는 공통 API
- C++, Java, .Net, Node.js, Python 및 PHP
- 새로운 MySQL Shell
- 관계형 테이블에 대한 쉬운 CRUD 작업 및 문서 데이터베이스 형태의 모음
• MySQL 재단에 기반
- InnoDB
- Replication
- ....
Confidential – Oracle Internal
MySQL Document-store
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
The MySQL Approach
• Docstore의 문서는 JSON으로 표현됨
- “JavaScript Object Notation”
- 크로스 플랫폼 직렬화 포멧 (웹 서비스에서 공통)
- ECMA-404 로 표준화됨 (http://json.org)
- MySQL에서 잘 지원됨
• 컬렉션 내에 여러 문서가 저장됨
- 기술적으로, 하나의 InnoDB 테이블임
- JSON 유형의 일반적인 하나의 컬럼
- 인덱스는 가상 컬럼으로 생성가능
Confidential – Oracle Internal
Documents and Collections
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
MySQL DocStore
• X Plugin
• X Protocol
• X DevAPI
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
MySQL DocStore Architecture
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
MySQL Document Store는 MySQL 5.7.12+, MySQL 8 용 플러그인으로
존재합니다.이 플러그인은 기본적으로 활성화되어 있으며, 기존 MySQL 8
서버에 전체 문서 저장 레이어를 제공합니다.
• 일반 MySQL 3306 대신 다른 포트 세트 사용
• 프로토콜 계층에서 Google protobuf 메시지를 사용
• 클라이언트로부터 DevAPI 요청을 받아들이고 코어 MySQL 엔진을
사용하여 요청을 처리
• https://dev.mysql.com/doc/refman/8.0/en/document-store.html
MySQL DocStore Components – X Plugin
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
The MySQL Approach
• X Plugin에 의해 구현 된 새로운 프로토콜
• Google 프로토 버퍼 기반 (향후 확장을 위한 유연성)
• 더 나은 콘텐츠 이해
- CRUD 표현(expression) 트리
- 파이프 라인 구문에 조건을 첨부할 수 있을 것에 대한 기대
- 바운드 파라미터
• 보안
- 기본적으로 SSL/TLS 제공
- 인증되지 않은 사용자에게 정보가 누출되지 않음(예 : MySQL 서버 버전)
Confidential – Oracle Internal
X Protocol
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
The MySQL Approach
Confidential – Oracle Internal
X Protocol
Mysqlx.Crud.Find {
collection { name: "collection_name", schema: "test" }
data_model: DOCUMENT
criteria {
type: OPERATOR
operator {
name: "=="
param {
type: IDENT,
identifier { name: "_id" }
}
param {
type: LITERAL,
literal {
type: V_STRING,
v_string: { value: "some_string" }
}
}
}
}
}
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
X DevAPI
문서 및 SQL을 위한 공통 API
Confidential – Oracle Internal
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
X DevAPI는 클러스터 형태의 MySQL 설정으로 구동되는 CRUD 기반 응용
프로그램을 쉽게 개발할 수있게 해주는 고급 데이터베이스 API입니다.
NoSQL 문서(document) 작업의 CRUD 사용 편의성에 초점을 맞추면서 전문가
수준의 제어와 원시 SQL을 포함한 고급 기능에 대한 액세스를 제공합니다.
• 가장 대중적인 프로그램 언어로 개발이 가능
• 문서와 관계형 테이블을 쿼리하는 강력한 방법을 제공
• SQL을 직접 실행할 수 있음
• 라우터를 통해 InnoDB 클러스터를 작업 할 수 있음
• 개발자 안내서 및 X DevAPI 참조 설명서는 다음에서 찾을 수 있음 :
- https://dev.mysql.com/doc/connector-python/en/
- https://dev.mysql.com/doc/x-devapi-userguide/en/
MySQL DocStore Components - DevAPI
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
특징
• 유연한 파라미터를 가진 능숙한 API
- 공통 표현식(common expression) 언어를 기반으로 한 쿼리 빌더
- 원시 SQL 인터페이스 또한 사용 가능
• 보안을 기본적으로 제공 (SSL/TLS 및 SHA256 인증)
• 트랜잭션, 세이브 포인트 및 행 잠금(row-locking)을 통한 데이터 일관성
• 속도 향상을위한 C / C ++, Python 확장
Confidential – Oracle Internal
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Fluent API
• 단일 진입점으로 부터 코드는 흘러감 – getSession()
• 코드는 가독성이 높아지고, 유지 보수하기 좋음 (심지어 테스트도 가능)
• 특수화되고 시맨틱 방법으로 캡슐화된 작업들
• 리펙터링 작업을 위한 멋진 발판
• 텍스트 편집기 (또는 IDE) 힌트 및 자동 완성을 위한 최고수준의 지원
• 더 작아진 SQL 인젝션 대상 영역
• 다른 프로그래밍 환경 간의 공통 표준
Confidential – Oracle Internal
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Flexible Parameters
• 대부분의 공개 API 메소드는 다음과 함께 동작:
- 다양한 개별 파라미터
- 파라미터의 단일 배열
- 이름이 붙여진 속성들을 가진 객체 (그것이 적용되는 곳)
Confidential – Oracle Internal
mysqlx.get_session("root:@localhost")
mysqlx.get_session({user: "root"})
collection.add({name: "foo"}).add({name: "bar"})
collection.add([{name: "foo"}, {name: "bar"}])
collection.find("name = :name").bind("name", "foo")
collection.find("name = :name").bind({name: "foo"})
collection.find().fields("foo", "bar")
collection.find().fields(["foo", "bar"])
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Expression Language
• SQL 하위 집합 (배우기 쉬우면서 여전히 강력 함)
• 표현적이고 인간이 읽을 수 있는
• 모든 공식 커넥터 구현 간의 공통 표준 (이식 가능하도록)
Confidential – Oracle Internal
# Python
collection 
.find("name = 'foo' AND age > 42") 
.fields("name", "age") 
.group_by("name", "age") 
.sort("name ASC", "age DESC") 
.limit(4) 
.offset(2) 
.execute()
// Java
collection
.find("name = 'foo' AND age > 42")
.fields("name", "age")
.groupBy("name", "age")
.sort("name ASC", "age DESC")
.limit(4)
.offset(2)
.execute()
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
SSL Modes
• 세션 생성시, TCP 연결에 대해 SSL / TLS는 기본적으로 활성화되어 있음
• 로컬 UNIX 소켓 연결을 사용하지 않도록 설정 (필요 없음)하면 더 빠름
• 추가적으로 서버 인증서 유효성 검사
• 옵션들을 on-demand 로 재정의 할 수 있음
Confidential – Oracle Internal
보안은 기본으로 제공
mysqlx.get_session(user="root", password="", ssl_mode=mysqlx.SSLMode.DISABLED)
mysqlx.get_session("mysqlx://root:@localhost?ssl-mode=DISABLED")
mysqlx.get_session(user="root", password="", ssl_mode=mysqlx.SSLMode.VERIFY_CA,
ssl_ca="/path/to/ca.pem")
mysqlx.get_session("mysqlx://root:@localhost?ssl-mode=VERIFY_CA&ssl-ca=/path/to/ca.pem")
mysqlx.get_session(user="root", password="", ssl_ca="/path/to/ca.pem",
ssl_key="/path/to/key.pem", ssl_cert="/path/to/cert.pem")
mysqlx.get_session("mysqlx://root:@localhost?ssl-ca=/path/to/ca.pem&"
"ssl-key=/path/to/key.pem&ssl-cert=/path/to/cert.pem")
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Authentication Mechanisms
• SHA-1 및 SHA-2 암호 해시
• 다음 서버 플러그인에 대한 인증 메커니즘 지원 :
- mysql_native_password
- sha256_password
- caching_sha2_password
Confidential – Oracle Internal
Secure by default (as well)
mysqlx.get_session(user="root", password="", auth=mysqlx.Auth.MYSQL41)
mysqlx.get_session("mysqlx://root:@localhost?auth=MYSQL41")
mysqlx.get_session(user="root", password="", auth=mysqlx.Auth.PLAIN)
mysqlx.get_session("mysqlx://root:@localhost?auth=PLAIN")
mysqlx.get_session(user="root", password="", auth=mysqlx.Auth.SHA256_MEMORY)
mysqlx.get_session("mysqlx://root:@localhost?auth=SHA256_MEMORY")
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Transactions and Savepoints
• 세션 범위에서 트랜잭션 생성, 커밋 또는 롤백
• 이들 트랜잭션의 중간 세이브포인트로 생성, 릴리스 또는 롤백
Session-level atomic operations
Confidential – Oracle Internal
session.start_transaction()
collection.add({"name": "Wilma", "age": 33}).execute()
assert(2 == collection.count())
session.set_savepoint("sp")
collection.add({"name": "Barney", "age": 42}).execute()
assert(3 == collection.count())
session.rollback_to("sp")
assert(2 == collection.count())
session.commit()
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Row Locking
• 문서를 읽는 쿼리는 동시 트랜잭션이있을 때 격리 수준을 결정할 수 있음
• 두 종류의 잠금(lock):
- Exclusive locks
- Shared locks
• 세가지 다른 동작 모드:
- DEFAULT
- NOWAIT
- SKIP_LOCKED
Document-level isolation
Confidential – Oracle Internal
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Raw SQL
• 구조화 된 분석 및 / 또는 보고의 경우, SQL은 항상 옵션임
• 다음과 같이 X DevAPI의 일부가 아닌 기능을 이용할 수 있음:
- 관계형 테이블에 대한 DDL 조작
- 키 제약 조건 관리
- JOIN 사용
Confidential – Oracle Internal
만물박사 (Jack of all trades)
# create a table
session.sql('CREATE TABLE foo (bar VARCHAR(3))').execute()
# add a unique constraint
session.sql('ALTER TABLE foo ADD COLUMN bar VARCHAR(3) GENERATED ALWAYS AS doc->>"$.bar" '
'VIRTUAL UNIQUE KEY NOT NULL').execute()
# execute a JOIN query
session.sql('SELECT DISTINCT t1.bar FROM foo t1 JOIN baz t2 ON t1.bar = t2.qux WHERE t1.qux = t2.quux').execute()
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
MySQL Connector/Python
Python으로 MySQL Document Store 활용해서 NoSQL 개발
Confidential – Oracle Internal
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Python
• 다양한 목적 (Web, GUI, 스크립팅, 데이터 과학, etc.)
• 객체 지향
• 해석되고(Interpreted) 동적으로 입력되는 언어
• 가독성 및 생산성에 중점을 둠
• batteries included
• 강한 내성
• 크로스 플랫폼
• C / C ++을 사용하여 확장 가능하도록 설계된 Extensible 은 많은 외부
라이브러리에 대한 액세스 허용
• GitHub에서 가장 인기있는 두 번째 언어
• 구현 : CPython, Jython, IronPython, PyPy
Confidential – Oracle Internal
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
MySQL Connector / Python은 X DevAPI 프로토콜 용 클라이언트
라이브러리를 제공하며 Python 프로그램이 Python Database API Specification
v2.0 (PEP 249)을 준수하는 API를 사용하여 MySQL 데이터베이스에 액세스 할
수 있도록함
• 동일한 패키지에서 MySQL classic 및 X DevAPI 프로토콜 지원
• 동일한 코드 기반을 사용하는 Python 2.7, 3.4, 3.5, 3.6 지원
• 속도 향상을위한 선택적인 C / C ++ Python 확장
• 프로토콜 압축 (MySQL 클래식 프로토콜)
• TCP / IP 소켓을 사용한 연결 및 Unix에서는 Unix 소켓을 사용
• SSL을 사용한 안전한 TCP / IP 연결
• Linux, Mac 및 Windows (또는 Python이 설치된 모든 플랫폼)에서 이용가능
MySQL DocStore Components - Connector/Python
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
• pip 를 이용해서 Connector / Python 설치 (권장 방법)
MySQL DocStore Components - Connector/Python
shell> pip install mysql-connector-python
설치
• 사용가능한 플랫폼 패키지
- Linux: RPM, DEB
- MacOS: DMG
- Windows: MSI Package
- Platform Independent: tar.gz
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
• 사전 준비사항
- gcc와 같은 C / C ++ 컴파일러
- Protobuf C++ (버전 3.0.0 이상)
- Python 개발 파일
- MySQL C API 라이브러리와 인터페이스하는 선택적인 C 확장팩을
컴파일하기위한 개발 파일을 포함해서 MySQL 서버가 설치됨
MySQL DocStore Components - Connector/Python
소스로 설치
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
• tar 아카이브로 Connector / Python을 설치하기 위해 최신 버전 (여기에서는
<version>으로 표시)을 다운로드
MySQL DocStore Components - Connector/Python
소스로 설치 (Linux)
shell> tar xzf mysql-connector-python-<version>.tar.gz
shell> cd mysql-connector-python-<version>.tar.gz
shell> python setup.py --with-protobuf-include-dir=<protobuf-include-dir> 
--with-protobuf-lib-dir=<protobuf-lib-dir> --with-protoc=<protoc-binary>
• MySQL C 클라이언트 라이브러리와 인터페이스하는 C 확장팩을 포함
시키기위해 --with-mysql-capi 옵션을 추가
shell> python setup.py --with-protobuf-include-dir=<protobuf-include-dir> 
--with-protobuf-lib-dir=<protobuf-lib-dir> --with-protoc=<protoc-binary> --with-mysql-capi=<mysql-capi>
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
MySQL DocStore Components - Connector/Python
Getting Started – 서버로 연결
import mysqlx
# Using a connection string
session = mysqlx.get_session(“root:myql@localhost:33060")
# Using kwargs
session = mysqlx.get_session(host="localhost", port=33060, user=“root", password=“myql")
# Using a Python dictionary
session = mysqlx.get_session({"host": "localhost", "port": 33060, "user": "root", "password": “myql"})
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
MySQL DocStore Components - Connector/Python
Getting Started – 스키마 및 콜렉션 생성
import mysqlx
# Connect to server
session = mysqlx.get_session(host="localhost", port=33060, user="root", password=“myql")
# Create a schema
schema = session.create_schema("test")
# Create a collection
collection = schema.create_collection("my_collection")
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
MySQL DocStore Components - Connector/Python
Getting Started – 데이타 삽입
# Use the collection "my_collection"
collection = schema.get_collection("my_collection")
# Add a document to "my_collection" using a Python dictionary
collection.add({"name": "Sakila", "age": 15}).execute()
# Add a document to "my_collection" using a JSON string
collection.add('{"name": "Sakila", "age": 15}').execute()
# Add a document to "my_collection" using a DbDoc object
doc = mysqlx.DbDoc({"name": "Sakila", "age": 15})
collection.add(doc).execute()
# Add a document to "my_collection" specifying an _id
collection.add({"_id": "1", "name": "Sakila", "age": 15}).execute()
# You can also add multiple documents at once
collection.add({"name": "Sakila", "age": 15},
{"name": "Jack", "age": 32},
{"name": "Clare", "age": 37}).execute()
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
MySQL DocStore Components - Connector/Python
Getting Started – 문서 찾기
# Use the collection "my_collection"
collection = schema.get_collection("my_collection")
# Specify which document to find with Collection.find()
result = collection.find("name like :param").bind("param", "S%").limit(1).execute()
doc = result.fetch_one() # Fetch one document
print(doc, type(doc))
# {"_id": "00005b48c75b0000000000000025", "age": 15, "name": "Sakila"} <class 'mysqlx.dbdoc.DbDoc'>
# Get all documents where age > 18
result = collection.find("age > 18").execute()
docs = result.fetch_all() # Fetch all documents
print(docs)
# [{'_id': '00005b48c75b000000000000002f', 'age': 32, 'name': 'Jack'},
# '_id': '00005b48c75b0000000000000030', 'age': 37, 'name': 'Clare'}]
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
MySQL DocStore Components - Connector/Python
Getting Started – 문서 수정
# Use the collection "my_collection"
collection = schema.get_collection("my_collection")
# Get document with name = 'Jack'
result = collection.find("name = 'Jack'").execute()
doc = result.fetch_one()
print(doc)
# {"_id": "00005b48c75b000000000000002f", "age": 32, "name": "Jack"}
# Set age to 21
result = collection.modify("name = 'Jack'").set("age", 21).execute()
result = collection.find("name = 'Jack'").execute()
doc = result.fetch_one()
print(doc)
# {"_id": "00005b48c75b000000000000002f", "age": 21, "name": "Jack"}
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
MySQL DocStore Components - Connector/Python
Getting Started – 문서 삭제
# Add documents
collection.add({"_id": 1, "name": "Sakila", "age": 15},
{"_id": 2, "name": "Jack", "age": 32},
{"_id": 3, "name": "Clare", "age": 37}).execute()
print("Total documents in collection:", collection.count())
# Total documents in collection: 3
collection.remove("_id = 1").execute()
print("Total documents in collection:", collection.count())
# Total documents in collection: 2
result = collection.find().execute()
docs = result.fetch_all()
print(docs)
# [{'_id': 2, 'age': 32, 'name': 'Jack'},
# {'_id': 3, 'age': 37, 'name': 'Clare'}]
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
MySQL DocStore Components - Connector/Python
Getting Started – 인덱스 생성
# Create index on 'age'
collection.create_index("index_age", {"fields": [{"field": "age",
"type": "INT"}],
"type":"INDEX"})
# {"fields": [{"field": member_path,
# "type": member_type,
# "required": member_required,
# "collation": collation,
# "options": options,
# "srid": srid},
# # {... more members,
# # repeated as many times
# # as needed}
# ],
# "type": type}
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
데모 환경
• VM : 64-bit Oracle Linux Server – 7.6(minimal installation)
• MySQL 8.0.16
• MySQL Shell 8.0.16
• X Protocol(Port:33060)이용하여 서버접속
• Collection 생성
• Document 추가
• CRUD/SQL 실행
• 트랜젝션 실행
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
33060포트로 서버 접속
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Collection생성, JSON도큐먼트 추가
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
CRUD함수: add(),find()
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Collection에 대해 JOIN, Window함수 이용
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Collection에 대해 인덱스 추가
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |
Collection에 대한 트랜젝션 지원
Thank You!
Copyright © 2018, Oracle and/or its affiliates. All rights reserved.

Más contenido relacionado

La actualidad más candente

Db2をAWS上に構築する際のヒント&TIPS 2019年7月版
Db2をAWS上に構築する際のヒント&TIPS 2019年7月版Db2をAWS上に構築する際のヒント&TIPS 2019年7月版
Db2をAWS上に構築する際のヒント&TIPS 2019年7月版Akira Shimosako
 
How to Use EXAchk Effectively to Manage Exadata Environments
How to Use EXAchk Effectively to Manage Exadata EnvironmentsHow to Use EXAchk Effectively to Manage Exadata Environments
How to Use EXAchk Effectively to Manage Exadata EnvironmentsSandesh Rao
 
[Oracle DBA & Developer Day 2014] しばちょう先生による特別講義! RMANの運用と高速化チューニング
[Oracle DBA & Developer Day 2014] しばちょう先生による特別講義! RMANの運用と高速化チューニング[Oracle DBA & Developer Day 2014] しばちょう先生による特別講義! RMANの運用と高速化チューニング
[Oracle DBA & Developer Day 2014] しばちょう先生による特別講義! RMANの運用と高速化チューニングオラクルエンジニア通信
 
決済サービスのSpring Bootのバージョンを2系に上げた話
決済サービスのSpring Bootのバージョンを2系に上げた話決済サービスのSpring Bootのバージョンを2系に上げた話
決済サービスのSpring Bootのバージョンを2系に上げた話Ryosuke Uchitate
 
Oracle運用Tips大放出! ~ RAC環境のRMANのパラレル化を極める 編 ~ @2016-02-23 JPOUG
Oracle運用Tips大放出! ~ RAC環境のRMANのパラレル化を極める 編 ~ @2016-02-23 JPOUG Oracle運用Tips大放出! ~ RAC環境のRMANのパラレル化を極める 編 ~ @2016-02-23 JPOUG
Oracle運用Tips大放出! ~ RAC環境のRMANのパラレル化を極める 編 ~ @2016-02-23 JPOUG Yuya Ohta
 
Spring Bootで変わる Javaアプリ開発! #jsug
Spring Bootで変わる Javaアプリ開発! #jsugSpring Bootで変わる Javaアプリ開発! #jsug
Spring Bootで変わる Javaアプリ開発! #jsugToshiaki Maki
 
Advanced RAC troubleshooting: Network
Advanced RAC troubleshooting: NetworkAdvanced RAC troubleshooting: Network
Advanced RAC troubleshooting: NetworkRiyaj Shamsudeen
 
深入淺出 Amazon Database Migration Service
深入淺出 Amazon Database Migration Service 深入淺出 Amazon Database Migration Service
深入淺出 Amazon Database Migration Service Amazon Web Services
 
Oracle Cloud Infrastructure:2021年6月度サービス・アップデート
Oracle Cloud Infrastructure:2021年6月度サービス・アップデートOracle Cloud Infrastructure:2021年6月度サービス・アップデート
Oracle Cloud Infrastructure:2021年6月度サービス・アップデートオラクルエンジニア通信
 
Spring 5でSpring Testのここが変わる_公開版
Spring 5でSpring Testのここが変わる_公開版Spring 5でSpring Testのここが変わる_公開版
Spring 5でSpring Testのここが変わる_公開版Yuichi Hasegawa
 
Weblogic 12c installation (oracle linux)
Weblogic 12c installation (oracle linux)Weblogic 12c installation (oracle linux)
Weblogic 12c installation (oracle linux)Osama Mustafa
 
Spring Boot の Web アプリケーションを Docker に載せて AWS ECS で動かしている話
Spring Boot の Web アプリケーションを Docker に載せて AWS ECS で動かしている話Spring Boot の Web アプリケーションを Docker に載せて AWS ECS で動かしている話
Spring Boot の Web アプリケーションを Docker に載せて AWS ECS で動かしている話JustSystems Corporation
 
バックアップ時の問題から学んだDBエンジニアに必要なスキルとは
バックアップ時の問題から学んだDBエンジニアに必要なスキルとはバックアップ時の問題から学んだDBエンジニアに必要なスキルとは
バックアップ時の問題から学んだDBエンジニアに必要なスキルとはTakeshiYamamoto2049
 
[フルバージョン] WebLogic Server for OCI 活用のご提案 - TCO削減とシステムのモダナイズ
[フルバージョン] WebLogic Server for OCI 活用のご提案 - TCO削減とシステムのモダナイズ[フルバージョン] WebLogic Server for OCI 活用のご提案 - TCO削減とシステムのモダナイズ
[フルバージョン] WebLogic Server for OCI 活用のご提案 - TCO削減とシステムのモダナイズオラクルエンジニア通信
 
乗っ取れコンテナ!!開発者から見たコンテナセキュリティの考え方(CloudNative Days Tokyo 2021 発表資料)
乗っ取れコンテナ!!開発者から見たコンテナセキュリティの考え方(CloudNative Days Tokyo 2021 発表資料)乗っ取れコンテナ!!開発者から見たコンテナセキュリティの考え方(CloudNative Days Tokyo 2021 発表資料)
乗っ取れコンテナ!!開発者から見たコンテナセキュリティの考え方(CloudNative Days Tokyo 2021 発表資料)NTT DATA Technology & Innovation
 
今こそ知りたいSpring Batch(Spring Fest 2020講演資料)
今こそ知りたいSpring Batch(Spring Fest 2020講演資料)今こそ知りたいSpring Batch(Spring Fest 2020講演資料)
今こそ知りたいSpring Batch(Spring Fest 2020講演資料)NTT DATA Technology & Innovation
 
Oracle Enterprise Manager
Oracle Enterprise ManagerOracle Enterprise Manager
Oracle Enterprise ManagerBob Rhubart
 

La actualidad más candente (20)

Db2をAWS上に構築する際のヒント&TIPS 2019年7月版
Db2をAWS上に構築する際のヒント&TIPS 2019年7月版Db2をAWS上に構築する際のヒント&TIPS 2019年7月版
Db2をAWS上に構築する際のヒント&TIPS 2019年7月版
 
How to Use EXAchk Effectively to Manage Exadata Environments
How to Use EXAchk Effectively to Manage Exadata EnvironmentsHow to Use EXAchk Effectively to Manage Exadata Environments
How to Use EXAchk Effectively to Manage Exadata Environments
 
[Oracle DBA & Developer Day 2014] しばちょう先生による特別講義! RMANの運用と高速化チューニング
[Oracle DBA & Developer Day 2014] しばちょう先生による特別講義! RMANの運用と高速化チューニング[Oracle DBA & Developer Day 2014] しばちょう先生による特別講義! RMANの運用と高速化チューニング
[Oracle DBA & Developer Day 2014] しばちょう先生による特別講義! RMANの運用と高速化チューニング
 
決済サービスのSpring Bootのバージョンを2系に上げた話
決済サービスのSpring Bootのバージョンを2系に上げた話決済サービスのSpring Bootのバージョンを2系に上げた話
決済サービスのSpring Bootのバージョンを2系に上げた話
 
Oracle運用Tips大放出! ~ RAC環境のRMANのパラレル化を極める 編 ~ @2016-02-23 JPOUG
Oracle運用Tips大放出! ~ RAC環境のRMANのパラレル化を極める 編 ~ @2016-02-23 JPOUG Oracle運用Tips大放出! ~ RAC環境のRMANのパラレル化を極める 編 ~ @2016-02-23 JPOUG
Oracle運用Tips大放出! ~ RAC環境のRMANのパラレル化を極める 編 ~ @2016-02-23 JPOUG
 
Spring Bootで変わる Javaアプリ開発! #jsug
Spring Bootで変わる Javaアプリ開発! #jsugSpring Bootで変わる Javaアプリ開発! #jsug
Spring Bootで変わる Javaアプリ開発! #jsug
 
Advanced RAC troubleshooting: Network
Advanced RAC troubleshooting: NetworkAdvanced RAC troubleshooting: Network
Advanced RAC troubleshooting: Network
 
深入淺出 Amazon Database Migration Service
深入淺出 Amazon Database Migration Service 深入淺出 Amazon Database Migration Service
深入淺出 Amazon Database Migration Service
 
Oracle Cloud Infrastructure:2021年6月度サービス・アップデート
Oracle Cloud Infrastructure:2021年6月度サービス・アップデートOracle Cloud Infrastructure:2021年6月度サービス・アップデート
Oracle Cloud Infrastructure:2021年6月度サービス・アップデート
 
Spring 5でSpring Testのここが変わる_公開版
Spring 5でSpring Testのここが変わる_公開版Spring 5でSpring Testのここが変わる_公開版
Spring 5でSpring Testのここが変わる_公開版
 
DataGuard体験記
DataGuard体験記DataGuard体験記
DataGuard体験記
 
Weblogic 12c installation (oracle linux)
Weblogic 12c installation (oracle linux)Weblogic 12c installation (oracle linux)
Weblogic 12c installation (oracle linux)
 
Spring Boot の Web アプリケーションを Docker に載せて AWS ECS で動かしている話
Spring Boot の Web アプリケーションを Docker に載せて AWS ECS で動かしている話Spring Boot の Web アプリケーションを Docker に載せて AWS ECS で動かしている話
Spring Boot の Web アプリケーションを Docker に載せて AWS ECS で動かしている話
 
バックアップ時の問題から学んだDBエンジニアに必要なスキルとは
バックアップ時の問題から学んだDBエンジニアに必要なスキルとはバックアップ時の問題から学んだDBエンジニアに必要なスキルとは
バックアップ時の問題から学んだDBエンジニアに必要なスキルとは
 
[フルバージョン] WebLogic Server for OCI 活用のご提案 - TCO削減とシステムのモダナイズ
[フルバージョン] WebLogic Server for OCI 活用のご提案 - TCO削減とシステムのモダナイズ[フルバージョン] WebLogic Server for OCI 活用のご提案 - TCO削減とシステムのモダナイズ
[フルバージョン] WebLogic Server for OCI 活用のご提案 - TCO削減とシステムのモダナイズ
 
Exadata X8M-2 KVM仮想化ベストプラクティス
Exadata X8M-2 KVM仮想化ベストプラクティスExadata X8M-2 KVM仮想化ベストプラクティス
Exadata X8M-2 KVM仮想化ベストプラクティス
 
Oracle Analytics Cloud のご紹介【2021年3月版】
Oracle Analytics Cloud のご紹介【2021年3月版】Oracle Analytics Cloud のご紹介【2021年3月版】
Oracle Analytics Cloud のご紹介【2021年3月版】
 
乗っ取れコンテナ!!開発者から見たコンテナセキュリティの考え方(CloudNative Days Tokyo 2021 発表資料)
乗っ取れコンテナ!!開発者から見たコンテナセキュリティの考え方(CloudNative Days Tokyo 2021 発表資料)乗っ取れコンテナ!!開発者から見たコンテナセキュリティの考え方(CloudNative Days Tokyo 2021 発表資料)
乗っ取れコンテナ!!開発者から見たコンテナセキュリティの考え方(CloudNative Days Tokyo 2021 発表資料)
 
今こそ知りたいSpring Batch(Spring Fest 2020講演資料)
今こそ知りたいSpring Batch(Spring Fest 2020講演資料)今こそ知りたいSpring Batch(Spring Fest 2020講演資料)
今こそ知りたいSpring Batch(Spring Fest 2020講演資料)
 
Oracle Enterprise Manager
Oracle Enterprise ManagerOracle Enterprise Manager
Oracle Enterprise Manager
 

Similar a MySQL Document Store를 활용한 NoSQL 개발

Mysql on windows_kr_20170221
Mysql on windows_kr_20170221Mysql on windows_kr_20170221
Mysql on windows_kr_20170221Sumi Ryu
 
[오픈소스컨설팅]이기종 WAS 클러스터링 솔루션- Athena Dolly
[오픈소스컨설팅]이기종 WAS 클러스터링 솔루션- Athena Dolly[오픈소스컨설팅]이기종 WAS 클러스터링 솔루션- Athena Dolly
[오픈소스컨설팅]이기종 WAS 클러스터링 솔루션- Athena DollyJi-Woong Choi
 
sparklyr을 활용한 R 분산 처리
sparklyr을 활용한 R 분산 처리sparklyr을 활용한 R 분산 처리
sparklyr을 활용한 R 분산 처리Sang-bae Lim
 
MySQL Administrator 2021 - 네오클로바
MySQL Administrator 2021 - 네오클로바MySQL Administrator 2021 - 네오클로바
MySQL Administrator 2021 - 네오클로바NeoClova
 
Cloud for Kubernetes : Session2
Cloud for Kubernetes : Session2Cloud for Kubernetes : Session2
Cloud for Kubernetes : Session2WhaTap Labs
 
Cloudera session seoul - Spark bootcamp
Cloudera session seoul - Spark bootcampCloudera session seoul - Spark bootcamp
Cloudera session seoul - Spark bootcampSang-bae Lim
 
On premise db &amp; cloud database
On premise db &amp; cloud databaseOn premise db &amp; cloud database
On premise db &amp; cloud databaseOracle Korea
 
오라클 클라우드와 함께 떠나는 마이크로서비스 아키텍처로의 여행 V3
오라클 클라우드와 함께 떠나는 마이크로서비스 아키텍처로의 여행 V3오라클 클라우드와 함께 떠나는 마이크로서비스 아키텍처로의 여행 V3
오라클 클라우드와 함께 떠나는 마이크로서비스 아키텍처로의 여행 V3Heejong Lee
 
[Pgday.Seoul 2018] replacing oracle with edb postgres
[Pgday.Seoul 2018] replacing oracle with edb postgres[Pgday.Seoul 2018] replacing oracle with edb postgres
[Pgday.Seoul 2018] replacing oracle with edb postgresPgDay.Seoul
 
Oracle Blockchain Cloud 소개 - 콘솔 화면 포함
Oracle Blockchain Cloud 소개 - 콘솔 화면 포함Oracle Blockchain Cloud 소개 - 콘솔 화면 포함
Oracle Blockchain Cloud 소개 - 콘솔 화면 포함Mee Nam Lee
 
[OpenInfra Days Korea 2018] (Track 1) 커뮤니티 오픈스택 패키징 도입 전략 및 구현사례 발표
[OpenInfra Days Korea 2018] (Track 1) 커뮤니티 오픈스택 패키징 도입 전략 및 구현사례 발표[OpenInfra Days Korea 2018] (Track 1) 커뮤니티 오픈스택 패키징 도입 전략 및 구현사례 발표
[OpenInfra Days Korea 2018] (Track 1) 커뮤니티 오픈스택 패키징 도입 전략 및 구현사례 발표OpenStack Korea Community
 
AWS BigData 전략과 관련 AWS 서비스 이해하기
AWS BigData 전략과 관련 AWS 서비스 이해하기AWS BigData 전략과 관련 AWS 서비스 이해하기
AWS BigData 전략과 관련 AWS 서비스 이해하기BESPIN GLOBAL
 
Oracle Application Performance Monitoring Cloud Service 소개
Oracle Application Performance Monitoring Cloud Service 소개Oracle Application Performance Monitoring Cloud Service 소개
Oracle Application Performance Monitoring Cloud Service 소개Mee Nam Lee
 
SOSCON 2017 - Backend.AI
SOSCON 2017 - Backend.AISOSCON 2017 - Backend.AI
SOSCON 2017 - Backend.AIJoongi Kim
 
Backend.AI: 오픈소스 머신러닝 인프라 프레임워크
Backend.AI: 오픈소스 머신러닝 인프라 프레임워크Backend.AI: 오픈소스 머신러닝 인프라 프레임워크
Backend.AI: 오픈소스 머신러닝 인프라 프레임워크Jeongkyu Shin
 
[오픈소스컨설팅]오픈소스 클라우드 개발플랫폼_및_Docker의_이해_v1
[오픈소스컨설팅]오픈소스 클라우드 개발플랫폼_및_Docker의_이해_v1[오픈소스컨설팅]오픈소스 클라우드 개발플랫폼_및_Docker의_이해_v1
[오픈소스컨설팅]오픈소스 클라우드 개발플랫폼_및_Docker의_이해_v1Ji-Woong Choi
 
[OpenStack Days Korea 2016] Track4 - 해외 사례로 보는 OpenStack Billing System
[OpenStack Days Korea 2016] Track4 - 해외 사례로 보는 OpenStack Billing System[OpenStack Days Korea 2016] Track4 - 해외 사례로 보는 OpenStack Billing System
[OpenStack Days Korea 2016] Track4 - 해외 사례로 보는 OpenStack Billing SystemOpenStack Korea Community
 
해외 사례로 보는 Billing for OpenStack Solution
해외 사례로 보는 Billing for OpenStack Solution해외 사례로 보는 Billing for OpenStack Solution
해외 사례로 보는 Billing for OpenStack SolutionNalee Jang
 
모바일 게임과 앱을 위한 오픈소스 게임서버 엔진 프로젝트 CloudBread 프로젝트
모바일 게임과 앱을 위한 오픈소스 게임서버 엔진 프로젝트 CloudBread 프로젝트모바일 게임과 앱을 위한 오픈소스 게임서버 엔진 프로젝트 CloudBread 프로젝트
모바일 게임과 앱을 위한 오픈소스 게임서버 엔진 프로젝트 CloudBread 프로젝트Dae Kim
 
클라우드 상에서의 효율적인 데이터 보관 방법 - 김민형 클라우드 솔루션 아키텍트
클라우드 상에서의 효율적인 데이터 보관 방법 - 김민형 클라우드 솔루션 아키텍트클라우드 상에서의 효율적인 데이터 보관 방법 - 김민형 클라우드 솔루션 아키텍트
클라우드 상에서의 효율적인 데이터 보관 방법 - 김민형 클라우드 솔루션 아키텍트NAVER CLOUD PLATFORMㅣ네이버 클라우드 플랫폼
 

Similar a MySQL Document Store를 활용한 NoSQL 개발 (20)

Mysql on windows_kr_20170221
Mysql on windows_kr_20170221Mysql on windows_kr_20170221
Mysql on windows_kr_20170221
 
[오픈소스컨설팅]이기종 WAS 클러스터링 솔루션- Athena Dolly
[오픈소스컨설팅]이기종 WAS 클러스터링 솔루션- Athena Dolly[오픈소스컨설팅]이기종 WAS 클러스터링 솔루션- Athena Dolly
[오픈소스컨설팅]이기종 WAS 클러스터링 솔루션- Athena Dolly
 
sparklyr을 활용한 R 분산 처리
sparklyr을 활용한 R 분산 처리sparklyr을 활용한 R 분산 처리
sparklyr을 활용한 R 분산 처리
 
MySQL Administrator 2021 - 네오클로바
MySQL Administrator 2021 - 네오클로바MySQL Administrator 2021 - 네오클로바
MySQL Administrator 2021 - 네오클로바
 
Cloud for Kubernetes : Session2
Cloud for Kubernetes : Session2Cloud for Kubernetes : Session2
Cloud for Kubernetes : Session2
 
Cloudera session seoul - Spark bootcamp
Cloudera session seoul - Spark bootcampCloudera session seoul - Spark bootcamp
Cloudera session seoul - Spark bootcamp
 
On premise db &amp; cloud database
On premise db &amp; cloud databaseOn premise db &amp; cloud database
On premise db &amp; cloud database
 
오라클 클라우드와 함께 떠나는 마이크로서비스 아키텍처로의 여행 V3
오라클 클라우드와 함께 떠나는 마이크로서비스 아키텍처로의 여행 V3오라클 클라우드와 함께 떠나는 마이크로서비스 아키텍처로의 여행 V3
오라클 클라우드와 함께 떠나는 마이크로서비스 아키텍처로의 여행 V3
 
[Pgday.Seoul 2018] replacing oracle with edb postgres
[Pgday.Seoul 2018] replacing oracle with edb postgres[Pgday.Seoul 2018] replacing oracle with edb postgres
[Pgday.Seoul 2018] replacing oracle with edb postgres
 
Oracle Blockchain Cloud 소개 - 콘솔 화면 포함
Oracle Blockchain Cloud 소개 - 콘솔 화면 포함Oracle Blockchain Cloud 소개 - 콘솔 화면 포함
Oracle Blockchain Cloud 소개 - 콘솔 화면 포함
 
[OpenInfra Days Korea 2018] (Track 1) 커뮤니티 오픈스택 패키징 도입 전략 및 구현사례 발표
[OpenInfra Days Korea 2018] (Track 1) 커뮤니티 오픈스택 패키징 도입 전략 및 구현사례 발표[OpenInfra Days Korea 2018] (Track 1) 커뮤니티 오픈스택 패키징 도입 전략 및 구현사례 발표
[OpenInfra Days Korea 2018] (Track 1) 커뮤니티 오픈스택 패키징 도입 전략 및 구현사례 발표
 
AWS BigData 전략과 관련 AWS 서비스 이해하기
AWS BigData 전략과 관련 AWS 서비스 이해하기AWS BigData 전략과 관련 AWS 서비스 이해하기
AWS BigData 전략과 관련 AWS 서비스 이해하기
 
Oracle Application Performance Monitoring Cloud Service 소개
Oracle Application Performance Monitoring Cloud Service 소개Oracle Application Performance Monitoring Cloud Service 소개
Oracle Application Performance Monitoring Cloud Service 소개
 
SOSCON 2017 - Backend.AI
SOSCON 2017 - Backend.AISOSCON 2017 - Backend.AI
SOSCON 2017 - Backend.AI
 
Backend.AI: 오픈소스 머신러닝 인프라 프레임워크
Backend.AI: 오픈소스 머신러닝 인프라 프레임워크Backend.AI: 오픈소스 머신러닝 인프라 프레임워크
Backend.AI: 오픈소스 머신러닝 인프라 프레임워크
 
[오픈소스컨설팅]오픈소스 클라우드 개발플랫폼_및_Docker의_이해_v1
[오픈소스컨설팅]오픈소스 클라우드 개발플랫폼_및_Docker의_이해_v1[오픈소스컨설팅]오픈소스 클라우드 개발플랫폼_및_Docker의_이해_v1
[오픈소스컨설팅]오픈소스 클라우드 개발플랫폼_및_Docker의_이해_v1
 
[OpenStack Days Korea 2016] Track4 - 해외 사례로 보는 OpenStack Billing System
[OpenStack Days Korea 2016] Track4 - 해외 사례로 보는 OpenStack Billing System[OpenStack Days Korea 2016] Track4 - 해외 사례로 보는 OpenStack Billing System
[OpenStack Days Korea 2016] Track4 - 해외 사례로 보는 OpenStack Billing System
 
해외 사례로 보는 Billing for OpenStack Solution
해외 사례로 보는 Billing for OpenStack Solution해외 사례로 보는 Billing for OpenStack Solution
해외 사례로 보는 Billing for OpenStack Solution
 
모바일 게임과 앱을 위한 오픈소스 게임서버 엔진 프로젝트 CloudBread 프로젝트
모바일 게임과 앱을 위한 오픈소스 게임서버 엔진 프로젝트 CloudBread 프로젝트모바일 게임과 앱을 위한 오픈소스 게임서버 엔진 프로젝트 CloudBread 프로젝트
모바일 게임과 앱을 위한 오픈소스 게임서버 엔진 프로젝트 CloudBread 프로젝트
 
클라우드 상에서의 효율적인 데이터 보관 방법 - 김민형 클라우드 솔루션 아키텍트
클라우드 상에서의 효율적인 데이터 보관 방법 - 김민형 클라우드 솔루션 아키텍트클라우드 상에서의 효율적인 데이터 보관 방법 - 김민형 클라우드 솔루션 아키텍트
클라우드 상에서의 효율적인 데이터 보관 방법 - 김민형 클라우드 솔루션 아키텍트
 

Más de Oracle Korea

Oracle Blockchain Platform_Wonjo Yoo
Oracle Blockchain Platform_Wonjo YooOracle Blockchain Platform_Wonjo Yoo
Oracle Blockchain Platform_Wonjo YooOracle Korea
 
Oracle Blockchain_JaeHo Park_CTO
Oracle Blockchain_JaeHo Park_CTOOracle Blockchain_JaeHo Park_CTO
Oracle Blockchain_JaeHo Park_CTOOracle Korea
 
Oracle cloud data interface
Oracle cloud data interfaceOracle cloud data interface
Oracle cloud data interfaceOracle Korea
 
Spring boot microservice metrics monitoring
Spring boot   microservice metrics monitoringSpring boot   microservice metrics monitoring
Spring boot microservice metrics monitoringOracle Korea
 
Opentracing jaeger
Opentracing jaegerOpentracing jaeger
Opentracing jaegerOracle Korea
 
Which Questions We Should Have
Which Questions We Should HaveWhich Questions We Should Have
Which Questions We Should HaveOracle Korea
 
Enterprise Postgres
Enterprise PostgresEnterprise Postgres
Enterprise PostgresOracle Korea
 
API Design Principles Essential 
API Design Principles Essential API Design Principles Essential 
API Design Principles Essential Oracle Korea
 
SpringBoot and Spring Cloud Service for MSA
SpringBoot and Spring Cloud Service for MSASpringBoot and Spring Cloud Service for MSA
SpringBoot and Spring Cloud Service for MSAOracle Korea
 
CI/CD 기반의 Microservice 개발
 CI/CD 기반의 Microservice 개발 CI/CD 기반의 Microservice 개발
CI/CD 기반의 Microservice 개발Oracle Korea
 
kubernetes from beginner to advanced
kubernetes  from beginner to advancedkubernetes  from beginner to advanced
kubernetes from beginner to advancedOracle Korea
 
Cloud Native 자바 플랫폼: Graalvm Overview
Cloud Native 자바 플랫폼: Graalvm OverviewCloud Native 자바 플랫폼: Graalvm Overview
Cloud Native 자바 플랫폼: Graalvm OverviewOracle Korea
 
Eclipse MicroProfile 과 Microservice Java framework – Helidon
Eclipse MicroProfile 과 Microservice Java framework – HelidonEclipse MicroProfile 과 Microservice Java framework – Helidon
Eclipse MicroProfile 과 Microservice Java framework – HelidonOracle Korea
 
times ten in-memory database for extreme performance
times ten in-memory database for extreme performancetimes ten in-memory database for extreme performance
times ten in-memory database for extreme performanceOracle Korea
 
[Main Session] 카프카, 데이터 플랫폼의 최강자
[Main Session] 카프카, 데이터 플랫폼의 최강자[Main Session] 카프카, 데이터 플랫폼의 최강자
[Main Session] 카프카, 데이터 플랫폼의 최강자Oracle Korea
 
[Demo session] 관리형 Kafka 서비스 - Oracle Event Hub Service
[Demo session] 관리형 Kafka 서비스 - Oracle Event Hub Service[Demo session] 관리형 Kafka 서비스 - Oracle Event Hub Service
[Demo session] 관리형 Kafka 서비스 - Oracle Event Hub ServiceOracle Korea
 
[Hands-on] CQRS(Command Query Responsibility Segregation) 와 Event Sourcing 패턴 실습
[Hands-on] CQRS(Command Query Responsibility Segregation) 와 Event Sourcing 패턴 실습[Hands-on] CQRS(Command Query Responsibility Segregation) 와 Event Sourcing 패턴 실습
[Hands-on] CQRS(Command Query Responsibility Segregation) 와 Event Sourcing 패턴 실습Oracle Korea
 
[Main Session] 보안을 고려한 애플리케이션 개발 공정 및 실무적 수행 방법 소개
[Main Session] 보안을 고려한 애플리케이션 개발 공정 및 실무적 수행 방법 소개 [Main Session] 보안을 고려한 애플리케이션 개발 공정 및 실무적 수행 방법 소개
[Main Session] 보안을 고려한 애플리케이션 개발 공정 및 실무적 수행 방법 소개 Oracle Korea
 

Más de Oracle Korea (20)

Oracle Blockchain Platform_Wonjo Yoo
Oracle Blockchain Platform_Wonjo YooOracle Blockchain Platform_Wonjo Yoo
Oracle Blockchain Platform_Wonjo Yoo
 
Oracle Blockchain_JaeHo Park_CTO
Oracle Blockchain_JaeHo Park_CTOOracle Blockchain_JaeHo Park_CTO
Oracle Blockchain_JaeHo Park_CTO
 
Oracle cloud data interface
Oracle cloud data interfaceOracle cloud data interface
Oracle cloud data interface
 
Spring boot microservice metrics monitoring
Spring boot   microservice metrics monitoringSpring boot   microservice metrics monitoring
Spring boot microservice metrics monitoring
 
Opentracing jaeger
Opentracing jaegerOpentracing jaeger
Opentracing jaeger
 
Which Questions We Should Have
Which Questions We Should HaveWhich Questions We Should Have
Which Questions We Should Have
 
Oracle NoSQL
Oracle NoSQLOracle NoSQL
Oracle NoSQL
 
Enterprise Postgres
Enterprise PostgresEnterprise Postgres
Enterprise Postgres
 
API Design Principles Essential 
API Design Principles Essential API Design Principles Essential 
API Design Principles Essential 
 
SpringBoot and Spring Cloud Service for MSA
SpringBoot and Spring Cloud Service for MSASpringBoot and Spring Cloud Service for MSA
SpringBoot and Spring Cloud Service for MSA
 
CI/CD 기반의 Microservice 개발
 CI/CD 기반의 Microservice 개발 CI/CD 기반의 Microservice 개발
CI/CD 기반의 Microservice 개발
 
kubernetes from beginner to advanced
kubernetes  from beginner to advancedkubernetes  from beginner to advanced
kubernetes from beginner to advanced
 
OpenJDK & Graalvm
OpenJDK & GraalvmOpenJDK & Graalvm
OpenJDK & Graalvm
 
Cloud Native 자바 플랫폼: Graalvm Overview
Cloud Native 자바 플랫폼: Graalvm OverviewCloud Native 자바 플랫폼: Graalvm Overview
Cloud Native 자바 플랫폼: Graalvm Overview
 
Eclipse MicroProfile 과 Microservice Java framework – Helidon
Eclipse MicroProfile 과 Microservice Java framework – HelidonEclipse MicroProfile 과 Microservice Java framework – Helidon
Eclipse MicroProfile 과 Microservice Java framework – Helidon
 
times ten in-memory database for extreme performance
times ten in-memory database for extreme performancetimes ten in-memory database for extreme performance
times ten in-memory database for extreme performance
 
[Main Session] 카프카, 데이터 플랫폼의 최강자
[Main Session] 카프카, 데이터 플랫폼의 최강자[Main Session] 카프카, 데이터 플랫폼의 최강자
[Main Session] 카프카, 데이터 플랫폼의 최강자
 
[Demo session] 관리형 Kafka 서비스 - Oracle Event Hub Service
[Demo session] 관리형 Kafka 서비스 - Oracle Event Hub Service[Demo session] 관리형 Kafka 서비스 - Oracle Event Hub Service
[Demo session] 관리형 Kafka 서비스 - Oracle Event Hub Service
 
[Hands-on] CQRS(Command Query Responsibility Segregation) 와 Event Sourcing 패턴 실습
[Hands-on] CQRS(Command Query Responsibility Segregation) 와 Event Sourcing 패턴 실습[Hands-on] CQRS(Command Query Responsibility Segregation) 와 Event Sourcing 패턴 실습
[Hands-on] CQRS(Command Query Responsibility Segregation) 와 Event Sourcing 패턴 실습
 
[Main Session] 보안을 고려한 애플리케이션 개발 공정 및 실무적 수행 방법 소개
[Main Session] 보안을 고려한 애플리케이션 개발 공정 및 실무적 수행 방법 소개 [Main Session] 보안을 고려한 애플리케이션 개발 공정 및 실무적 수행 방법 소개
[Main Session] 보안을 고려한 애플리케이션 개발 공정 및 실무적 수행 방법 소개
 

MySQL Document Store를 활용한 NoSQL 개발

  • 1. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. |Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal MySQL Document Store를 활용한 NoSQL 개발 Sumi Ryu MySQL Principal Solution Engineer May 18, 2019 Presented with
  • 2. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Safe Harbor Statement The following 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. Confidential – Oracle Internal
  • 3. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 류수미 LGCNS : Java 개발 및 AA, Laf/J@Fin SUN : Pre sales for Web, WAS, Java EE, MySQL Oracle : Pre sales for MySQL sumi.ryu@oracle.com Confidential – Oracle Internal
  • 4. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | MySQL Presentations at OOW 4
  • 5. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 5 NoSQL JSON Documents Schemaless JSON Collections MySQL Relational Tables Foreign Keys X Dev API SQL CRUD MySQL Document Store
  • 6. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | InnoDB Cluster 6 App Servers with MySQL Router MySQL Group Replication MySQL Shell Setup, Manage, Orchestrate “High Availability becomes a core first class feature of MySQL!”
  • 7. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | NoSQL의 유혹 • 대부분의 사용자 / 회사는 어느 시점에서 NoSQL을 사용해 보도록 강요 받고 있음 • 그들은 RDBMS가 확장되지 않거나 개발자가 SQL 또는 다른 것을 좋아하지 않기 때문이라고 믿음 • 나중에서야 모든 제한사항을 알게 됨 (보통 처음부터 완전히 새로운 도구를 배울 수있는 충분한 시간이 없었기 때문에) • 결과는 대개 다음 중 하나: - JSON을 지원하는 일부 RDBMS 사용 (소규모 회사 / 사용자) - 신뢰할 수 있는 스토리지 엔진 (예 : 우버의 Schemaless 와 Facebook 의 MyRocks/RocksDB ) 위에 NoSQL 인터페이스를 구현 Confidential – Oracle Internal
  • 8. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | What is a Document Store Database? Confidential – Oracle Internal
  • 9. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | What is Document Store Database? A document store database (also known as a document-oriented database, aggregate database, or simply document store or document database) is a database that uses a document-oriented model to store data. Document store databases store each record and its associated data within a single document. Each document contains semi-structured data that can be queried against using various query and analytics tools of the DBMS. 출처: https://database.guide/what-is-a-document-store-database/
  • 10. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 예제 < XML > < JSON >
  • 11. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | The MySQL Approach • “관계형 데이터베이스와 문서 데이터베이스 간의 크로스오버” • 다양한 언어 및 환경을 커버하는 공통 API - C++, Java, .Net, Node.js, Python 및 PHP - 새로운 MySQL Shell - 관계형 테이블에 대한 쉬운 CRUD 작업 및 문서 데이터베이스 형태의 모음 • MySQL 재단에 기반 - InnoDB - Replication - .... Confidential – Oracle Internal MySQL Document-store
  • 12. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | The MySQL Approach • Docstore의 문서는 JSON으로 표현됨 - “JavaScript Object Notation” - 크로스 플랫폼 직렬화 포멧 (웹 서비스에서 공통) - ECMA-404 로 표준화됨 (http://json.org) - MySQL에서 잘 지원됨 • 컬렉션 내에 여러 문서가 저장됨 - 기술적으로, 하나의 InnoDB 테이블임 - JSON 유형의 일반적인 하나의 컬럼 - 인덱스는 가상 컬럼으로 생성가능 Confidential – Oracle Internal Documents and Collections
  • 13. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | MySQL DocStore • X Plugin • X Protocol • X DevAPI
  • 14. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | MySQL DocStore Architecture
  • 15. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | MySQL Document Store는 MySQL 5.7.12+, MySQL 8 용 플러그인으로 존재합니다.이 플러그인은 기본적으로 활성화되어 있으며, 기존 MySQL 8 서버에 전체 문서 저장 레이어를 제공합니다. • 일반 MySQL 3306 대신 다른 포트 세트 사용 • 프로토콜 계층에서 Google protobuf 메시지를 사용 • 클라이언트로부터 DevAPI 요청을 받아들이고 코어 MySQL 엔진을 사용하여 요청을 처리 • https://dev.mysql.com/doc/refman/8.0/en/document-store.html MySQL DocStore Components – X Plugin
  • 16. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | The MySQL Approach • X Plugin에 의해 구현 된 새로운 프로토콜 • Google 프로토 버퍼 기반 (향후 확장을 위한 유연성) • 더 나은 콘텐츠 이해 - CRUD 표현(expression) 트리 - 파이프 라인 구문에 조건을 첨부할 수 있을 것에 대한 기대 - 바운드 파라미터 • 보안 - 기본적으로 SSL/TLS 제공 - 인증되지 않은 사용자에게 정보가 누출되지 않음(예 : MySQL 서버 버전) Confidential – Oracle Internal X Protocol
  • 17. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | The MySQL Approach Confidential – Oracle Internal X Protocol Mysqlx.Crud.Find { collection { name: "collection_name", schema: "test" } data_model: DOCUMENT criteria { type: OPERATOR operator { name: "==" param { type: IDENT, identifier { name: "_id" } } param { type: LITERAL, literal { type: V_STRING, v_string: { value: "some_string" } } } } } }
  • 18. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | X DevAPI 문서 및 SQL을 위한 공통 API Confidential – Oracle Internal
  • 19. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | X DevAPI는 클러스터 형태의 MySQL 설정으로 구동되는 CRUD 기반 응용 프로그램을 쉽게 개발할 수있게 해주는 고급 데이터베이스 API입니다. NoSQL 문서(document) 작업의 CRUD 사용 편의성에 초점을 맞추면서 전문가 수준의 제어와 원시 SQL을 포함한 고급 기능에 대한 액세스를 제공합니다. • 가장 대중적인 프로그램 언어로 개발이 가능 • 문서와 관계형 테이블을 쿼리하는 강력한 방법을 제공 • SQL을 직접 실행할 수 있음 • 라우터를 통해 InnoDB 클러스터를 작업 할 수 있음 • 개발자 안내서 및 X DevAPI 참조 설명서는 다음에서 찾을 수 있음 : - https://dev.mysql.com/doc/connector-python/en/ - https://dev.mysql.com/doc/x-devapi-userguide/en/ MySQL DocStore Components - DevAPI
  • 20. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 특징 • 유연한 파라미터를 가진 능숙한 API - 공통 표현식(common expression) 언어를 기반으로 한 쿼리 빌더 - 원시 SQL 인터페이스 또한 사용 가능 • 보안을 기본적으로 제공 (SSL/TLS 및 SHA256 인증) • 트랜잭션, 세이브 포인트 및 행 잠금(row-locking)을 통한 데이터 일관성 • 속도 향상을위한 C / C ++, Python 확장 Confidential – Oracle Internal
  • 21. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Fluent API • 단일 진입점으로 부터 코드는 흘러감 – getSession() • 코드는 가독성이 높아지고, 유지 보수하기 좋음 (심지어 테스트도 가능) • 특수화되고 시맨틱 방법으로 캡슐화된 작업들 • 리펙터링 작업을 위한 멋진 발판 • 텍스트 편집기 (또는 IDE) 힌트 및 자동 완성을 위한 최고수준의 지원 • 더 작아진 SQL 인젝션 대상 영역 • 다른 프로그래밍 환경 간의 공통 표준 Confidential – Oracle Internal
  • 22. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Flexible Parameters • 대부분의 공개 API 메소드는 다음과 함께 동작: - 다양한 개별 파라미터 - 파라미터의 단일 배열 - 이름이 붙여진 속성들을 가진 객체 (그것이 적용되는 곳) Confidential – Oracle Internal mysqlx.get_session("root:@localhost") mysqlx.get_session({user: "root"}) collection.add({name: "foo"}).add({name: "bar"}) collection.add([{name: "foo"}, {name: "bar"}]) collection.find("name = :name").bind("name", "foo") collection.find("name = :name").bind({name: "foo"}) collection.find().fields("foo", "bar") collection.find().fields(["foo", "bar"])
  • 23. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Expression Language • SQL 하위 집합 (배우기 쉬우면서 여전히 강력 함) • 표현적이고 인간이 읽을 수 있는 • 모든 공식 커넥터 구현 간의 공통 표준 (이식 가능하도록) Confidential – Oracle Internal # Python collection .find("name = 'foo' AND age > 42") .fields("name", "age") .group_by("name", "age") .sort("name ASC", "age DESC") .limit(4) .offset(2) .execute() // Java collection .find("name = 'foo' AND age > 42") .fields("name", "age") .groupBy("name", "age") .sort("name ASC", "age DESC") .limit(4) .offset(2) .execute()
  • 24. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | SSL Modes • 세션 생성시, TCP 연결에 대해 SSL / TLS는 기본적으로 활성화되어 있음 • 로컬 UNIX 소켓 연결을 사용하지 않도록 설정 (필요 없음)하면 더 빠름 • 추가적으로 서버 인증서 유효성 검사 • 옵션들을 on-demand 로 재정의 할 수 있음 Confidential – Oracle Internal 보안은 기본으로 제공 mysqlx.get_session(user="root", password="", ssl_mode=mysqlx.SSLMode.DISABLED) mysqlx.get_session("mysqlx://root:@localhost?ssl-mode=DISABLED") mysqlx.get_session(user="root", password="", ssl_mode=mysqlx.SSLMode.VERIFY_CA, ssl_ca="/path/to/ca.pem") mysqlx.get_session("mysqlx://root:@localhost?ssl-mode=VERIFY_CA&ssl-ca=/path/to/ca.pem") mysqlx.get_session(user="root", password="", ssl_ca="/path/to/ca.pem", ssl_key="/path/to/key.pem", ssl_cert="/path/to/cert.pem") mysqlx.get_session("mysqlx://root:@localhost?ssl-ca=/path/to/ca.pem&" "ssl-key=/path/to/key.pem&ssl-cert=/path/to/cert.pem")
  • 25. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Authentication Mechanisms • SHA-1 및 SHA-2 암호 해시 • 다음 서버 플러그인에 대한 인증 메커니즘 지원 : - mysql_native_password - sha256_password - caching_sha2_password Confidential – Oracle Internal Secure by default (as well) mysqlx.get_session(user="root", password="", auth=mysqlx.Auth.MYSQL41) mysqlx.get_session("mysqlx://root:@localhost?auth=MYSQL41") mysqlx.get_session(user="root", password="", auth=mysqlx.Auth.PLAIN) mysqlx.get_session("mysqlx://root:@localhost?auth=PLAIN") mysqlx.get_session(user="root", password="", auth=mysqlx.Auth.SHA256_MEMORY) mysqlx.get_session("mysqlx://root:@localhost?auth=SHA256_MEMORY")
  • 26. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Transactions and Savepoints • 세션 범위에서 트랜잭션 생성, 커밋 또는 롤백 • 이들 트랜잭션의 중간 세이브포인트로 생성, 릴리스 또는 롤백 Session-level atomic operations Confidential – Oracle Internal session.start_transaction() collection.add({"name": "Wilma", "age": 33}).execute() assert(2 == collection.count()) session.set_savepoint("sp") collection.add({"name": "Barney", "age": 42}).execute() assert(3 == collection.count()) session.rollback_to("sp") assert(2 == collection.count()) session.commit()
  • 27. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Row Locking • 문서를 읽는 쿼리는 동시 트랜잭션이있을 때 격리 수준을 결정할 수 있음 • 두 종류의 잠금(lock): - Exclusive locks - Shared locks • 세가지 다른 동작 모드: - DEFAULT - NOWAIT - SKIP_LOCKED Document-level isolation Confidential – Oracle Internal
  • 28. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Raw SQL • 구조화 된 분석 및 / 또는 보고의 경우, SQL은 항상 옵션임 • 다음과 같이 X DevAPI의 일부가 아닌 기능을 이용할 수 있음: - 관계형 테이블에 대한 DDL 조작 - 키 제약 조건 관리 - JOIN 사용 Confidential – Oracle Internal 만물박사 (Jack of all trades) # create a table session.sql('CREATE TABLE foo (bar VARCHAR(3))').execute() # add a unique constraint session.sql('ALTER TABLE foo ADD COLUMN bar VARCHAR(3) GENERATED ALWAYS AS doc->>"$.bar" ' 'VIRTUAL UNIQUE KEY NOT NULL').execute() # execute a JOIN query session.sql('SELECT DISTINCT t1.bar FROM foo t1 JOIN baz t2 ON t1.bar = t2.qux WHERE t1.qux = t2.quux').execute()
  • 29. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | MySQL Connector/Python Python으로 MySQL Document Store 활용해서 NoSQL 개발 Confidential – Oracle Internal
  • 30. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Python • 다양한 목적 (Web, GUI, 스크립팅, 데이터 과학, etc.) • 객체 지향 • 해석되고(Interpreted) 동적으로 입력되는 언어 • 가독성 및 생산성에 중점을 둠 • batteries included • 강한 내성 • 크로스 플랫폼 • C / C ++을 사용하여 확장 가능하도록 설계된 Extensible 은 많은 외부 라이브러리에 대한 액세스 허용 • GitHub에서 가장 인기있는 두 번째 언어 • 구현 : CPython, Jython, IronPython, PyPy Confidential – Oracle Internal
  • 31. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | MySQL Connector / Python은 X DevAPI 프로토콜 용 클라이언트 라이브러리를 제공하며 Python 프로그램이 Python Database API Specification v2.0 (PEP 249)을 준수하는 API를 사용하여 MySQL 데이터베이스에 액세스 할 수 있도록함 • 동일한 패키지에서 MySQL classic 및 X DevAPI 프로토콜 지원 • 동일한 코드 기반을 사용하는 Python 2.7, 3.4, 3.5, 3.6 지원 • 속도 향상을위한 선택적인 C / C ++ Python 확장 • 프로토콜 압축 (MySQL 클래식 프로토콜) • TCP / IP 소켓을 사용한 연결 및 Unix에서는 Unix 소켓을 사용 • SSL을 사용한 안전한 TCP / IP 연결 • Linux, Mac 및 Windows (또는 Python이 설치된 모든 플랫폼)에서 이용가능 MySQL DocStore Components - Connector/Python
  • 32. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | • pip 를 이용해서 Connector / Python 설치 (권장 방법) MySQL DocStore Components - Connector/Python shell> pip install mysql-connector-python 설치 • 사용가능한 플랫폼 패키지 - Linux: RPM, DEB - MacOS: DMG - Windows: MSI Package - Platform Independent: tar.gz
  • 33. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | • 사전 준비사항 - gcc와 같은 C / C ++ 컴파일러 - Protobuf C++ (버전 3.0.0 이상) - Python 개발 파일 - MySQL C API 라이브러리와 인터페이스하는 선택적인 C 확장팩을 컴파일하기위한 개발 파일을 포함해서 MySQL 서버가 설치됨 MySQL DocStore Components - Connector/Python 소스로 설치
  • 34. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | • tar 아카이브로 Connector / Python을 설치하기 위해 최신 버전 (여기에서는 <version>으로 표시)을 다운로드 MySQL DocStore Components - Connector/Python 소스로 설치 (Linux) shell> tar xzf mysql-connector-python-<version>.tar.gz shell> cd mysql-connector-python-<version>.tar.gz shell> python setup.py --with-protobuf-include-dir=<protobuf-include-dir> --with-protobuf-lib-dir=<protobuf-lib-dir> --with-protoc=<protoc-binary> • MySQL C 클라이언트 라이브러리와 인터페이스하는 C 확장팩을 포함 시키기위해 --with-mysql-capi 옵션을 추가 shell> python setup.py --with-protobuf-include-dir=<protobuf-include-dir> --with-protobuf-lib-dir=<protobuf-lib-dir> --with-protoc=<protoc-binary> --with-mysql-capi=<mysql-capi>
  • 35. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | MySQL DocStore Components - Connector/Python Getting Started – 서버로 연결 import mysqlx # Using a connection string session = mysqlx.get_session(“root:myql@localhost:33060") # Using kwargs session = mysqlx.get_session(host="localhost", port=33060, user=“root", password=“myql") # Using a Python dictionary session = mysqlx.get_session({"host": "localhost", "port": 33060, "user": "root", "password": “myql"})
  • 36. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | MySQL DocStore Components - Connector/Python Getting Started – 스키마 및 콜렉션 생성 import mysqlx # Connect to server session = mysqlx.get_session(host="localhost", port=33060, user="root", password=“myql") # Create a schema schema = session.create_schema("test") # Create a collection collection = schema.create_collection("my_collection")
  • 37. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | MySQL DocStore Components - Connector/Python Getting Started – 데이타 삽입 # Use the collection "my_collection" collection = schema.get_collection("my_collection") # Add a document to "my_collection" using a Python dictionary collection.add({"name": "Sakila", "age": 15}).execute() # Add a document to "my_collection" using a JSON string collection.add('{"name": "Sakila", "age": 15}').execute() # Add a document to "my_collection" using a DbDoc object doc = mysqlx.DbDoc({"name": "Sakila", "age": 15}) collection.add(doc).execute() # Add a document to "my_collection" specifying an _id collection.add({"_id": "1", "name": "Sakila", "age": 15}).execute() # You can also add multiple documents at once collection.add({"name": "Sakila", "age": 15}, {"name": "Jack", "age": 32}, {"name": "Clare", "age": 37}).execute()
  • 38. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | MySQL DocStore Components - Connector/Python Getting Started – 문서 찾기 # Use the collection "my_collection" collection = schema.get_collection("my_collection") # Specify which document to find with Collection.find() result = collection.find("name like :param").bind("param", "S%").limit(1).execute() doc = result.fetch_one() # Fetch one document print(doc, type(doc)) # {"_id": "00005b48c75b0000000000000025", "age": 15, "name": "Sakila"} <class 'mysqlx.dbdoc.DbDoc'> # Get all documents where age > 18 result = collection.find("age > 18").execute() docs = result.fetch_all() # Fetch all documents print(docs) # [{'_id': '00005b48c75b000000000000002f', 'age': 32, 'name': 'Jack'}, # '_id': '00005b48c75b0000000000000030', 'age': 37, 'name': 'Clare'}]
  • 39. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | MySQL DocStore Components - Connector/Python Getting Started – 문서 수정 # Use the collection "my_collection" collection = schema.get_collection("my_collection") # Get document with name = 'Jack' result = collection.find("name = 'Jack'").execute() doc = result.fetch_one() print(doc) # {"_id": "00005b48c75b000000000000002f", "age": 32, "name": "Jack"} # Set age to 21 result = collection.modify("name = 'Jack'").set("age", 21).execute() result = collection.find("name = 'Jack'").execute() doc = result.fetch_one() print(doc) # {"_id": "00005b48c75b000000000000002f", "age": 21, "name": "Jack"}
  • 40. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | MySQL DocStore Components - Connector/Python Getting Started – 문서 삭제 # Add documents collection.add({"_id": 1, "name": "Sakila", "age": 15}, {"_id": 2, "name": "Jack", "age": 32}, {"_id": 3, "name": "Clare", "age": 37}).execute() print("Total documents in collection:", collection.count()) # Total documents in collection: 3 collection.remove("_id = 1").execute() print("Total documents in collection:", collection.count()) # Total documents in collection: 2 result = collection.find().execute() docs = result.fetch_all() print(docs) # [{'_id': 2, 'age': 32, 'name': 'Jack'}, # {'_id': 3, 'age': 37, 'name': 'Clare'}]
  • 41. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | MySQL DocStore Components - Connector/Python Getting Started – 인덱스 생성 # Create index on 'age' collection.create_index("index_age", {"fields": [{"field": "age", "type": "INT"}], "type":"INDEX"}) # {"fields": [{"field": member_path, # "type": member_type, # "required": member_required, # "collation": collation, # "options": options, # "srid": srid}, # # {... more members, # # repeated as many times # # as needed} # ], # "type": type}
  • 42. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 데모 환경 • VM : 64-bit Oracle Linux Server – 7.6(minimal installation) • MySQL 8.0.16 • MySQL Shell 8.0.16 • X Protocol(Port:33060)이용하여 서버접속 • Collection 생성 • Document 추가 • CRUD/SQL 실행 • 트랜젝션 실행
  • 43. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | 33060포트로 서버 접속
  • 44. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Collection생성, JSON도큐먼트 추가
  • 45. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | CRUD함수: add(),find()
  • 46. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Collection에 대해 JOIN, Window함수 이용
  • 47. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Collection에 대해 인덱스 추가
  • 48. Copyright © 2018, Oracle and/or its affiliates. All rights reserved. | Collection에 대한 트랜젝션 지원
  • 49. Thank You! Copyright © 2018, Oracle and/or its affiliates. All rights reserved.