1

I am trying to learn Pivotal GemFire. Pivotal GemFire is the in-memory data grid. How do you view data saved in Pivotal GemFire? Does it have any UI or any database tool like we have for MySQL, Oracle, etc?

John Blum
  • 7,381
  • 1
  • 20
  • 30
Krish
  • 1,804
  • 7
  • 37
  • 65

2 Answers2

1

Yes, of course, you should read up on Pivotal GemFire's Pulse tool, which is a Web application that allows you to both Monitor and Query (using OQL) data contained in Pivotal GemFire Regions.

See the Using Pulse Views and more specifically the "Data Browser" view (scroll down or search for "Data Browser" on the "Using Pulse Views" page).

John Blum
  • 7,381
  • 1
  • 20
  • 30
  • Thank you so much. Is it possible to add foreign keys with GemFire ? – Krish Jan 31 '18 at 08:08
  • You are welcome. Regarding keys, no, GemFire does not have a notion of Foreign or Primary keys; it is a Key/Value store, exactly like `java.util.Map`. The Key in the Map (aka Region) is used to map to a Value for that Map/Region entry. In this case, you can think of the Key as the Primary Key, or identifier for the Map/Region entry. You can, however, add OQL Indexes to any fields on your application domain objects (values) stored in the Region. Although, GemFire does not have the notion of a "unique" Index either (which, as you may know is what a Primary Key primarily consists of). FYI. – John Blum Jan 31 '18 at 19:13
0

Also, check out gfsh and it says at Step 18:

You can use locate entry, query or get to return the data you just put into the region.

gfsh>get --key=('123') --region=region1
gfsh>locate entry --key=('123abc') --region=region2
gfsh>query --query='SELECT * FROM /region2'
rupweb
  • 3,052
  • 1
  • 30
  • 57
  • Yes, but _Gfsh_ is much more limited in the OQL statements you are able to execute as well as, and especially, how the results are displayed. Pulse is marginally better. – John Blum Jan 30 '18 at 22:49
  • @rupweb Thank you so much. Is it possible to add foreign keys with GemFire ? – Krish Jan 31 '18 at 08:09
  • @Krish there's something about [Lucene indexing](https://geode.apache.org/docs/guide/12/tools_modules/lucene_integration.html) but otherwise see Mr John Blum's answer: a key value store doesn't have "indexes". – rupweb Feb 03 '18 at 10:40
  • A Key/Value store does not have the same notion of Indexes (or Keys) as an RDBMS, but both Pivotal GemFire and Apache Geode (the OS core of GemFire) support Indexes (on the values). See here... http://gemfire.docs.pivotal.io/geode/developing/query_index/query_index.html for Pivotal GemFire and here... http://geode.apache.org/docs/guide/12/developing/query_index/query_index.html for Apache Geode. In a RDBMS, a Primary Key or Unique (Key) Constraint is often implemented in terms of a Unique Index. FYI. – John Blum Feb 05 '18 at 17:45