Question

If you were asked the following:

What is the meaning of a partial key dependency?

would you consider only one of these answers correct or both?

a) A non-key attribute depends on part of the primary key 

b) A non key attribute is partially dependent on the primary key

Keep in mind that if you parse these two sentences to include only the different elements, you're left with the following which sounds very similar, if not identical? :

a) depends on part of
b) is partially dependent on

It's actually very hard to imagine an interpretation of b which leads to an incorrect statement, or at least a statement that differs from a.

I'm looking for a really clear example why b is wrong. I know a is clearer, but that's not what interests me.

Was it helpful?

Solution

Here's what I read:

a) REQUIRES the key, but only some of it

b) Only SOME of it REQUIRES the key, but it REQUIRES the ENTIRE key

2 very different scenarios to me. They shouldn't really be compared at all.

Here's a key: 88f4d3f9-e0e7-4d3d-a7e1-28c4c60ebdc0

Scenario A could REQUIRE the 88f4d3f9 part.

Scenario B partly works without the key at all, but it won't function properly without the entire key.

I can image different use-cases for each scenario:

a) You have a trigger which takes the first part of your uniqueidentifier (GUID) and then saves that part in some other table

b) You have a trigger on INSERT which checks if you're inserting WITH or WITHOUT a primary key. IF it doesn't have one, then just continue. If it does, then do some manipulation (e.g. removing the dashes) and then do a lookup in another table where it might be inserted as varchar. If it is, then do some special code.

So to answer your question. I would consider A to be correct and B wrong.

OTHER TIPS

This is a wordplay - ask the person who asked the question to define the terms used.

For what its worth, this sounds like it might be related to a composite (aka. compound) key - a key that is comprised from more than one attribute. In such case, it is theoretically possible to have a functional dependency on a proper subset of key attributes, which violates the 2NF.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top