English

Targeted Least Cardinality Candidate Key for Relational Databases

Databases 2024-08-27 v1 Data Structures and Algorithms

Abstract

Functional dependencies (FDs) are a central theme in databases, playing a major role in the design of database schemas and the optimization of queries. In this work, we introduce the {\it targeted least cardinality candidate key problem} (TCAND). This problem is defined over a set of functional dependencies FF and a target variable set TVT \subseteq V, and it aims to find the smallest set XVX \subseteq V such that the FD XTX \to T can be derived from FF. The TCAND problem generalizes the well-known NP-hard problem of finding the least cardinality candidate key~\cite{lucchesi1978candidate}, which has been previously demonstrated to be at least as difficult as the set cover problem. We present an integer programming (IP) formulation for the TCAND problem, analogous to a layered set cover problem. We analyze its linear programming (LP) relaxation from two perspectives: we propose two approximation algorithms and investigate the integrality gap. Our findings indicate that the approximation upper bounds for our algorithms are not significantly improvable through LP rounding, a notable distinction from the standard set cover problem. Additionally, we discover that a generalization of the TCAND problem is equivalent to a variant of the set cover problem, named red-blue set cover~\cite{carr1999red}, which cannot be approximated within a sub-polynomial factor in polynomial time under plausible conjectures~\cite{chlamtavc2023approximating}. Despite the extensive history surrounding the issue of identifying the least cardinality candidate key, our research contributes new theoretical insights, novel algorithms, and demonstrates that the general TCAND problem poses complexities beyond those encountered in the set cover problem.

Cite

@article{arxiv.2408.13540,
  title  = {Targeted Least Cardinality Candidate Key for Relational Databases},
  author = {Vasileios Nakos and Hung Q. Ngo and Charalampos E. Tsourakakis},
  journal= {arXiv preprint arXiv:2408.13540},
  year   = {2024}
}
R2 v1 2026-06-28T18:22:52.528Z