0

If I have the functional dependencies A->B and A->C. Can I have 2 values for A that determine the exact same value tuple of B and C?

For example can I have (1,"John","Male") and (2,"John","Male"). Not talking about usefulness, simply a theoretical question. Also excuse my ignorance if the title doesn't represent the situation from the post.

Mureinik
  • 297,002
  • 52
  • 306
  • 350
Paul
  • 776
  • 1
  • 5
  • 18
  • 3
    Note that using the term “point to” is is somewhat improper, since a primary key does not “point” to anything. The whole record is formed by the primary key together with all the other attributes. As explained in the answer of @Mureinik, you simply have two different records, with different identities, that have the same value for a subset of their attributes. – Renzo Jan 30 '21 at 17:20
  • https://stackoverflow.com/a/46840847/3404097 – philipxy Jan 30 '21 at 18:57
  • 1
    @philipxy As I mentioned in the post I apologize if the title doesn't represent the situation in the post exactly. Isn't A a PK in my post? – Paul Jan 30 '21 at 23:02
  • Please don't do something you could easily not do and apologize, just don't do it. No, there is no PK in your post. There are 2 FDs. (Think about what more would be needed to identify a PK--what all the attributes are & a cover for the FDs that hold & there'd have to be just 1 CK.) Again: Please quote relevant definitions & tell us where you get a problem applying them. Any reasonable research or attempt to answer this before asking & any justified answer has to appeal to what "functionally dependent" means. So it should be in your post. Also an attempt to use it. – philipxy Jan 30 '21 at 23:16
  • https://stackoverflow.com/a/53386492/3404097 – philipxy Jan 30 '21 at 23:50
  • 1
    You can have a given (B,C) subrow with multiple A values when/iff {B,C}->{A} doesn't hold--because you can't have a given (B,C) subrow with multiple A values when/iff {B,C}->{A} holds--by the definition of FD. Armstrong's axioms give us all the non-trivial FDs that must hold when the 2 you give do; they don't give {B,C}->{A}. But you don't tell us any more information, so we can't answer "Can I have [...]". (Did you give the premises & ask the question you actually wanted to?) PS Random "theoretical" wonderings aren't "practical questions about software" [ask] [help] – philipxy Jan 31 '21 at 00:07

1 Answers1

2

Assuming you don't have any other constraints (e.g., a unique constraint on the name), the answer is yes. You could theoretically have two records with identical data but different identities (primary key values).

Mureinik
  • 297,002
  • 52
  • 306
  • 350