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