-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
104 lines (104 loc) · 4.39 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Database Normalizer</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.14/angular.min.js"></script>
<link href='https://fonts.googleapis.com/css?family=Roboto:100,300' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="prod/style.css" media="screen">
</head>
<body>
<div data-ng-app="dbNormalizer" data-ng-controller="appController">
<header>
<div class="container">
<h1>Database Normalizer</h1>
<textarea placeholder="Functional Dependencies go here..." data-ng-model="rawInput"></textarea>
<div id="buttonContainer">
<button type="submit" data-ng-click="normalize()">Normalize</button>
</div>
</div>
</header>
<main>
<div class="container">
<div id="results">
<h1>Results</h1>
<section>
<h2>Attributes</h2>
<ul>
<li data-ng-repeat="attribute in functionalDependencies.attributeSet()">{{ attribute }}</li>
</ul>
</section>
<section>
<h2>Functional Dependencies</h2>
<ul>
<li data-ng-repeat="functionalDependency in functionalDependencies.elements">{{ functionalDependency.toString() }}</li>
</ul>
</section>
<section>
<h2>Substeps to find Minimal Cover</h2>
<h3>Single Right Hand Sides</h3>
<ul>
<li data-ng-repeat="functionalDependency in singleRightHandSides.elements">{{ functionalDependency.toString() }}</li>
</ul>
<h3>Removal of Redundant LHS Attributes</h3>
<ul>
<li data-ng-repeat="functionalDependency in removedLHSAttributes.elements">{{ functionalDependency.toString() }}</li>
</ul>
<h3>Removal of Redundant Dependencies</h3>
<ul>
<li data-ng-repeat="functionalDependency in removedRedundantDependencies.elements">{{ functionalDependency.toString() }}</li>
</ul>
</section>
<section>
<h2>Minimal Cover</h2>
<ul>
<li data-ng-repeat="functionalDependency in minCover.elements">{{ functionalDependency.toString() }}</li>
</ul>
</section>
<section>
<h2>Minimal Cover: Merged Left Hand Sides</h2>
<ul>
<li data-ng-repeat="functionalDependency in minCoverMergedLHS.elements">{{ functionalDependency.toString() }}</li>
</ul>
</section>
<section>
<h2>Candidate Key for all Attributes</h2>
<ul>
<li>{{ candidateKey.join(', ') }}</li>
</ul>
</section>
<section>
<h2>All Candidate Keys(for small examples only)</h2>
<ul>
<li data-ng-repeat="keys in allCandidateKeys">{{ keys.join(', ') }}</li>
</ul>
</section>
<section>
<h2>Dependency Preserving, 3NF Tables</h2>
<ul>
<li data-ng-repeat="table in dependencyPreserving3NFTables">{{ table.toString() }}</li>
</ul>
</section>
<section>
<h2>Lossless-Join, Dependency Preserving, 3NF Tables</h2>
<ul>
<li data-ng-repeat="table in losslessJoinDependencyPreserving3NFTables">{{ table.toString() }}</li>
</ul>
</section>
</div>
<div id="noResults">
<p>No results yet... why don't you enter some functional dependencies to begin?</p>
</div>
</div>
</main>
<footer>
<div class="container">
<h1>About this tool</h1>
<p>This Database Normalizer is a JavaScript version of a similar tool created by <a href="http://people.scs.carleton.ca/~ldnel/">Louis D. Nel</a> for <a href="http://www.carleton.ca/">Carleton University</a>. Any bugs can be reported <a href="https://github.com/abejfehr/database-normalizer/issues">here</a>.</p>
<p>Note that finding all candidate keys of a particular set only works if there are less than 10 attributes.</p>
</div>
</footer>
</div>
<script src="prod/script.min.js"></script>
</body>
</html>