https://github.com/lovasoa/find-candidate-keys
Finds the candidate keys from a list of functionnal dependencies
https://github.com/lovasoa/find-candidate-keys
Last synced: 11 months ago
JSON representation
Finds the candidate keys from a list of functionnal dependencies
- Host: GitHub
- URL: https://github.com/lovasoa/find-candidate-keys
- Owner: lovasoa
- License: gpl-3.0
- Created: 2016-01-17T13:21:40.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-01-17T14:21:49.000Z (over 10 years ago)
- Last Synced: 2024-11-28T22:19:22.886Z (over 1 year ago)
- Language: JavaScript
- Size: 18.6 KB
- Stars: 1
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# find-candidate-keys
Finds the candidate keys from a list of functionnal dependencies
## Usage
```javascript
// R = (E, G, K, L)
var rel = ["E","G","K","L"];
// F = (E ⭢ G, EK ⭢ L)
var fundeps = [
[["E"], "G"], // E ⭢ G
[["E", "K"], "L"] // EK ⭢ L
];
candidate_keys(rel, fundeps);
/* Returns the list of all candidate keys (in this case, there is only EK)
[
["E", "K"]
]
*/
```
## npm module
### Install
`npm install candidate-keys`
### Usage
```javascript
var find_candidate_keys = require("candidate-keys").candidate_keys;
```