KSML Data Service Config
This document provides a high-level overview of TeaQL Data Services.
It is intended to help users understand what data-service types exist and how they are categorized, without going into configuration or implementation details.
1. What is a Data Service (Conceptual)
In KSML, a Data Service represents an abstract binding between:
- A storage engine (database or memory)
- A repository implementation
- An entity descriptor model
Data services are predefined capabilities, not something users need to configure manually in most cases.
Currently, specify data service in element <root>
<root data_service="sqlite" >
2. Core Classification
KSML data services fall into two main categories:
| Category | Description |
|---|---|
| SQL-based | Relational databases with SQL support |
| Non-SQL | In-memory or metadata-driven repositories |
3. SQL-Based Data Services
SQL data services generate:
- SQL repositories
- SQL-compatible entity descriptors
- GraphQL integration (optional)
They differ mainly by database dialect and runtime driver.
Supported SQL Engines
| Data Service Name | Database Type | Identifier Quote Style |
|---|---|---|
postgres | PostgreSQL | " (double quote) |
mysql | MySQL | ` (backtick) |
oracle | Oracle | " |
hana | SAP HANA | " |
db2 | IBM DB2 | " |
mssql | Microsoft SQL Server | " |
sqlserver | Microsoft SQL Server (alias) | " |
snowflake | Snowflake | " |
duck | DuckDB | " |
duckdb | DuckDB (alias) | " |
sqlite | SQLite | " |
4. Non-SQL Data Services
Non-SQL services do not rely on SQL generation.
| Data Service Name | Type | Typical Usage |
|---|---|---|
mem | In-memory | Testing, prototyping, transient data |
5. Default Data Service
- One SQL data service may be designated as the default
- If not explicitly specified, KSML uses the default service for repository generation
- Typically,
postgresis used as the default reference implementation
6. Aliases & Compatibility
Some data services exist as aliases to improve compatibility:
| Alias | Canonical Service |
|---|---|
sqlserver | mssql |
duckdb | duck |
Aliases behave identically to their canonical counterparts.
7. Why This Abstraction Exists
The Data Service abstraction allows TeaQL to:
- Support multiple databases with a single domain model
- Keep KSML and TeaQL independent from storage specifics
- Switch or extend backend capabilities without rewriting queries
- Maintain consistent Q / E semantics across environments
8. One-Sentence Summary
TeaQL Data Services define what kinds of storage backends exist, not how users must configure them.