Does Ignite support something like "database" from mysql?

classic Classic list List threaded Threaded
3 messages Options
Maxim Malygin Maxim Malygin
Reply | Threaded
Open this post in threaded view
|

Does Ignite support something like "database" from mysql?

Hi Guys,

I 'd like to have isolated caches/tables for multiple tenants. In mysql I can do it by creating databases per tenant. Is it possible to do something like this in Ignite?
I can create unique tables per tenant (for example <table-name>-<tenant-name>) but it's very uncomfortable in use.

Also I'm trying to understand how Ignite caches maps to Ignite SQL tables. For example I create simple cache with the following configuration

<bean id="cacheConfiguration" class="org.apache.ignite.configuration.CacheConfiguration">
    <property name="cacheMode" value="PARTITIONED"/>
    <property name="name" value="mycache"/>
</bean>

Is it possible to query this cache via SQL? What table name should be in query?

Thanks,
Maxim

akurbanov akurbanov
Reply | Threaded
Open this post in threaded view
|

Re: Does Ignite support something like "database" from mysql?

Hi Maxim,

Please refer to following links to understand how it could configured:

https://apacheignite.readme.io/docs/indexes
https://apacheignite-sql.readme.io/docs/schema-and-indexes
https://apacheignite.readme.io/docs/cache-queries#query-configuration-using-queryentity

Long story short: if you create cache via Java API or xml as in your
snippet, you should use <CACHE_NAME>.<VALUE_TYPE_NAME> to refer table from
SQL query. So if your cache named "mycache" has objects of type "Person" you
should "select * from "mycache".Person" with cache name escaped with quotes.

Regards



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Denis Magda-2 Denis Magda-2
Reply | Threaded
Open this post in threaded view
|

Re: Does Ignite support something like "database" from mysql?

In reply to this post by Maxim Malygin
Multi-tenancy is provided as an extra feature for Ignite by GridGain. Talk to them.

--
Denis

On Wed, Jul 4, 2018 at 4:23 AM Maxim Malygin <[hidden email]> wrote:
Hi Guys,

I 'd like to have isolated caches/tables for multiple tenants. In mysql I can do it by creating databases per tenant. Is it possible to do something like this in Ignite?
I can create unique tables per tenant (for example <table-name>-<tenant-name>) but it's very uncomfortable in use.

Also I'm trying to understand how Ignite caches maps to Ignite SQL tables. For example I create simple cache with the following configuration

<bean id="cacheConfiguration" class="org.apache.ignite.configuration.CacheConfiguration">
    <property name="cacheMode" value="PARTITIONED"/>
    <property name="name" value="mycache"/>
</bean>

Is it possible to query this cache via SQL? What table name should be in query?

Thanks,
Maxim