DOI: 10.14778/3819518.3819568 ISSN: 2150-8097

Document-to-Database: Extraction Meets Relational Semantics

Zhengxuan Zhang, Zhuowen Liang, Jiazhuo Chen, Haixun Wang, Nan Tang

Bridging the gap between unstructured documents and relational databases is challenging because document extraction operates locally, whereas databases enforce global semantics through schemas, keys, and constraints. Consequently, existing one-shot large language model (LLM) extraction approaches often fail to reconcile results with relational semantics, yielding inconsistent and hard-to-audit outputs. We present DataMosaic, a document-to-database (Doc2DB) system that explicitly mediates between extraction and database semantics. Given a database schema and constraints, a central orchestrator coordinates entity and relationship extraction alongside verification, repair, and targeted re-extraction within a closed extract-verify-iterate loop. By systematically resolving document ambiguity and constraint violations, DataMosaic incrementally constructs accurate and semantically consistent databases. Featuring pluggable extractors, verifiers and repair operators, experiments in diverse datasets show that DataMosaic substantially reduces constraint violations and improves database-level accuracy over strong Doc2DB baselines.

More from our Archive