candidate-keys

1.0.1 • Public • Published

find-candidate-keys

Finds the candidate keys from a list of functionnal dependencies

Usage

// 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

var find_candidate_keys = require("candidate-keys").candidate_keys;

Package Sidebar

Install

npm i candidate-keys

Weekly Downloads

1

Version

1.0.1

License

GPLv2

Last publish

Collaborators

  • lovasoa