By Sam Drake on Dec 06, 2011
Since this blog is about the Oracle TimesTen In-Memory Database, let’s start by explaining what it is. The product documentation contains an introduction, and the Oracle Technology Network has several overview presentations that get into the details. But here’s another quick version.
- A relational database
- Providing standard APIs and interfaces
- That runs very fast through its memory-centric architecture
- It can be used standalone
- Or in conjunction with an existing Oracle Database
- To provide extremely fast response time and high throughput
Let’s talk about each of those points in more detail.
A relational database
Like Oracle Database or MySQL, TimesTen is a relational database. It is used to store and retrieve data from applications. Applications use Structured Query Language (SQL) to access data in TimesTen databases. Transactions allow applications to safely implement complex operations in a multi-user environment, as in any other relational database. TimesTen databases are persistent … data stored in TimesTen is stored on disk and can be made highly available even in the event of disk or system failure.
Standard APIs and interfaces
Also like any relational database, TimesTen provides standard APIs like JDBC (for Java) and ODBC (for “C” / C++). Applications use these APIs to execute SQL statements against TimesTen databases to store and retrieve data.
The APIs and SQL that TimesTen provides are compatible with the facilities provided by the Oracle Database. Our SQL dialect is compatible with theirs … with datatypes like VARCHAR2, NUMBER and CLOB. TimesTen supports the PL/SQL language for writing stored procedures. And TimesTen also supports Oracle-specific APIs and tools such as OCI and Pro*C .
Memory Centric Architecture
TimesTen was written from the ground up around the idea that all the data in a TimesTen database resides in RAM – memory. It’s also stored on disk, for persistence … in case the power goes out, for example. But while most databases use RAM as a cache of recently-used data from disk, TimesTen stores all data in RAM all the time.
It turns out that this simple change in architecture can yield some big benefits … letting us simplify algorithms used under the covers for searching and storing data. That means that TimesTen can execute SQL with fewer instructions than many databases, resulting in faster response time.
Since TimesTen is a fully featured relational database, it can be used by itself to store data for applications. Even though it’s called an “in memory database”, data in TimesTen is also stored on disk. TimesTen also supports replication of data between TimesTen databases, which can be used to provide fully fault tolerant solutions for even the most demanding 24/7 applications.
…or used in conjunction with Oracle Database
TimesTen can also be used in conjunction with an Oracle Database. For example, you might use a TimesTen database residing on your application server to cache data from your Oracle Database. For example, as users log on to your website you might cache their customer profile, shopping cart and order history in the TimesTen database. TimesTen can automatically work with Oracle Database to move data back and forth as needed.
This gives your users the response time benefits of an in-memory solution with the ability to store many terabytes of data of Oracle Database. The best of both worlds!
Extremely fast response time and high throughput
By storing data in memory, and letting data be accessed at RAM speeds instead of network speeds, TimesTen can provide extremely fast response time… measured in microseconds (millionths of a second), rather than seconds or milliseconds (thousandths of a second).
If you’re just learning about TimesTen, this too-short introduction probably has left you with more questions than you had before. Check out the resources below for more details…and future posts here will dive deeper into some of the topics as well.
- Overview presentations, customer use cases, data sheets and white papers about TimesTen
- TimesTen documentation on OTN