Modern enterprise applications rarely operate with simple database requirements. They process financial transactions, manage customer records, coordinate business operations and generate analytical reports. As organizations grow, their applications may need to work with different database engines, support existing database infrastructure or separate transactional workloads from analytical processing.

However, supporting multiple databases introduces a technical challenge: each database engine has its own SQL dialect, data types, functions, sequence mechanisms and stored procedure implementations. An application written specifically for one database can require significant changes when deployed on another.

XDBL addresses this challenge by providing a unified, database-independent source for defining database structures, queries and procedural logic. Instead of maintaining separate database-specific implementations, developers define operations once and use a schema compiler to generate native SQL for supported database engines.

Understanding how this works requires looking at database independence, SQL dialect differences, schema compilation and the role of native SQL generation.

What Is XDBL?

XDBL is Airtool's XML-based, database-independent language for defining database operations and structures. It provides a unified format for expressing different aspects of database development without directly embedding the syntax of a particular database engine into application definitions.

Its scope includes four important database language categories:

  • DDL (Data Definition Language): Defines database structures such as tables, indexes and constraints.
  • DML (Data Manipulation Language): Defines operations for retrieving, inserting, updating and deleting data.
  • DCL (Data Control Language): Handles database permissions and access control statements.
  • SPL (Stored Procedure Language): Defines procedural database logic, including stored procedures and related database objects.

These definitions are maintained in a common source format. Airtool's schema compiler processes the XDBL definitions and generates SQL appropriate for the selected database engine.

The important distinction is that XDBL does not attempt to replace SQL inside database engines. It provides a higher-level source from which the compiler produces the SQL those engines actually execute.

Why Is Database-Independent Querying Important?

Different database engines implement SQL differently. Although SQL provides a common foundation for relational databases, individual vendors introduce their own syntax, functions, data types and procedural capabilities.

For example, a date calculation, string operation or sequence definition may require different SQL expressions depending on whether an application uses PostgreSQL, Oracle, SQL Server or MySQL.

These differences create several challenges.

1. Database-Specific Code Increases Maintenance

When developers write queries directly for a particular database, the application becomes dependent on that database's syntax and behaviour. Supporting another database may require rewriting queries, procedures and schema definitions.

As the application grows, maintaining multiple versions of the same business logic becomes increasingly difficult.

2. Database Migration Becomes More Complicated

Organizations may change database platforms because of licensing decisions, infrastructure requirements, performance considerations or existing technology investments.

However, applications containing database-specific logic cannot always move easily between engines. Developers must identify incompatible statements, modify database objects and test the resulting application.

3. Different Workloads Require Different Database Engines

Transactional applications and analytical systems have different requirements.

Online Transaction Processing (OLTP) databases handle frequent business operations, such as sales orders, payments, inventory movements and employee records. Online Analytical Processing (OLAP) databases are designed for analytical queries involving large datasets, aggregations and reporting.

A business may need both types of database engines without wanting to maintain entirely separate application definitions.

Database-independent querying helps address these challenges by separating application definitions from database-specific SQL syntax.

How Does Database-Independent Querying Work?

Airtool uses XDBL and a schema compiler to translate unified database definitions into engine-native SQL.

The process can be understood through three main stages.

1. Define Database Operations in a Unified Format

Developers create database structures, queries and procedural logic using XDBL rather than writing separate SQL implementations for every supported database.

For example, a business application may need a table containing employee information, including employee IDs, names, departments and salary records.

Instead of manually creating different table definitions for each database, developers maintain one XDBL definition.

The same principle applies to queries, database functions, stored procedures and triggers.

2. Compile XDBL into Database-Specific SQL

The schema compiler interprets the XDBL definition and generates SQL according to the selected database engine.

This is where database-specific differences are handled.

The compiler accounts for variations in:

  • SQL syntax and dialects.
  • Data types and column definitions.
  • Date and time calculations.
  • String functions.
  • Sequence and identity handling.
  • Stored procedure structures.
  • Database-specific constraints and other capabilities.

Rather than requiring developers to maintain these differences manually, the compiler handles the translation.

3. Execute Native SQL on the Target Database

The generated SQL is executed using the target database engine's native capabilities.

This distinction matters because database independence does not have to mean restricting every application to the smallest set of SQL features shared by all supported databases.

Instead, the compiler can generate different SQL implementations for the same XDBL definition, allowing each database to use its own supported syntax and functionality.

The result is a common application source with database-specific SQL generated for execution.

Why Native SQL Generation Matters

Not all database-independent approaches work in the same way. Some rely on a common subset of SQL supported across multiple engines. Others use runtime drivers or abstraction layers to manage database communication and query differences.

These approaches can be useful, but they address different parts of the problem.

A database driver provides connectivity and communication with a database. An ORM (Object-Relational Mapper) maps application objects to database records and may generate queries from application-level expressions. A query builder provides an abstraction for constructing SQL statements.

These tools do not automatically provide a unified source for every database definition, stored procedure and trigger.

A lowest-common-denominator approach can also restrict developers to features available across all supported databases. This may prevent applications from using certain engine-specific capabilities.

Airtool's XDBL approach takes a different direction: maintain one database-independent definition while generating SQL that uses the capabilities of the target engine.

For example, database engines may use different approaches to handle date arithmetic, string aggregation, sequence generation and data types. The compiler can produce the appropriate native expression rather than forcing every engine to execute an identical SQL statement.

The database optimizer can then work with SQL expressed in its own dialect.

