-1

I understand what
1) a FD (functional dependency) is
A --> B i.e for a value a1 in A there will be a corresponding unique value b1 in B.
2) and in a one-to-many relationship,
for a value a1 in A there will be one or more corresponding values i.e. b1 or b1, b2, b3 etc in B. My question is on one-to-may part.
Q1) Is there any other name for this relationship in normalization terminology. ( MVD can come in to picture, but can ignore it for a while as I am speaking about one set of data only unless the rest is considered null. )

Q2) is a one-to-many relationship a FD (or is it a MVD - just clarifying, but otherwise ignore this) ?? It might look crazy to ask this. But there is definitely lot of relationship here between A and B as the values of B are still determined by A and this come from the problem domain (which is in other words ... functional world). Ex -A student still determines what courses he want to enroll. He might still have the freedom to enroll for 5 or 7 course which is only the cardinality. But it is still the student and only student who determines the course ( and how many of them.) Or in other words - a one-to-many says about "cardinality" but what about the relationship itself. CALL IT WHAT? (can it still be called functional or some thing else which speaks about what is determining the rest)

samshers
  • 1
  • 6
  • 37
  • 84
  • 1
    An anything-to-one relationship implies a functional dependency. – reaanb Aug 30 '16 at 13:54
  • @reaanb, will the theory yell at me if i used these two words interchangeably – samshers Aug 30 '16 at 20:02
  • 1
    Don't mix up the terms. A one-to-many relationship implies a functional dependency from the many to the one side, while a one-to-one relationship implies a functional dependency in both directions. Functional dependencies can also be found in higher order relationships like M:N:1. Talk about relationships when you're doing conceptual/ER modeling and FDs when you do logical modeling. – reaanb Aug 31 '16 at 09:07
  • The terms "FD" & "M:1" have definitions. Find them. (Preferably in a published academic textbook.) They aren't the same. They apply when they apply. Your writing is so vague that it's not clear what you are saying/asking. You are using "determines" with different meanings. When it is short for "functionally determines" it means what the FD definition says it means. When is used in an everyday sense it doesn't. Your whole post is confused like that. PS A FD is from a set of attributes to a set of attributes. – philipxy Nov 30 '18 at 05:53

1 Answers1

2

A Functional Dependency A → B in a relation R (A, B, C, ...) is a constraint satisfied by the instances of R (that is any set of tuples of R) in which, every time there are two or more tuples with the same value of the attribute A, then all of them have the same value of the attribute B (note that A and B can also be set of attributes) (the “valid” instances of R).

Since you cannot have different values of B for a certain value of A, this situation is called a “functional dependency”, and the “meaning” is that you are modeling a world in which a certain value is uniquely determined by another (for instance, given the SSN of a person, you have a unique birthdate).

While in modelling certain situations you can say that a set of values of an attributes is uniquely determined by another (for instance, given the SSN of a person, you have a unique set of skills), there is no “equivalent” constraint in the normalization theory, and this for the reason that an attribute of a relation can have only an elementary value, not a set of values. So, if you have modelled this situation with a relation with attributes SSN and Skill, you need to put in an instance multiples rows with the same SSN and different skills to represent all the skills of a single person.

What you can have, instead, in the normalization theory, is another constraint, called Multivalued Dependency, that is significant only when you have, in the same relation, at the same time, multiple situations like that of the example above. For instance, if you have a relation like Employees(SSN, Skill, Child), if a certain employee has n skills and m children, you should represent this information with n x m rows for that employee, m rows with all the children for a each skill, and symmetrically n rows with all the skills for a each child. In this case, we can say that an instance is valid if it satisfies the couple of MVDs SSN →→ Skill and SSN →→ Child, or, equivalently, the Binary Join Dependency Employees = SSN Skill ⨝ SSN Child. And this is equivalent to say that the relation can be safely1 decomposed in two relations, E1(SSN, Skill), E2(SSN, Child).

1 I.e., without loss of information.

john
  • 395
  • 2
  • 4
  • 13
Renzo
  • 26,848
  • 5
  • 49
  • 61
  • so in essence - "if a set of values of an attributes is uniquely determined by another (for instance, given the SSN of a person, you have a unique set of skills), there is no “equivalent” constraint in the normalization theory," This clarifies - so a one-to-many relation would be just know for its cardinality . It is definitely not FD and it's not MVD and there is no other term for it. Thx – samshers Aug 29 '16 at 16:05
  • @samshers, exactly. – Renzo Aug 29 '16 at 16:55
  • "renaanb" just makes a new point to flash . so otherway can, a one-to-one be called a FD. at least in the craziest fashion even if the normalization theory is gona yell back – samshers Aug 30 '16 at 19:57
  • A one-to-one relationship `a ↔ b` implies two functional dependencies `a → b` and `b → a`, so they're not the same thing. – reaanb Aug 31 '16 at 08:26
  • @samshers, note that usually when we talk of FDs we are talking about *attributes* of a relation, while one-to-one or one-to-many relationship is a terminology used for association among entities. So in principle there is no immediate relation between the two things. However, when in a single table you have foreign key attributes that “link” to other tables, then in some case we can “transpose” the terminology of the relations over FDs among those keys. But all the attributes *must* be present in a single table. – Renzo Aug 31 '16 at 08:35
  • @Renzo, in ER and relational modeling, relationships also map to attributes of a relation, unlike the network data model where relationships refer to links between records. – reaanb Aug 31 '16 at 09:30
  • @samshers The terms are related as follows for attribute sets X & Y of a relation: X -> Y when the binary relation on X subtuples & Y subtuples from the same row is 1-or-more:1. X -> Y implies X ->> Y. PS [Re "But it is still the student and only student who determines the course ( and how many of them.)".](https://stackoverflow.com/a/41018467/3404097) – philipxy Nov 30 '18 at 06:35