Chapter 8. Architecture

RT is built like a layer cake. Each layer has no innate knowledge of what sits on top of it.[11] This chapter takes a tour of RT’s structure and then a more detailed look at RT’s database and object models.

Quick Overview

Before we get into the nitty gritty details of how RT is put together, let’s take a quick look at the RT layer cake and see what we get out of each layer. Figure 8-1 shows the layers and how they fit together.

The RT layer cake

Figure 8-1. The RT layer cake

SQL Database

Behind everything that RT does, there’s an SQL database. This database stores all of RT’s data and metadata. Some SQL databases provide their own procedural languages that allow developers to implement large applications entirely inside the database. This has the disadvantage of tying an application tightly to a specific database engine, such as MySQL or Oracle. RT takes a different tack, using the database as a datastore. Because of this, RT is able to run on top of a number of different database engines, each of which has different strengths. RT works to make sure that data stored in SQL is relatively easy to query using other tools, though we strongly recommend that you not alter the database by hand.

DBI

Perl’s DBI is the standard SQL Database Interface for Perl programs. It defines an interface that various and sundry database drivers (DBDs) implement in a largely consistent manner. In ...

Get RT Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.