| <!-- |
| ▄▄▄ ██▓███ ▄▄▄ ▄████▄ ██░ ██ ▓█████ ██▓ ▄████ ███▄ █ ██▓▄▄▄█████▓▓█████ |
| ▒████▄ ▓██░ ██▒▒████▄ ▒██▀ ▀█ ▓██░ ██▒▓█ ▀ ▓██▒ ██▒ ▀█▒ ██ ▀█ █ ▓██▒▓ ██▒ ▓▒▓█ ▀ |
| ▒██ ▀█▄ ▓██░ ██▓▒▒██ ▀█▄ ▒▓█ ▄ ▒██▀▀██░▒███ ▒██▒▒██░▄▄▄░▓██ ▀█ ██▒▒██▒▒ ▓██░ ▒░▒███ |
| ░██▄▄▄▄██ ▒██▄█▓▒ ▒░██▄▄▄▄██ ▒▓▓▄ ▄██▒░▓█ ░██ ▒▓█ ▄ ░██░░▓█ ██▓▓██▒ ▐▌██▒░██░░ ▓██▓ ░ ▒▓█ ▄ |
| ▓█ ▓██▒▒██▒ ░ ░ ▓█ ▓██▒▒ ▓███▀ ░░▓█▒░██▓░▒████▒ ░██░░▒▓███▀▒▒██░ ▓██░░██░ ▒██▒ ░ ░▒████▒ |
| ▒▒ ▓▒█░▒▓▒░ ░ ░ ▒▒ ▓▒█░░ ░▒ ▒ ░ ▒ ░░▒░▒░░ ▒░ ░ ░▓ ░▒ ▒ ░ ▒░ ▒ ▒ ░▓ ▒ ░░ ░░ ▒░ ░ |
| ▒ ▒▒ ░░▒ ░ ▒ ▒▒ ░ ░ ▒ ▒ ░▒░ ░ ░ ░ ░ ▒ ░ ░ ░ ░ ░░ ░ ▒░ ▒ ░ ░ ░ ░ ░ |
| ░ ▒ ░░ ░ ▒ ░ ░ ░░ ░ ░ ▒ ░░ ░ ░ ░ ░ ░ ▒ ░ ░ ░ |
| ░ ░ ░ ░░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ |
| --> |
| |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one |
| or more contributor license agreements. See the NOTICE file |
| distributed with this work for additional information |
| regarding copyright ownership. The ASF licenses this file |
| to you under the Apache License, Version 2.0 (the |
| "License"); you may not use this file except in compliance |
| with the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, |
| software distributed under the License is distributed on an |
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| KIND, either express or implied. See the License for the |
| specific language governing permissions and limitations |
| under the License. |
| --> |
| |
| <!DOCTYPE html> |
| <html> |
| <head> |
| <link rel="canonical" href="https://ignite.apache.org/features/rdbmsintegration.html" /> |
| <meta charset="utf-8"> |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" /> |
| <meta http-equiv="Pragma" content="no-cache" /> |
| <meta http-equiv="Expires" content="0" /> |
| <title>Automatic RDBMS Integration - Apache Ignite</title> |
| <link media="all" rel="stylesheet" href="/css/all.css?v=1514336028"> |
| <link href="https://netdna.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.css" rel="stylesheet"> |
| <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic' rel='stylesheet' type='text/css'> |
| |
| <!--#include virtual="/includes/sh.html" --> |
| </head> |
| <body> |
| <div id="wrapper"> |
| <!--#include virtual="/includes/header.html" --> |
| |
| <main id="main" role="main" class="container"> |
| <section id="rdbms" class="page-section"> |
| <h1 class="first">Automatically Integrate with RDBMSs</h1> |
| <div class="col-sm-12 col-md-12 col-xs-12" style="padding:0 0 2px 0;"> |
| <div class="col-sm-6 col-md-8 col-xs-12" style="padding-left:0; padding-right:0"> |
| |
| <p> |
| Ignite provides support for integrating with a variety of persistence stores. |
| It allows you to connect to the database, import schemas, configure indexed types, and automatically generate all the |
| required XML OR-mapping configuration and Java domain model POJOs that you can easily download and copy into your project. |
| </p> |
| <p>Ignite can integrate with any relational database (RDBMS) that supports a JDBC driver - Oracle, PostgreSQL, Microsoft SQL Server, and MySQL.</p> |
| <div class="page-heading">RDBMS Integration Wizard</div> |
| <p>Ignite supports automatic RDBMS integration via <a href="https://console.gridgain.com" target="_blank">Ignite Web Console</a> |
| which is an interactive configuration wizard, management and monitoring tool that allows you to:</p> |
| <ul class="page-list"> |
| <li>Create and download various configurations for your Ignite cluster.</li> |
| <li>Automatically construct Ignite's SQL metadata from any RDBMS schemas.</li> |
| <li>Execute SQL queries over your in-memory caches.</li> |
| <li>View query execution plans, in-memory schemas and streaming charts.</li> |
| </ul> |
| </div> |
| <div class="col-sm-6 col-md-4 col-xs-12" style="padding-right:0"> |
| <a href="/images/domain-model.png"><img class="img-responsive" src="/images/domain-model.png" width="350" style="float:right;"/></a> |
| <p class="img-caption">Click on the image to view full size.</p> |
| </div> |
| </div> |
| <p>Ignite Web Console is an innovative tool that offers plenty of rich functionalities to manage the Ignite cluster and is not limited to features mentioned above.</p> |
| <div class="code-examples"> |
| <div class="page-heading">Example</div> |
| <p>Here is an example of automatically generated Person class, as well as Java and XML configurations, imported from a MySQL PERSON table via Ignite Web Console.</p> |
| <!-- Nav tabs --> |
| <ul id="web-console-example" class="nav nav-tabs"> |
| <li class="active"><a href="#example-person" aria-controls="home" data-toggle="tab">Person</a></li> |
| <li><a href="#example-xml" aria-controls="profile" data-toggle="tab">XML</a></li> |
| <li><a href="#example-java" aria-controls="profile" data-toggle="tab">Java</a></li> |
| </ul> |
| |
| <!-- Tab panes --> |
| <div class="tab-content"> |
| <div class="tab-pane" id="example-xml"> |
| <pre class="brush:xml"> |
| <bean class="org.apache.ignite.configuration.IgniteConfiguration"> |
| ... |
| <property name="cacheStoreFactory"> |
| <bean class="org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory"> |
| <property name="dataSourceBean" value="dsMySQL"/> |
| <property name="dialect"> |
| <bean class="org.apache.ignite.cache.store.jdbc.dialect.MySQLDialect"/> |
| </property> |
| <property name="types"> |
| <list> |
| <bean class="org.apache.ignite.cache.store.jdbc.JdbcType"> |
| <property name="cacheName" value="PersonCache"/> |
| <property name="keyType" value="java.lang.Integer"/> |
| <property name="valueType" value="com.apache.ignite.myexample.model.Person"/> |
| <property name="databaseSchema" value="test"/> |
| <property name="databaseTable" value="person"/> |
| |
| <property name="keyFields"> |
| <list> |
| ... |
| </list> |
| </property> |
| |
| <property name="valueFields"> |
| <list> |
| ... |
| </list> |
| </property> |
| </bean> |
| </list> |
| </property> |
| </bean> |
| </property> |
| ... |
| </bean> |
| </pre> |
| </div> |
| <div class="tab-pane" id="example-java"> |
| <pre class="brush:java"> |
| /** |
| * This configuration was generated by GridGain Web Console (10/26/2016 11:12) |
| */ |
| public class ClientConfigurationFactory { |
| private static final Properties props = new Properties(); |
| |
| static { |
| try (InputStream in = IgniteConfiguration.class.getClassLoader().getResourceAsStream("secret.properties")) { |
| props.load(in); |
| } |
| catch (Exception ignored) { |
| // No-op. |
| } |
| } |
| |
| /** Helper class for datasource creation. */ |
| public static class DataSources { |
| public static final MysqlDataSource INSTANCE_dsMySQL = createdsMySQL(); |
| |
| private static MysqlDataSource createdsMySQL() { |
| MysqlDataSource dataSource = new MysqlDataSource(); |
| |
| dataSource.setURL(props.getProperty("dsMySQL.jdbc.url")); |
| dataSource.setUser(props.getProperty("dsMySQL.jdbc.username")); |
| dataSource.setPassword(props.getProperty("dsMySQL.jdbc.password")); |
| |
| return dataSource; |
| } |
| } |
| ... |
| } |
| </pre> |
| </div> |
| <div class="tab-pane active" id="example-person"> |
| <pre class="brush:java"> |
| /** |
| * Person definition. |
| * |
| * This POJO was generated by GridGain Web Console (10/26/2016 11:12) |
| */ |
| public class Person implements Serializable { |
| /** */ |
| private static final long serialVersionUID = 0L; |
| |
| /** Value for id. */ |
| private int id; |
| |
| /** Value for orgid. */ |
| private Integer orgid; |
| |
| /** Value for name. */ |
| private String name; |
| |
| /** Value for salary. */ |
| private Integer salary; |
| |
| ... |
| } |
| </pre> |
| </div> |
| </div> |
| </div> |
| |
| <p> |
| <div class="page-heading">Hosted Management</div> |
| Visit our <a href="/addons.html" target="_blank">Manage</a> page to learn more about the projects that intend to make user experience with Ignite easier. |
| </p> |
| |
| <p> |
| <a href="https://apacheignite-tools.readme.io/docs" target="_blank"> |
| <b>Get started with Ignite Web Console <i class="fa fa-angle-double-right"></i></b> |
| </a> |
| </p> |
| |
| </section> |
| </main> |
| |
| <!--#include virtual="/includes/footer.html" --> |
| </div> |
| <!--#include virtual="/includes/scripts.html" --> |
| </body> |
| </html> |