You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Maxim Malygin <ma...@gmail.com> on 2018/07/04 11:22:46 UTC
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
Re: Does Ignite support something like "database" from mysql?
Posted by Denis Magda <dm...@apache.org>.
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 <ma...@gmail.com>
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
>
>
Re: Does Ignite support something like "database" from mysql?
Posted by akurbanov <an...@gmail.com>.
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/