{'fraction_non_alphanumeric': 0.02591283863368669, 'fraction_numerical': 0.002355712603062426, 'mean_word_length': 4.821917808219178, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
SQL-based discovery of exact and approximate functional dependencies

Students in a typical database course are introduced to theoretical design from a functional dependency standpoint. Functional dependencies are rules of the form X→Y, where X and Y are attributes of a relation r(R). Those rules express the potential one-to-one, and many-to-one relationships among the atributes of R. Unfortunately finding the non-trivial rules X→Y from an existing arbitrary relation is a hard problem. We present an extension of the SQL-based algorithm of Bell and Brockhausen [1] to explore a relation and find its exact and approximate functional dependencies. We use the g3 measure of Kivinen and Mannila to express the degree of approximation of a dependency. This application could be used either as an example or a project in an advanced database course.