Overview of Cache Groups

Cache groups define the Oracle database data to be cached in a TimesTen database. A cache group can be defined to cache all or part of a single Oracle database table or a set of related Oracle database tables.

Figure 2-1 shows the target_customers cache group that caches a subset of a single Oracle Database table customer.

Figure 2-1 Single Table Cache Group

Description of Figure 2-1 follows
Description of "Figure 2-1 Single Table Cache Group"

You can cache multiple Oracle database tables in the same cache group by defining a root table and one or more child tables. A cache group can contain only one root table.

The root table does not reference any table with a foreign key constraint. In a cache group with multiple tables, each child table must reference the root table or another child table in the same cache group using a foreign key constraint. Cache tables in a multiple-table cache group must be related to each other in the TimesTen database through foreign key constraints.

See Multiple-Table Cache Group.

While you may have multiple TimesTen databases that synchronize with the same Oracle database, they each operate independently. Thus, any data cached in separate TimesTen databases each synchronize with the Oracle database independently.

An Oracle database table cannot be cached in separate cache groups within the same TimesTen database. However, the table can be cached in separate cache groups within different TimesTen databases. If the table is cached in separate cache groups and the same cache instance is changed simultaneously on multiple TimesTen databases, there is no guarantee as to the order in which the changes are propagated to the cached Oracle database table. The contents of such cache groups in different TimesTen databases may not be consistent at a given point in time.