Database Normalization via Dual-LLM Self-Refinement CCS: Information systems Relational database model CCS: Computing methodologies Reasoning about belief and knowledge
Eunjae Jo, Nakyung Lee, and Gyuyeong Kim · 2025
Read Database Normalization via Dual-LLM Self-Refinement CCS: Information systems Relational database model CCS: Computing methodologies Reasoning about belief and knowledge by Eunjae Jo, Nakyung Lee, and Gyuyeong Kim (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2508-17693.txt.
Introduction
Eunjae Jo, Nakyung Lee, and Gyuyeong Kim present Miffie, a framework that tidies database schemas automatically by letting two language models check each other's work. Their paper appeared in two thousand twenty-five. Normalization keeps stored data consistent, but engineers do it by hand, slowly and with mistakes. Automating it without losing accuracy is the goal.
One model drafts the normalized schema while another verifies it. The verifier's complaints feed back, and the drafter revises until the schema passes. Carefully written zero-shot prompts keep both accuracy high and costs low. Each model was chosen as the best at its own half of the job. Tests show Miffie handles complex schemas while holding high accuracy. The work points to data teams spending their hours on design, not cleanup.
Catalog record
| CREATOR | Eunjae Jo, Nakyung Lee, and Gyuyeong Kim |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 19 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2508-17693
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Database Normalization via Dual-LLM Self-Refinement CCS: Information systems Relational database model CCS: Computing methodologies Reasoning about belief and knowledge Eunjae Jo, Nakyung Lee, and Gyuyeong Kim Abstract . Database normalization is crucial to preserving data integrity. However, it is time-consuming and error-prone, as it is typically performed manually by data engineers. To this end, we present Miffie, a database normalization framework that leverages the capability of large language models. Miffie enables automated data normalization without human effort while preserving high accuracy. The core of Miffie is a dual-model self-refinement architecture that combines the best-performing models for normalized schema generation and verification, respectively. The generation module eliminates anomalies based on the feedback of the verification module until the output schema satisfies the requirement for normalization. We also carefully design task-specific zero-shot prompts to guide the models for achieving both high accuracy and cost efficiency. Experimental results show that Miffie can normalize complex database schemas while maintaining high accuracy. 1. Introduction The rapid growth in data volume has increased the importance of maintaining data integrity in relational databases. Normalization is a key to preserve data integrity ( Roth and Korth 1987 ; Litwin et al. 1991 ) by following a set of normal forms (e.g., 1NF, 2NF, and 3NF) 1 1 1 While there are stricter normal forms like BCNF and 4NF, we consider normal forms up to 3NF since 3NF is usually enough for most practical cases ( nor 2025b ; nor 2025a ) . , each of which addresses issues within relational schemas, such as removing non-atomic columns and functional dependencies. Unfortunately, normalization remains an expert-driven task, typically performed manually by data engineers. This is because normalization involves understanding domain-specific data semantics and context, which are hard to automate. As datasets grow in size, normalization becomes increasingly time-consuming and error-prone, calling for an efficient mechanism to reduce human effort. Meanwhile, recent advances in large language models (LLMs) have opened up opportunities for automated normalization thanks to their symbolic-reasoning capabilities ( Vaswani et al. 2017 ; Wei et al. 2022 ; Amirizaniani et al. 2024 ) . For example, LLMs can interpret structured data and detect violations of functional dependencies quickly. However, simply applying LLMs to database normalization with naïve prompts is not enough because the generated results may be inaccurate due to nuanced semantic relationships between columns, which are difficult to capture. In this context, we ask the following question: how can we automate database normalization while ensuring high accuracy? This paper answers the question by presenting Miffie, a LLM-based database normalization framework. The core of Miffie is a dual-model self-refinement architecture that enables accurate and automated database normalization. The self-refinement ( Madaan et al. 2023 ) is a general approach where a language model refines generated outputs iteratively based on the feedback from itself. Unlike the original approach, our dual-model architecture uses different language models for the generation and feedback phases to optimize the database normalization process. Furthermore, we carefully design task-specific zero-shot prompts ( He et al. 2023 ; Wang et al. 2024 ; Liu et al. 2024b ) to guide the models to achieve high accuracy and cost efficiency simultaneously, which is also different from the original approach that uses cost-inefficient few-shot prompting ( Brown et al. 2020 ) . The Miffie framework comprises the generation module and the verification module, and they work as follows. The generation module first creates an initial normalized schema based on the input schema provided by the user. The verification module strictly verifies the correctness of the output schema of the generation module. If the schema is not normalized correctly, the module creates the evaluation feedback. The generation module then refines the output schema based on the feedback of the verification module. This refinement loop is typically repeated until the verification module confirms the schema is normalized correctly. To evaluate Miffie, we consider database schemas with different complexities, which include online advertisement, airport, and orders in a shopping. We investigate whether Miffie can normalize schemas that contain anomalies across different normal forms. Our results show that Miffie can detect anomalies quickly and accurately, even for a complex schema. We also show that our task-specific zero-shot prompts achieve comparable or better accuracy than few-shot prompts while minimizing the usage of tokens. In summary, our contributions are as follows. • To the best of our knowledge, Miffie is the first LLM-based database normalization framework that enables that significantly reduces human effort to preserve data integrity while maintaining high accuracy. • We propose a dual-model self-refinement architecture with task-specific zero-shot prompting that makes two different models cooperate to generate accurate normalized schemas through generation and verification loops. • We conduct a series of comprehensive experiments to demonstrate the efficiency and robustness of the Miffie framework. 2. Related Work Figure 1. The overview of Miffie framework. Data management tools for schema design. Several data management tools offer support for schema design ( Oracle Corporation 2005 ; Oracle Corporation 2006a ; ope 2012 ; Oracle Corporation 2006b ; School of ICT Griffith University 2015 ; Jirō 2024 ; University of Illinois at Springfield [n. d.] ) . Some of them assist database normalization but still require users to specify functional dependencies manually. While helpful in ideally structured environments, these tools struggle with real-world schemas where such dependencies may be unclear. LLMs for data management. Several works have explored the use of LLMs for data management ( Liu et al. 2024a ; Kayali et al. 2024 ; Nahid and Rafiei 2024 ) . However, their focus is not database normalization but usually on data cleaning and formatting. For example, Magneto ( Liu et al. 2024a ) uses LLMs to assess column matches that are retrieved by embedding models so that semantically related attributes across tables can be aligned. NormTab ( Nahid and Rafiei 2024 ) leverages LLMs to detect and rewrite inconsistent tabular values, making tables more consistent and interpretable. 3. Design 3.1. Miffie Framework Our goal is to automate database normalization while preserving high accuracy. To achieve the goal, we design the Miffie framework as shown in Figure 1 . Miffie is based on our proposed dual-model self-refinement architecture. The architecture consists of the generation module and the verification module with task-specific zero-shot prompts. We use GPT-4 and o1-mini for the generation module and the verification module, respectively, by considering their overall performance in each functionality. How it works. A user provides an initial schema as input to the framework. The generation module produces a normalized schema as output. The verification module checks this output to determine whether it satisfies the required normalization criteria. If the verification module finds any violations of normalization requirements, it generates feedback including an explanation of the detected anomalies and instructions for resolving them. Based on this feedback, the generation module refines the schema accordingly. This process of schema generation and verification repeats iteratively until the verification module approves that the output schema indeed satisfies all normal form requirements or until a generation threshold (maximum number of attempts) is reached. Table 1. Normalization accuracy (mean ± std) across different LLMs. The accuracy is the average number of removed anomalies. GPT-4 generally shows balanced accuracy. Model 1NF 2NF 3NF GPT-3.5-Turbo 1.80 (