Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [functional-dependencies]

A functional dependency is a constraint between two sets of attributes in a relation, in relational algebra, databases and type systems.

functional-dependencies
3 votes
1 answer
104 views

Lifting an instance of an element to a type-level list instance with functionnal dependencies

Let's suppose I have a Coproduct data type whose constructor has kind Coproduct :: [*] -> * . I also have a class class MyFun s x | x -> s where myFun :: s -> x Whenever I have a list of ...
141592653's user avatar
  • 689
0 votes
0 answers
70 views

attribute partially depends on a candidate key but the answer says the relation is in 3NF

The relation R(ABCD) has the following non-trivial FDs that hold: { A -> B ; B -> A ; A -> D ; D -> B } What is the highest normal form of R? Since A -> B is extraneous, I removed it ...
MInH THiỆn's user avatar
-1 votes
1 answer
96 views

Dependency-Preserving Decomposition

Given the schema R = (A, B, C, D, E, H, I) with the functional dependency set F = {A→B, C→D, CD→E, BD→AH, H→D, AC→H}: Is the decomposition of R into (A, B, C, D, I) and (B, C, E, H) dependency ...
Alan Costa Grey's user avatar
-1 votes
1 answer
229 views

Is this BCNF? If not, what is a decomposition and is it FD preserving?

Consider relation schema R = (A, B, C, D, E) with functional dependencies BCE -> D, BDE -> C, ABE -> D and AB -> C. Is the relation schema in BCNF? If not: What is a BCNF decomposition? Is ...
hoshey574's user avatar
0 votes
1 answer
181 views

Database Normalization BCNF decomposition

I have a relation schema M with the attributes {B, C, D, E, R} and the following set of functional dependencies: B, D, E -> R B, D, R -> E B, C, D -> R C, D -> E I want to perform a BCNF ...
Jupiter's user avatar
  • 11
2 votes
1 answer
68 views

Make Haskell type system understand that fundeps carries over a composite (tuple-like) type

I have the following code, which I use to convert a HList-of-touples (or more like, tree-of -touples) into the same shape, but instead of a tuple, just keeping the second element. The problem is, this ...
ron's user avatar
  • 9,364
0 votes
1 answer
62 views

How does this relation produce candidate keys?

Given relation R(a,b,c) and that there are no functional dependencies: How are candidate keys computed?
nicomp's user avatar
  • 4,499
3 votes
1 answer
143 views

SELECT Unaggregated Variables, Functionally Dependent on GROUPing Variables

Background I am working in a very restricted T-SQL environment, where one may only define the "body" of a VIEW: presumably the ... in CREATE VIEW My_View AS ... under the hood. Here is my @...
Greg's user avatar
  • 3,286
-1 votes
1 answer
398 views

Struggling with functional dependency practice questions

I'm going over some practice questions. F={ B→E, C→B, CD→E, ABE→C} I tried to make a canonical cover - Fc ={ B→E, C→B, D→E, AB→C} Then finding candidate keys - ADB, ADC Is R in BCNF? I thought it ...
Ofekino97's user avatar
-2 votes
1 answer
82 views

Is this allowed in BCNF Normalization?

I know that in BCNF if A->B then A must be a candidate key. But what about if A is part of the candidate key but not the whole candidate key? Let me explain in an example: Exercise 1: Candidate ...
Lechius's user avatar
  • 305
1 vote
1 answer
156 views

Definition of functional dependency, ambigiuous "for all pairs"

for all pairs of tuples t1 and t2 such that t1[A] = t2[A] then t1[B] = t2[B] Can "a pair" also be a pair of the same tuple, meaning t1 = t2, or does it mean only two distinct tuples?
AngryJohn's user avatar
  • 643
0 votes
1 answer
123 views

Decomposing tables where some attributes aren't in any minimal, non-trivial functional dependency

While writing a library to automatically decompose a given table, I came across some special cases where the first steps of Bernstein's synthesis for 3NF (ACM 1976) give me results I don't expect. ...
Accidental Statistician's user avatar
1 vote
0 answers
165 views

Data normalisation into third normal form

I have done data normalization on dummy data and would like to know if I did it correctly. If it is done correctly, I would also like to ask two things below, because it is about 3NF. 1NF: This table ...
filtertips's user avatar
2 votes
2 answers
204 views

Error matching types: using MultiParamTypeClasses and FunctionalDependencies to define heterogeneous lists and a function that returns first element

There is a relevant question concerning Functional Dependencies used with GADTs. It turns out that the problem is not using those two together, since similar problems arise without the use of GADTs. ...
th-ch's user avatar
  • 21
0 votes
1 answer
172 views

Definition for relation to be in 3NF using canonical cover

We are using following definition of 3NF: A schema R is in third normal form (3NF) if for all FD α → β in F +, at least one of the following holds: α → β is trivial (i.e., β ⊆ α). α is a superkey ...
Marc's user avatar
  • 45

15 30 50 per page
1
2 3 4 5
37