# Functional Dependence (In Table/General)

Tags:
1. Apr 21, 2015

### WWGD

Hi all, hope this is the right forum. Please feel free to move it otherwise:

I am confused on whether functional dependence can be determined uniquely by the particulars of a given table, or if it is determined in a more general sense

So I have my relational table. Let A,B be attributes , i.e., different fields. My working definition of B being functionally-dependent on A is that each value of A is associated with exactly one value of B. Now, A may
functionally determine B in a specific table, but not in all tables. So which definition do we use, the one
associated to the specific table, or the more general one?
Specific case:
Now I have in my table the fields OH (On Hand), and the field WN (Warehouse Name) , and in my table, OH determines WN:. In this particular table, there is only one repeated value for OH , the value 8 , specifically, and it happens to be the case that both values 8 are associated with the same warehouse name. In this sense, OH functionally determines WN, since knowing the value of OH uniquely-determines the 'value' WN. But it is absurd to believe this can be generalized: clearly there may be cases where there are the same number of products in two-or-more databases. So, can I then conclude that OH functionally determines WN or not?

Thanks.

2. Apr 21, 2015

### Silicon Waffle

Theoretically, A and B relation is still considered as non-trivial functional dependency.
Practically, determining OH and WN related values may need normalization. OH and WN are still non-trivial FD. I don't understand the "generalization" idea , but logically is it a flawed attempt to generalize discrete data like this ?

3. Apr 21, 2015

### WWGD

Thanks, Waffle: What I mean is that for a given data set, it may be the case that A determines B, in that, for this specific data set,
every value a of A is associated to a unique value b of B. In our case, it may be the case that for every value a of OH, there is a unique
value b of WN, i.e., _for this data set_ every warehouse has a different amount of gadgets on hand. But if the data set were to change,
we may have different warehouses with the same amount of gadgets. So, yes, the question is whether , in order to decide whether
A determines B, we need to just use the data for a given table, or if we need to decide whether, for all possible data sets we are likely to
encounter, A would determine B. In this particular case, with OH and WN, I would say the answer is no, since we may have the same amount
of gadgets available at different warehouses. But if we had, e.g., CN : CustomerName name and DB: date of birth, it does seem that CN would
always determine DB, since a person will always have a unique birth date.

4. Apr 21, 2015

### WWGD

Hope that was not too unclear: my point is that dependencies may be a function of a particular situation at hand. Example: I am looking at a different table with fields Manufacturer M, and Manufacturer Country, MC . But there is no "intrinsic" dependence between M and MC, in that it may or may not be the case that a specific company manufactures in only one country. Then the dependency is a function of the "world" that these companies "live in". Hope this makes sense.