Overview
This package provides an Open Educational Resource (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/cover
- RelSchema.synthesize(): Normalize via synthesis into set of 3NF schemata
Installation and usage
This is Python software.
A 3NF synthesis example is available as notebook on mybinder.org; you can use that notebook in your web browser (without the need to install further software).
To normalize your own schemata, you may prefer to use the software
locally. You can either clone the source repository
(git clone https://gitlab.com/oer/cs/functional-dependencies.git)
or install the PyPI package
(pip install functional-dependencies).
The docstring for module functional_dependencies provides an
introduction and several examples. See
here for generated documentation.
Comments, feedback, improvements
Your feedback is highly appreciated. Feel free to open issues or merge requests in the source repository. For merge requests, make sure that pre-commit hooks are installed and run successfully as indicated next.
Side goal
Besides, the package may serve as sample Python code that respects usual coding conventions, which are checked with pre-commit hooks. The configuration file .pre-commit-config.yaml specifies test tools used here.
Origin of code
The code here is based on that file, which will not be maintained any longer.
Changelog
Changelog information is based on Keep a Changelog, where version numbers adhere to Semantic Versioning.
[Unreleased]
[1.3.0] - 2022-06-06
Added
- Optional parameter attributes in FDSet.key()
Fixed
- Previously, attributes of a relation schema were largely ignored, potentially leading to incorrect keys and synthesis results. Make sure in RelSchema.synthesize() that also attributes that do not occur in any FD are implied by the key (see doctest with nokeyschema).
[1.2.1] - 2021-01-05
Fixed
- Remove cyclic module import for doctest
[1.2.0] - 2020-12-30
Added
- Gitlab CI/CD
Changed
- Use project_urls in setup.py
[1.1.0] - 2020-12-28
Added
- Parameter minimize in RelSchema.synthesize().
- Sample notebook with 3NF example by Codd, also at mybinder.org.
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 packaged for independent distribution.
Metadata
Release files for functional-dependencies 1.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| functional_dependencies-1.3.0.tar.gz | 34.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| functional_dependencies-1.3.0-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 67.8 kB
Release files / functional_dependencies-1.3.0.tar.gz
| Download URL | functional_dependencies-1.3.0.tar.gz |
|---|---|
| Size | 34.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
75dd71b8a912796f2092b3f1e2e9f0e987fd92c890622005f5515c95d604750e
|
|
BLAKE2b-256 checksum How to use checksums |
56c87f69f31c8bbac81314597867a68ff74f4062dcc121b45e1370803d70aed7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.1
|
Release files / functional_dependencies-1.3.0-py2.py3-none-any.whl
| Download URL | functional_dependencies-1.3.0-py2.py3-none-any.whl |
|---|---|
| Size | 33.4 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
da83141ffd8860fe69ca9a75c67fd3c616bf2b1385b9110a64d1b478559ed332
|
|
BLAKE2b-256 checksum How to use checksums |
564f5e908eee709e9f0f73125fae92105958e7e8e2b2306efa1d5ff2b60efc99
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.1
|
Security for functional-dependencies 1.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.