arXiv · 2306.04353
Reversible Numeric Composite Key (RNCK)
Abstract
In database design, composite keys uniquely identify records and prevent duplication. However, wide multi-column keys can increase index size, comparison work, and join costs. Surrogate keys can mitigate some of these costs, but they also require additional constraints and governance to preserve business-level uniqueness. This paper presents a Reversible Numeric Composite Key (RNCK): a single non-negative integer that encodes multiple normalized attributes and can be decoded back to the original tuple under a fixed schema. RNCK is designed to combine the semantic fidelity of composite keys with the operational convenience of numeric keys. RNCK can improve storage footprint and key-comparison efficiency when attribute domains are bounded and stable. We formalize correctness and ordering properties, and specify operational semantics for partial-overflow mode. The approach has been used in production systems and is applicable to relational databases, static datasets, and key-value caching systems within the stated constraints.
Explore related subjects
Keep this discovery
Nicola Asuni. 2023-06-07. Reversible Numeric Composite Key (RNCK). https://arxiv.org/abs/2306.04353
Cite the original work for its findings. Save a collection to share your selection of sources.