So, I look through my notes and database materials, trying to refresh general concepts and terminology for upcoming interviews. However, I am stuck in dependencies, but without loss. I searched everything and see a lot of mathematical equations, but I am looking for a simple and simple answer in English or an example.
I have a powerpoint from http://www.cs.kent.edu/~jin/DM09Fall/lecture6.ppt that illustrates an example that I cannot fully understand. It is posted below.
R = (A, B, C)F = {A → B, B → C) Can be decomposed in two different ways R1 = (A, B), R2 = (B, C) Lossless-join decomposition: R1 ∩ R2 = {B} and B → BC Dependency preserving R1 = (A, B), R2 = (A, C) Lossless-join decomposition: R1 ∩ R2 = {A} and A → AB Not dependency preserving (cannot check B -> C without computing R1 ⋈ R2)
So, I understand that having A → B and B → C means that you have a “link” in each other, while A → B and A → C means that there is no link or link between B and C.
So,
Does Lossless-join decomposition mean that data as a whole is still intact? In both scenarios, you can still get both data, right? If not, please correct me! :)
What is the significance of the fact that compound B in C is in the second decomposition and how does this make it not preserving dependencies?
If A is deleted, you will simply have B and C without any relationship.
If B is deleted, you will still have A → C.
If C is deleted, you will still have A → B.
Because even in the first example, you still get similar results when deleting values.
So, anyway, if you delete every element, you still have two instances of the relationship and one instance of two elements that have no relations
My assumption would be that when deleting the “average person” relationship (is there a term for this), B in example 1 and A in example 2, is that you can still link example 1 A → B, then B → C, while in Example 2 you are stuck with A → B without connecting to A → C.
But, as you can see, I will now return to the square of the question of why this causes data dependency, and when I googling “what is a data dependency” or “data dependency examples”, it just doesn't make any sense to me.
If someone can help clarify this for me, we will be very grateful.