Open topic with navigation

TIBCO ActiveSpaces® 4.8.0

# Table

Table objects represent data grid tables within an application program.

## Tables and Sessions

A program opens a table object by calling a session's open table method. The program can use the table object's methods to operate on the corresponding table in the data grid.

Opening a table object does not lock the table in the data grid.

If the session is transacted, then table operations occur within the session's transaction. Within a transaction you can interact with multiple tables.

If the session is non-transacted, then table operations are not transacted.

## Table Operations

Tables support the following data grid operations:

- PUT a row into the table
- GET a row of the table
- UPDATE a row in the table.
- DELETE a row from the table
- Create an iterator to present the results of a table query

## Primary Key

Every table requires a primary key, which can consist of one or more columns. The data type of primary key columns can be long, string, or datetime.

Examples of primary keys include employee number, invoice number, or MAC address.

The value of the primary key always remains unique across all the rows of the table. That is, database operations can never create two rows with the same key value; instead, they overwrite data in the existing row with that key value.

## Creating Tables

Before a program can use a table or its rows for operations, the table must first be defined. A table can be defined programmatically by using a Session object or an administrator can define a table by using the ActiveSpaces administration tool. For details, see "Defining a Table" and "Defining a Table by Using SQL DDL Commands" in TIBCO ActiveSpaces® Administration.

Subtopics

Copyright © 2009-2022. Cloud Software Group, Inc. All Rights Reserved.