SpecDB: 通过面向特征的分解生成LLM定制的数据库
SpecDB: LLM-Generated Customized Databases via Feature-Oriented Decomposition
AI总结:
提出SpecDB系统,利用大语言模型通过面向特征的分解和依赖图DBGraph,从自然语言工作负载描述自动生成定制化关系数据库,在TPC-C测试中达到与PostgreSQL和MySQL相当的性能,代码量仅为它们的3%。
摘要:
主流关系数据库在部署时提供统一的特征集,尽管单个工作负载只使用可用子系统的一小部分。我们研究是否可以根据目标工作负载按需生成具有匹配特征集的数据库。我们提出SpecDB,一个使用大语言模型(LLM)合成定制化关系数据库的系统。我们调查了9个生产系统,并将其分解为10个功能模块,每个模块进一步划分为实现变体。为了捕获跨模块依赖关系,包括不相交子树中的实现必须协同设计的情况,我们采用FODA特征模型,并用合作边扩展它,得到依赖图DBGraph。SpecDB通过分层模块构建流水线来操作DBGraph,其中每个模块由专门的子代理(由三个内部代理驱动:主代理、测试代理、架构代理)生成、验证和集成,以及一个精炼代理,该代理根据用户提供的精炼工具(对现有数据库源代码具有只读访问权限)迭代修复和调整组装的数据库。配套的选择组件将自然语言工作负载描述转换为一组实现变体,提供从工作负载描述到可部署数据库的端到端流水线。我们在TPC-C上使用BenchmarkSQL评估SpecDB。生成的数据库(23,779行Rust代码)在1个和10个仓库下完成了60分钟的TPC-C测试,零错误。在10个仓库下,它达到tpmC=130,而PostgreSQL为128,MySQL为127,延迟相当,代码量约为它们的3%。由于代理在模块规范级别而非产品源代码级别操作,它原则上可以跨系统边界组合技术。随着LLM成本的下降,为目标工作负载生成专用数据库正变得简单。
英文摘要:
Mainstream relational databases ship a uniform feature set across deployments, although individual workloads exercise only a fraction of the available subsystems. We investigate whether a database can instead be generated on demand with a feature set matched to the target workload. We present SpecDB, a system that uses large language models (LLMs) to synthesize customized relational databases. We survey 9 production systems and decompose them into 10 functional modules, each further divided into implementation variants. To capture cross-module dependencies, including cases where implementations in disjoint subtrees must be co-designed, we adopt the FODA feature model and extend it with a cooperate edge, yielding a dependency graph DBGraph. SpecDB operationalizes DBGraph through a layered module-construction pipeline in which each module is generated, validated, and integrated by a dedicated subagent (driven by three inner agents: Main, Tester, Architect), and a Refining Agent that iteratively repairs and tunes the assembled database against a user-supplied refining harness with read-only access to existing database source code. A companion selection component translates a natural-language workload description into a set of implementation variants, providing an end-to-end pipeline from workload description to deployable database. We evaluate SpecDB on TPC-C with BenchmarkSQL. The generated database (23,779 lines of Rust) completes 60-minute TPC-C at 1 and 10 warehouses with zero errors. At 10 warehouses it reaches tpmC=130, compared to 128 for PostgreSQL and 127 for MySQL, with comparable latency at ~3% of their code size. Because the agent operates at module-specification level rather than product source, it can in principle combine techniques across system boundaries. Paired with falling LLM costs, generating a purpose-built database for a target workload is becoming straightforward.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。