Metadata-Version: 2.1
Name: functional-dependencies
Version: 1.1.0
Summary: Compute functional dependencies for database schema design and normalization: implication, closure, synthesis
Home-page: https://gitlab.com/oer/cs/functional-dependencies
Author: Jens Lechtenbörger
Author-email: lechten@wi.uni-muenster.de
License: GPL-3.0-or-later AND CC0-1.0 AND CC-BY-4.0
Platform: UNKNOWN
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Information Technology
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
Classifier: Topic :: Database
Classifier: Topic :: Education
Description-Content-Type: text/markdown


[![](https://img.shields.io/pypi/v/functional-dependencies.svg)](https://pypi.org/project/functional-dependencies/)
[![](https://gitlab.com/oer/cs/functional-dependencies/-/raw/master/coverage.svg)](https://pypi.org/project/coverage/)
[![REUSE status](https://api.reuse.software/badge/gitlab.com/oer/cs/functional-dependencies)](https://api.reuse.software/info/gitlab.com/oer/cs/functional-dependencies)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gl/oer%2Fcs%2Ffunctional-dependencies/HEAD?filepath=notebooks%2FCodd-3NF-ex.ipynb)

# Overview
This package provides an
[Open Educational Resource](https://en.wikipedia.org/wiki/Open_educational_resources)
(OER) to refresh prior knowledge about functional dependencies (FDs)
and normalization of relational database schemata.  Towards that goal,
the package implements algorithms for the manipulation of functional
dependencies; the package’s doc string explains the used vocabulary
and contains examples.

Selected algorithms:
- FD.rminimize(): Return a minimal cover of r-minimal FDs
- FDSet.closure(): Return closure of attributes under given FDs
- FDSet.lminimize(): Return minimum subset of lhs that determines rhs
- FDSet.key(): Return a key
- FDSet.basis(): Return non-redundant r- and l-minimal basis
- RelSchema.synthesize(): Normalize via synthesis into set of 3NF schemata

A 3NF synthesis example is available as
[notebook on mybinder.org](https://mybinder.org/v2/gl/oer%2Fcs%2Ffunctional-dependencies/HEAD?filepath=notebooks%2FCodd-3NF-ex.ipynb).

# Side goal
Besides, the package may serve as sample Python code that respects
usual coding conventions, which are checked with
[pre-commit hooks](https://pre-commit.com).
The configuration file [.pre-commit-config.yaml](https://gitlab.com/oer/cs/functional-dependencies/-/blob/master/.pre-commit-config.yaml)
specifies test tools used here.

# Origin of code
The code here is based on
[that file](https://gitlab.com/oer/cs/programming/-/blob/master/functional_dependencies.py),
which will not be maintained any longer.



# Changelog
Changelog information is based on
[Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
where version numbers adhere to
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [1.1.0] - 2020-12-28
### Added
- Parameter minimize in RelSchema.synthesize().
- Sample notebook with 3NF example by Codd at mybinder.
### Fixed
- Import in __init__.py.
- Project URL in docstring.
- Raw URL for coverage badge in setup.py.
- URL for REUSE badge in README.md.

## [1.0.1] - 2020-12-22
### Fixed
- Package URL and coverage badge in setup.py.

## [1.0.0] - 2020-12-22
No change in functionality.

## [1.0.0-rc.1] - 2020-12-22
Initial release.  Code from
[there](https://gitlab.com/oer/cs/programming/-/blob/master/functional_dependencies.py)
packaged for independent distribution.



