functional-dependencies Questions
1
I have a multi-parameter typeclass with a functional dependency:
class Multi a b | a -> b
I also have a simple, non-injective type synonym family:
type family Fam a
I want to write an inst...
Judson asked 27/7, 2017 at 21:2
3
Solved
I've been reading many different sources on how to differentiate relations that are in 3NF/BCNF. And I've so far this is my understanding...
I will use this relation as an example...
R = {A, B, ...
Corydalis asked 15/5, 2014 at 14:39
6
Solved
What are the non-trivial functional dependencies in the following table?
A B C
1 1 1
1 1 0
2 3 2
2 3 2
What the basic concept?
Gwendolyn asked 10/4, 2014 at 15:24
4
I know how to calculate a minimal cover--
ensure each functional dependency only has one attribute on the RHS,
remove extraneous/redundant LHS attributes by calculating the closure of each,
examini...
Swum asked 15/6, 2011 at 11:2
4
I am studying for a test, and this is on the study guide sheet. This is not homework, and will not be graded.
Relation Schema R = (A,B,C,D,E)
Functional Dependencies = (AB->E, C->AD, D->B, E->C)
...
Tientiena asked 29/11, 2010 at 4:25
1
In the following code:
class FD a b | a -> b
data Foo a where
Foo :: FD a b => b -> Foo a
unFoo :: FD a b => Foo a -> b
unFoo (Foo x) = x
By common sense this should work, since ...
Hallowmas asked 25/11, 2021 at 13:54
0
I wonder why the below code does not compile and if there is an implementation mkYVal that GHC would accept.
class C x y | x -> y
newtype YVal x = YVal { getYVal :: forall y . C x y => y }
mk...
Critchfield asked 22/10, 2021 at 16:8
3
Solved
In the attached picture there's a symbol I don't understand. To understand additive functional dependency I need to know what the symbol means. Please advice?
It's the symbol where it says...
Recommit asked 6/10, 2010 at 13:28
4
Im just trying to make sure that im thinking of it the right way
1)full dependencies are when one or more primary keys determine another attribute
2)partial dependencies are when one of the prima...
Nicknack asked 22/4, 2013 at 16:34
9
Solved
I fabricated a definition that a partial dependency is when fields are indirectly dependent on the primary key or partially dependent but are also dependent on other keys that depend on the primary...
Stabler asked 9/9, 2014 at 14:56
0
This is a variation on an old chestnut. I wrote it expecting it not to work, but it did. Or is it dodgy? (At GHC 8.6.5.)
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, FlexibleContexts,
F...
Institutive asked 8/3, 2020 at 8:33
1
Solved
A nice true fact about concatenation is that if I know any two variables in the equation:
a ++ b = c
Then I know the third.
I would like to capture this idea in my own concat so I use a functio...
Serrulation asked 27/12, 2019 at 4:8
3
Solved
I have a type class that looks a bit like the following:
class Foo a b | a -> b where
f :: a -> Bool
g :: b -> Bool
h :: a -> b -> Bool
Or at least these are the bits that are ...
Revulsive asked 1/6, 2019 at 21:24
3
Solved
Suppose the relation R( K, L, M, N, P), and the functional dependencies that hold on R are:
- L -> P
- MP -> K
- KM -> P
- LM -> N
Suppose we decompose it into 3 relations as fol...
Ethelyn asked 11/5, 2014 at 18:39
2
Solved
R = (A, B, C, D, E)
The functional dependencies are:
A -> B
ED -> A
BC -> E
It then lists the candidate keys as:
ACD, BCD, CDE
How are these candidate keys derived from the above FDs?
S...
Obbard asked 20/1, 2014 at 0:9
2
I was trying to implement Integers at the type level in Haskell. To start I implemented natural numbers with
data Zero
data Succ a
I then extended this to the integers with
data NegSucc a
I d...
Beseech asked 8/6, 2018 at 16:48
4
Given the Relation R with attributes ABCDE. You are given the following dependencies: A -> B, BC -> E, and ED -> A. I already have the answer which is CDE, ACD, and BCD. I just need to know how to ...
Celesta asked 27/4, 2010 at 2:54
2
Given some type definitions:
data A
data B (f :: * -> *)
data X (k :: *)
…and this typeclass:
class C k a | k -> a
…these (highly contrived for the purposes of a minimal example) functi...
Stereoscopic asked 10/12, 2017 at 0:53
6
Solved
I am trying to find a great resource to study for functional dependency and normalization.
Anyone have any idea where should I look to? I am having difficulty differentiating whether a FD is in 1...
Aristarchus asked 16/11, 2010 at 21:57
1
Solved
Is it possible to create type family instances from a fundep class? For example, let's say that I have the class
class A a b | a -> b
with some instances (imported an external library) and wa...
Antoinetteanton asked 6/5, 2017 at 14:41
1
Does anyone of them implies the other?
My logic is that if all dependencies are preserved, then there is no loss of information and similarly, if decomposition is lossless then no functional depen...
Truffle asked 13/9, 2016 at 7:48
2
Solved
I have played around with TypeFamilies, FunctionalDependencies, and MultiParamTypeClasses. And it seems to me as though TypeFamilies doesn't add any concrete functionality over the other two. (But ...
Lsd asked 28/7, 2016 at 14:59
1
Solved
I'm trying to understand the use of union (the built in predicate) in Prolog. In many cases it seems to fail when it should succeed. It seems it has something to do with the order of the elements o...
Kicker asked 24/4, 2016 at 8:18
6
Solved
I'm taking a database theory course, and it's not clear to me after doing the reading how I can infer keys, given a set of functional dependencies.
I have an example problem:
Find all keys of the...
Ventris asked 20/4, 2011 at 19:26
3
Solved
At https://web.archive.org/web/20130514174856/http://databases.about.com/cs/specificproducts/g/determinant.htm I found this by Mike Chapple:
Definition: A determinant in a database table is any at...
Asante asked 23/5, 2013 at 6:5
1 Next >
© 2022 - 2024 — McMap. All rights reserved.