Storing OpenInsight Dictionaries and Data in Couchbase
I. Creating an OpenInsight table in your Couchbase Bucket
1. From the OpenInsight 10 IDE select New, Database Components, OpenInsight Table.
From the New Table dialog box, create an OpenInsight table. The table Location will use the volume name defined for your Couchbase Bucket. In the example below, we are creating an OpenInsight table called CUSTOMER that resides in the volume CBBFS_EXAMPLES_B64.
A warning message will display, click Yes to continue.
The CUSTOMER table is created and dictionaries can be entered via the TableDesigner.
From the OpenInsight IDE, go to View, Tool Panels, Database.
Now that we have created an OpenInsight table within our Couchbase Bucket, the volume and table will display.
If we right click on the volume we can choose a variety of database management tools. Here we are going to Alias a table from another directory so that we can then copy the rows from the aliased table to our new table that is hosted in the Couchbase Bucket.
In this example we are aliasing the CUSTOMER table in the EXAMPLES\DATA volume with the name EXAMPLES_CUSTOMER.
From the Assistant we will choose COPY_ROW.
We will copy the dictionaries from the aliased table DICT.EXAMPLES_CUSTOMER to the Couchbase table called DICT.CUSTOMER.
We will copy the data from the aliased table EXAMPLES_CUSTOMER to the Couchbase table called CUSTOMER.
From the Couchbase Console we can see that the Bucket CBBFS_EXAMPLES_B64 now contains data.
All OpenInsight dictionaries and data reside inside the Couchbase Bucket CBBFS_EXAMPLES_B64 as documents. Because we created this bucket as Base64 you can see that the document content has been converted to Base64.
From TCL we can type the following:
LIST CUSTOMER WITH ST = “NJ” CUSTOMER_NAME TOWN STATE BY CUSTOMER_NAME
The data OpenInsight data that is stored in the Couchbase Bucket can be treated as if it were in a LinearHash volume.