Possible and certain SQL keys

Henning Köhler, Sebastian Link, Xiaofang Zhou
<span title="2015-07-01">2015</span> <i title="VLDB Endowment"> <a target="_blank" rel="noopener" href="https://fatcat.wiki/container/p6rqwwpkkjbcldejepcehaalby" style="color: black;">Proceedings of the VLDB Endowment</a> </i> &nbsp;
Driven by the dominance of the relational model, the requirements of modern applications, and the veracity of data, we revisit the fundamental notion of a key in relational databases with NULLs. In SQL database systems primary key columns are NOT NULL by default. NULL columns may occur in unique constraints which only guarantee uniqueness for tuples which do not feature null markers in any of the columns involved, and therefore serve a different function than primary keys. We investigate the
more &raquo; ... ions of possible and certain keys, which are keys that hold in some or all possible worlds that can originate from an SQL table, respectively. Possible keys coincide with the unique constraint of SQL, and thus provide a semantics for their syntactic definition in the SQL standard. Certain keys extend primary keys to include NULL columns, and thus form a sufficient and necessary condition to identify tuples uniquely, while primary keys are only sufficient for that purpose. In addition to basic characterization, axiomatization, and simple discovery approaches for possible and certain keys, we investigate the existence and construction of Armstrong tables, and describe an indexing scheme for enforcing certain keys. Our experiments show that certain keys with NULLs do occur in real-world databases, and that related computational problems can be solved efficiently. Certain keys are therefore semantically well-founded and able to maintain data quality in the form of Codd's entity integrity rule while handling the requirements of modern applications, that is, higher volumes of incomplete data from different formats.
<span class="external-identifiers"> <a target="_blank" rel="external noopener noreferrer" href="https://doi.org/10.14778/2809974.2809975">doi:10.14778/2809974.2809975</a> <a target="_blank" rel="external noopener" href="https://fatcat.wiki/release/ofh72hgibja43fc4ytsotqpbye">fatcat:ofh72hgibja43fc4ytsotqpbye</a> </span>
<a target="_blank" rel="noopener" href="https://web.archive.org/web/20180724141914/https://espace.library.uq.edu.au/data/UQ_377382/UQ377382_fulltext.pdf?Expires=1532521895&amp;Signature=RpkRYc-wNxq9pFavDZZjIaISApGuS4jKFYoUtNnvjjVLToqOieLnmxLVp9rg8F2oUDglZLqq1Lm9j~a3tKyburalyK056qpZB4O64LlvJkl77rd6PaQ6UfqG9jm5G5BkGT44AsfRxuRJKYXV~1yyYC-COc8ncMBtQzy~4CAmbdbdT9vC2DuBpFJxXrsxoAsGwQ1NixzOAdzHDmJ3MhZg0bj3vejzYdZfHToVivtifeXNDKhLbGcu51u5b0WcA43f9zuvSI5~TPFwz8V9PmVGDPVcln8mTsyiTJFA-lfGlGEZR1y9a6hfz-MtecK7iuQZsmpAfvrfcnBCjiIajkIsjA__&amp;Key-Pair-Id=APKAJKNBJ4MJBJNC6NLQ" title="fulltext PDF download" data-goatcounter-click="serp-fulltext" data-goatcounter-title="serp-fulltext"> <button class="ui simple right pointing dropdown compact black labeled icon button serp-button"> <i class="icon ia-icon"></i> Web Archive [PDF] <div class="menu fulltext-thumbnail"> <img src="https://blobs.fatcat.wiki/thumbnail/pdf/61/1d/611d16b500bdbeed3a3b7f565e4340d87c6500d8.180px.jpg" alt="fulltext thumbnail" loading="lazy"> </div> </button> </a> <a target="_blank" rel="external noopener noreferrer" href="https://doi.org/10.14778/2809974.2809975"> <button class="ui left aligned compact blue labeled icon button serp-button"> <i class="external alternate icon"></i> Publisher / doi.org </button> </a>