Icon Architecture

ElevateDB is a database engine that can be compiled directly into your Embarcadero Delphi, Embarcadero C++, or Lazarus application, be it a program or library, or it can be distributed as a runtime package (equivalent to a library) as part of your application. ElevateDB is available for Delphi 5 and later, as well as Lazarus 0.924 and later. ElevateDB was written in Delphi's Object Pascal language and can be used with the Delphi VCL (Win32, Win64, MacOS32, MacOS64, and Linux64) or Lazarus LCL (Win32, Win64, and Linux64) runtime libraries.

The following image illustrates the general architecture of ElevateDB:

Image

The various components that make up this architecture are detailed next.


Component Architecture
ElevateDB uses a component architecture that includes the following components:

ImageTEDBEngine

The TEDBEngine component encapsulates the ElevateDB engine itself. A TEDBEngine component is created automatically when the application is started and can be referenced via the global Engine function in the edbcomps unit. You can also drop a TEDBEngine component on a form or data-module to change its properties at design-time. However, only one instance of the TEDBEngine component can exist in a given application, and both the global Engine function and any TEDBEngine component on a form or data module point to the same instance of the component (singleton model). The TEDBEngine component can be configured so that it acts like a local or client engine (etClient) or a server engine (etServer) via the EngineType property. The engine can be started by setting the Active property to True.

Information Once the engine has been started, most of the properties that configure the engine cannot be modified.

By default, ElevateDB allows you to configure all local sessions via the TEDBEngine component and its ConfigMemory, ConfigPath, ConfigName, and TempTablesPath properties, as well as several other properties that can customize the local session access for a particular application. However, you can also set the UseLocalSessionEngineSettings property to True in order to tell ElevateDB to use the Local* versions of these same properties from the TEDBSession component to override the engine configuration. This is useful for applications that require access to multiple configuration files for multiple local sessions, such as the ElevateDB Manager that is provided with ElevateDB. Please see the Configuring and Starting the Engine topic for more information on the various engine properties that can be modified when configuring local sessions via the TEDBEngine component.

ImageTEDBSession

The TEDBSession component encapsulates a session in ElevateDB. A default TEDBSession component is created automatically when the application is started and can be referenced via the global Session function in the edbcomps unit. The TEDBSession component can be configured so that it acts like a local (stLocal) or a remote session (stRemote) via the SessionType property. A local session is single-tier in nature, meaning that all TEDBDatabase components connected to the session reference databases in a local or network file system and all TEDBTable, TEDBQuery, or TEDBStoredProc components access the physical tables directly from these directories using operating system calls. A remote session is two-tier in nature, meaning that all access is done through the remote session to an ElevateDB Server using a messaging protocol over a TCP/IP connection. A remote session is configured using the following properties:

RemoteHost or RemoteAddress
RemotePort or RemoteService

In a remote session, all TEDBDatabase components reference databases that are defined on the ElevateDB Server and all TEDBTable or TEDBQuery components access the physical tables through the messaging protocol rather than directly through the operating system.

Information You cannot connect remote sessions in an application whose TEDBEngine component is configured as a server via the EngineType property.

As mentioned above, a local session is usually configured via the TEDBEngine component. However, if the UseLocalSessionEngineSettings property is set to True, then the Local* versions of the TEDBEngine configuration properties that are found in the TEDBSession component will be used to override the TEDBEngine configuration settings.

A session can be connected by setting the Connected property to True or by calling the Open method. The TEDBSession component contains a SessionName property that is used to give a session a name and a SessionDescription property that is used to assign a description to the session. All session components must have a name before they can be connected. The default TEDBSession component is called "Default". The TEDBDatabase, TEDBTable, TEDBQuery, and TEDBStoredProc components also have a SessionName property and these properties are used to specify which session these components belong to. Setting their SessionName property to "Default" or blank ("") indicates that they will use the default TEDBSession component. Please see the Connecting Sessions topic for more information.

ImageTEDBDatabase

The TEDBDatabase component encapsulates a database in ElevateDB, and is used as an container for all access to a specific database. A database can be opened by setting the Connected property to True or by calling the Open method. A TEDBDatabase component contains a DatabaseName property that is used to give a database a name within the application. All database components must have a name before they can be opened. The TEDBTable, TEDBQuery, and TEDBStoredProc components also have a DatabaseName property and these properties are used to specify which database these components belong to. Please see the Opening Tables and Views topic for more information.