This does not automatically guarantee identical query performance across engines. Actual performance still depends on query design, indexing, data distribution, execution plans and the underlying infrastructure. However, native SQL generation avoids making portability depend solely on a restricted common SQL subset.

A Practical Example: Handling Date Calculations Across Databases

Date arithmetic is a useful example of why database independence matters.

Suppose an enterprise application needs to calculate the number of hours between two timestamps. This calculation may be required for employee working hours, project duration, service response times or transaction processing.

Although the business requirement is identical, different databases can express the calculation differently.

One database may support direct timestamp subtraction, while another returns an interval that needs additional processing. Other engines may require different date functions or conversions.

Without a database-independent approach, developers may need to maintain separate SQL expressions for each database.

With XDBL, the date calculation is defined once. Airtool's schema compiler generates the appropriate SQL for each supported engine.

Airtool's published technical example demonstrates this difference across ten database engines. The generated SQL varies significantly in length and structure. For example, the SQL Server implementation requires substantially less SQL than the Oracle implementation because Oracle's interval result requires additional calculations to reconstruct the total hours.

The important point is not that every generated query looks identical. It is that the underlying operation can be defined once while the compiler handles the database-specific implementation.

This approach is also useful for string functions, sequence handling, table definitions and other operations where SQL dialects differ.

Supporting Both OLTP and OLAP Database Engines

Database independence becomes particularly valuable when an enterprise application needs to support transactional and analytical workloads.

OLTP and OLAP databases serve different purposes, and organizations may choose different engines for each workload.

Airtool's data architecture supports seven OLTP engines:

  • PostgreSQL
  • Informix
  • Oracle
  • IBM DB2
  • Microsoft SQL Server
  • MySQL
  • SAP HANA

For analytical workloads, Airtool supports three OLAP engines:

  • Vertica
  • ClickHouse
  • Google BigQuery

The same application model can support these different database environments through the platform's compilation approach.

For example, an enterprise application may use PostgreSQL or Oracle for transactional operations while routing analytical workloads to ClickHouse, Vertica or BigQuery.

This separation allows organizations to select database engines according to their operational and analytical requirements without maintaining an entirely separate application definition for each database environment.

It is particularly relevant for businesses that need reliable transaction processing alongside large-scale reporting and analytics.

How Does Schema Compilation Simplify Database Maintenance?

Database independence is not limited to translating individual queries. Database structures and procedural objects also need to be managed consistently.

Airtool's schema compiler supports the import of existing customer database schemas into its metadata repository.

This includes objects such as:

  • Tables and columns.
  • Indexes and constraints.
  • Stored procedures.
  • Triggers.
  • Other supported database definitions.

Once imported, these objects can be managed through the platform's schema compilation process.

This is important for organizations with existing database investments. They do not necessarily need to approach database modernization as a complete rewrite of their existing data structures.

The compiler also processes different categories of database objects through its MODEL and CODE pipelines. MODEL handles table-related objects, while CODE processes stored procedure language objects in dependency order.

Dependency handling matters because database objects often rely on other objects being available first. A procedure, for example, may depend on a function or database structure that must be resolved before compilation.

By managing these relationships through a structured compilation process, the platform can support more consistent database deployment and maintenance.

What Does Database Independence Mean for Enterprise Development?

For developers, database independence reduces the need to maintain multiple versions of the same database logic.

For software architects, it provides greater flexibility when designing applications for different customer infrastructure environments.

For businesses, it helps reduce dependence on a single database engine and supports technology decisions based on operational requirements.

The practical advantages include:

Reduced Database-Specific Development: Developers maintain common definitions instead of repeatedly rewriting database structures and operations.

Simplified Database Migration: Changing the target database can become a recompile-and-migrate exercise rather than requiring the entire application to be rewritten. Migration still requires appropriate data conversion, validation and testing.

Greater Infrastructure Flexibility: Organizations can choose supported database engines according to existing investments, licensing arrangements and technical requirements.

Support for Different Workloads: Applications can use transactional and analytical database engines within the same broader platform architecture.

Consistent Application Logic: Business rules and database definitions remain centrally managed rather than being duplicated across separate database implementations.

XDBL and AI-Assisted Application Development

Database-independent development also has implications for AI-assisted software development.

AI coding agents often need to understand database structures, generate queries and interact with application data. When an agent must produce native SQL for every database engine, it needs to account for the differences between their dialects and capabilities.

XDBL provides a structured alternative.

Its grammar is described through an XML Schema Definition (XSD), allowing compatible AI development tools to work with a defined language structure.

An AI agent can generate XDBL definitions without independently implementing the SQL dialect of every supported database. The schema compiler then handles the translation into the appropriate native SQL.

This separates the AI agent's task of expressing database operations from the compiler's responsibility for handling database-specific syntax.

It can make AI-assisted development more consistent across supported database environments, although the generated definitions still need validation, appropriate permissions and testing.

Conclusion

Database independence is about more than connecting an application to different databases. It is about maintaining application logic without making every database-specific difference a development responsibility.

XDBL addresses this through a unified XML-based source format and a schema compiler that generates native SQL for supported database engines.

By supporting seven OLTP engines and three OLAP engines, Airtool provides a common application development approach across different transactional and analytical database environments.

For enterprise applications, this means greater database flexibility, reduced duplication of database-specific logic and a more consistent foundation for development and modernization.

The goal is straightforward: define database operations once, let the compiler handle engine-specific differences, and allow applications to work with the database technology that best fits the organization's requirements.