JCSE, vol. 6, no. 3, pp.193-206, 2012
DOI: http://dx.doi.org/10.5626/JCSE.2012.6.3.193
Schema- and Data-driven Discovery of SQL Keys
Van Bao Tran Le, Sebastian Link, Mozhgan Memari
School of Information Management, The Victoria University of Wellington, Wellington, New Zealand/ Department of Computer Science, The University of Auckland, Auckland, New Zealand
Abstract: Keys play a fundamental role in all data models. They allow database systems to uniquely identify data items, and therefore,
promote efficient data processing in many applications. Due to this, support is required to discover keys. These
include keys that are semantically meaningful for the application domain, or are satisfied by a given database. We study
the discovery of keys from SQL tables. We investigate the structural and computational properties of Armstrong tables
for sets of SQL keys. Inspections of Armstrong tables enable data engineers to consolidate their understanding of semantically
meaningful keys, and to communicate this understanding to other stake-holders. The stake-holders may want to
make changes to the tables or provide entirely different tables to communicate their views to the data engineers. For such
a purpose, we propose data mining algorithms that discover keys from a given SQL table. We combine the key mining
algorithms with Armstrong table computations to generate informative Armstrong tables, that is, key-preserving semantic
samples of existing SQL tables. Finally, we define formal measures to assess the distance between sets of SQL keys.
The measures can be applied to validate the usefulness of Armstrong tables, and to automate the marking and feedback
of non-multiple choice questions in database courses.
Keyword:
Algorithm; Complexity; Armstrong database; Key; Soundness; Completeness; Mining; SQL
Full Paper: 157 Downloads, 2545 View
|