The TEDBDatabase Database property specifies the name of a database that you would like to connect to.

The TEDBDatabase component is used for transaction processing via the StartTransaction, Commit, and Rollback methods. Please see the Transactions topic for more information.

You can execute dynamic SQL on a specific database by using the Execute method. Please see the Executing Queries topic for more information.

ImageTEDBTable

The TEDBTable component encapsulates a cursor on a table or view in ElevateDB. It is used to search,insert, update, or delete rows within the table or view specified by the TableName property. A table or view cursor can be opened by setting the Active property to True or by calling the Open method. The DatabaseName property specifies the name of the database component that references the database where the table or view resides. Please see the Opening Tables and Views topic for more information.

Because the TEDBTable component represents a table or view cursor, you can have multiple TEDBTable components referencing the same table or view. Each TEDBTable component maintains its own active order, filter and range conditions, current row position, row count statistics, etc.

Information The TEDBTable component descends from the TEDBDBDataSet component, which descends from the TEDBDataSet component, which descends from the common TDataSet component that is the basis for all data access in VCL or CLX applications. None of these lower-level components should be used directly and are only for internal structuring purposes in the class hierarchy.

ImageTEDBQuery

The TEDBQuery component encapsulates a single SQL statement in ElevateDB. This SQL statement may or may not return a result set, but if it does return a result set, then the TEDBQuery component will act as a cursor on the result set in the same way that the TEDBTable component acts as a cursor on a table or view. The SQL statement to execute is specified in the SQL property, and the statement can be executed by setting the Active property to True, by calling the Open method (for SQL statements that definitely return a result set), or by calling the ExecSQL method (for SQL statements that may or may not return a result set). The DatabaseName property specifies the name of the database component that references the database to be used when executing the SQL statement. Please see the Executing Queries topic for more information.

Information The TEDBQuery component descends from the TEDBDBDataSet component, which descends from the TEDBDataSet component, which descends from the common TDataSet component that is the basis for all data access in Delphi, C++Builder, Borland Developer Studio, CodeGear RAD Studio, and Lazarus. None of these lower-level components should be used directly and are only for internal structuring purposes in the class hierarchy.

ImageTEDBScript

The TEDBScript component encapsulates a single SQL script in ElevateDB. This script may or may not return a result set, but if it does return a result set, then the TEDBScript component will act as a cursor on the result set in the same way that the TEDBTable component acts as a cursor on a table or view. The script to execute is specified in the SQL property, and the script can be executed by setting the Active property to True, by calling the Open method (for scripts that definitely return a result set), or by calling the ExecScript method (for scripts that may or may not return a result set). The DatabaseName property specifies the name of the database component that references the database to be used when executing the script. Please see the Executing Scripts topic for more information.

Information The TEDBScript component descends from the TEDBDBDataSet component, which descends from the TEDBDataSet component, which descends from the common TDataSet component that is the basis for all data access in Delphi, C++Builder, Borland Developer Studio, CodeGear RAD Studio, and Lazarus. None of these lower-level components should be used directly and are only for internal structuring purposes in the class hierarchy.

ImageTEDBStoredProc

The TEDBStoredProc component encapsulates a single stored procedure in ElevateDB. This stored procedure may or may not return a result set, but if it does return a result set, then the TEDBStoredProc component will act as a cursor on the result set in the same way that the TEDBTable component acts as a cursor on a table or view. The stored procedure to execute is specified in the StoredProcName property, and the stored procedure can be executed by setting the Active property to True, by calling the Open method (for stored procedures that definitely return a result set), or by calling the ExecProc method (for stored procedures that may or may not return a result set). The DatabaseName property specifies the name of the database component that references the database to be used when executing the stored procedure. Please see the Executing Stored Procedures topic for more information.

Information The TEDBStoredProc component descends from the TEDBDBDataSet component, which descends from the TEDBDataSet component, which descends from the common TDataSet component that is the basis for all data access in Delphi, C++Builder, Borland Developer Studio, CodeGear RAD Studio, and Lazarus. None of these lower-level components should be used directly and are only for internal structuring purposes in the class hierarchy.

Opening a TEDBTable, TEDBQuery, TEDBScript, or TEDBStoredProc component will automatically cause its corresponding TEDBDatabase component to open, which will also automatically cause its corresponding TEDBSession component to connect, which will finally cause the TEDBEngine to start. This design ensures that the necessary connections for a session, database, etc. are completed before the opening of the table, query, or stored procedure is attempted.
Image