Lably
Skip to content

TimesTen

Relational database management system

  • 6 min read
  • 4 chapters

Related on Lably

Through Relational database, SQL and Microsoft Windows

TimesTen databases are persistent and can be highly available. Because it is an in-memory database it provides very low latency and high throughput. It provides standard relational database APIs and interfaces such as the SQL and PL/SQL languages. Applications access TimesTen using standard database APIs such as ODBC and JDBC.

TimesTen can be used as a standalone database, and is also often used as a cache in front of another relational database such as Oracle Database. It is frequently used in very high volume OLTP applications such as prepaid telecom billing and financial trading. It is also used for read-intensive applications such as very large websites and location-based services.

TimesTen can be configured as a shared-nothing clustered system (TimesTen Scaleout) supporting databases much larger than the RAM available on a single machine, and providing scalable throughput and high availability. It can also be configured in replicated active/standby pairs of databases (TimesTen Classic) providing high availability and microsecond response time.

TimesTen runs on Linux, Solaris and AIX and also supports client applications running on Windows and macOS.

Technology

TimesTen is an in-memory database that provides very fast data access time. It ensures that all data will reside in physical memory (RAM) during run time. This allows its internal search and data management algorithms used to be simplified, resulting in very low response times even on commodity hardware. TimesTen can make use of available RAM available on its host machine, up to terabytes in size; using TimesTen Scaleout databases much larger than the RAM of a single machine are supported.

Database Concepts

TimesTen supports standard relational database concepts. Tables consist of rows; rows consist of columns of specific data types. Data is manipulated using SQL. Transactions allow data to be manipulated with appropriate levels of atomicity and isolation; TimesTen supports all standard ACID properties expected of relational databases.

Datatypes supported by TimesTen are in general a subset of those supported by Oracle Database, including NUMBER, VARCHAR and LOBs; TimesTen specific datatypes such as binary integers are also supported.

Applications access TimesTen databases using standard relational APIs such as ODBC, JDBC, OCI, and ODPI-C. This allows applications to be written in many programming languages and environments. Applications use those APIs to access and manipulate data using standard SQL. Stored procedures can also be implemented and executed using PL/SQL.

Persistence

Though an in-memory database, TimesTen databases are persistent and can be highly available. At runtime all TimesTen data is in RAM, however TimesTen utilizes non-volatile storage for database persistence and recoverability. TimesTen stores snapshots of the database, called checkpoint files, in a local filesystem. In addition all modifications to the database are also recorded in transaction log files. The combination of checkpoint files and transaction log files allow TimesTen to recover the database in the event of a system failure.

In addition TimesTen databases can be replicated to multiple machines to provide for high availability and disaster recovery.

Connection Methods

Applications may connect to TimesTen databases either in a traditional client/server manner using TCP/IP as the underlying transport or in direct mode. Direct mode allows applications running on the same machine as the database to avoid network stack and context switching overheads. At runtime the data in a TimesTen database is stored in shared memory; this allows application processes to directly attach to the database memory and access it without IPC or context switch overheads. The same APIs and capabilities are available in both modes.

Caching

Because TimesTen databases are persistent and can provide high availability, they can be used as the only database in many solutions.

However, TimesTen databases are often used alongside other databases such as Oracle Database, with a TimesTen database serving as a cache for a subset of data in the (perhaps larger) traditional database.

TimesTen provides the capability to cache data from an Oracle Database source. To utilize Oracle Database caching, one defines one or more SQL objects known as cache groups. A cache group is a set of one or more related database tables and allows for subsets of its rows and/or columns. Database tables in a cache group must each have a defined primary key or a unique index declared across a set of non-nullable columns and must be related in a parent-child hierarchy via primary key-foreign key constraints. SQL predicates can be used to control what data is to be cached.

Once a cache group is defined, the cache group can then be "loaded", allowing Oracle Database data to be cached in TimesTen. Applications can then read from and write to cache groups, and all data modifications will then be synchronized with the corresponding Oracle Database tables.

Other solutions such as Oracle Golden Gate can also be used to synchronize data between TimesTen and other databases, also allowing TimesTen to be used as a very fast cache in front of other databases.

Sign in to keep reading

3 more chapters are free with a Lably account.

More in Computing and communication