Dependency between tables

  • Comments posted to this topic are about the item Dependency between tables

  • Well English clearly isn't the poster's first language, but I'd have hoped the wording could have been changed by whoever approved the question! It was a bit of a guess between the first two, as they seem to mean roughly the same thing. But I went for the first, as the results just show the table names and the foreign key name (which sounds like the first option) - they don't show which columns are involved, and hence don't show the exact relationship (which is what the second, correct, option asks for).

  • This was removed by the editor as SPAM

  • Toreador (7/1/2015)


    Well English clearly isn't the poster's first language, but I'd have hoped the wording could have been changed by whoever approved the question! It was a bit of a guess between the first two, as they seem to mean roughly the same thing. But I went for the first, as the results just show the table names and the foreign key name (which sounds like the first option) - they don't show which columns are involved, and hence don't show the exact relationship (which is what the second, correct, option asks for).

    +1


    On two occasions I have been asked, "Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?" ... I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.
    —Charles Babbage, Passages from the Life of a Philosopher

    How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537

  • I agree completely with Toreador on this - the query returns the two table names and the name of the foreign key constraint between them.

    As the first two answers seem to mean the same thing it came down to the fine details:

    "The foreign key name [that] exists between the source and destination tables."

    The name of the foreign key constraint is what the query returns - so this was my answer.

    "Shows the relationship that exists in each table and the foreign key name used in the relationship"

    No the query doesn't return the relationship. it shows that they are connected, but not how which to me requires knowledge of which columns relate to each other and perhaps the on-delete and on-update actions. So to me this answer is wrong.

    But that is not what the official answer is - am I misinterpreting the meaning of the words?

  • matthew.flower (7/1/2015)


    I agree completely with Toreador on this - the query returns the two table names and the name of the foreign key constraint between them.

    As the first two answers seem to mean the same thing it came down to the fine details:

    "The foreign key name [that] exists between the source and destination tables."

    The name of the foreign key constraint is what the query returns - so this was my answer.

    "Shows the relationship that exists in each table and the foreign key name used in the relationship"

    No the query doesn't return the relationship. it shows that they are connected, but not how which to me requires knowledge of which columns relate to each other and perhaps the on-delete and on-update actions. So to me this answer is wrong.

    But that is not what the official answer is - am I misinterpreting the meaning of the words?

    absolutely agree with you

    does not show the relationship as the columns involved are not returned

  • Toreador (7/1/2015)


    Well English clearly isn't the poster's first language, but I'd have hoped the wording could have been changed by whoever approved the question! It was a bit of a guess between the first two, as they seem to mean roughly the same thing. But I went for the first, as the results just show the table names and the foreign key name (which sounds like the first option) - they don't show which columns are involved, and hence don't show the exact relationship (which is what the second, correct, option asks for).

    +1 Same here.

    Thanks & Best Regards,
    Hany Helmy
    SQL Server Database Consultant

  • Another Bad worded question! I don`t see anything wrong with the 1st option!

    Thanks & Best Regards,
    Hany Helmy
    SQL Server Database Consultant

  • Stewart "Arturius" Campbell (7/1/2015)


    Interesting question, thanks Junior.

    At first glance, i thought the query would fail due to the lack of "sys." schema for the sysforeignkeys view.

    However, error was not one of the options, so i had to "flip a coin" between the first and second options, as they both seemed to imply the same thing.

    Agree, I want my points back 😛

    Thanks & Best Regards,
    Hany Helmy
    SQL Server Database Consultant

  • The answer provides a reference to the sys.foreign_keys topic (https://msdn.microsoft.com/en-us/library/ms189807.aspx) but should probably provide a reference to the sysforeignkeys topic (https://msdn.microsoft.com/en-us/library/ms177604.aspx) instead since that is what was used in the question.

  • Toreador (7/1/2015)


    Well English clearly isn't the poster's first language, but I'd have hoped the wording could have been changed by whoever approved the question! It was a bit of a guess between the first two, as they seem to mean roughly the same thing. But I went for the first, as the results just show the table names and the foreign key name (which sounds like the first option) - they don't show which columns are involved, and hence don't show the exact relationship (which is what the second, correct, option asks for).

    Well, English is one of my native languages and although I agree that the question could usefully have been worded differently (to make it easier for non-native speakers to understand) I don't agree that the first two options are the same: "for each table" is rather important in understanding the meaning of the second option, and isn't there in the first. And "shows the relationship" is perfectly reasonable for "shows the identity of teh relationship", there's no reason at all to say it means "shows all the details of the relationship".

    So I think it's a nice question.

    Tom

  • TomThomson (7/1/2015)


    Well, English is one of my native languages and although I agree that the question could usefully have been worded differently (to make it easier for non-native speakers to understand) I don't agree that the first two options are the same: "for each table" is rather important in understanding the meaning of the second option, and isn't there in the first. And "shows the relationship" is perfectly reasonable for "shows the identity of teh relationship", there's no reason at all to say it means "shows all the details of the relationship".

    The only reason to think it might mean "shows all the details of the relationship" is to find a difference between the first two options. You did it by picking on "for each table", I did it by going for "shows the relationship". It would have been a better question if such interpretation wasn't needed.

  • Toreador (7/1/2015)


    TomThomson (7/1/2015)


    Well, English is one of my native languages and although I agree that the question could usefully have been worded differently (to make it easier for non-native speakers to understand) I don't agree that the first two options are the same: "for each table" is rather important in understanding the meaning of the second option, and isn't there in the first. And "shows the relationship" is perfectly reasonable for "shows the identity of teh relationship", there's no reason at all to say it means "shows all the details of the relationship".

    The only reason to think it might mean "shows all the details of the relationship" is to find a difference between the first two options. You did it by picking on "for each table", I did it by going for "shows the relationship". It would have been a better question if such interpretation wasn't needed.

    This question was fine, but the answers were very poorly worded. Yes, the answers are similar, but Tom's right - they aren't the same. If you focus on what the answers say and look at what would be returned, the first answer was the most accurate one.

  • Hi Stewarts,

    Thanks for comment.

  • matthew.flower (7/1/2015)


    I agree completely with Toreador on this - the query returns the two table names and the name of the foreign key constraint between them.

    As the first two answers seem to mean the same thing it came down to the fine details:

    "The foreign key name [that] exists between the source and destination tables."

    The name of the foreign key constraint is what the query returns - so this was my answer.

    "Shows the relationship that exists in each table and the foreign key name used in the relationship"

    No the query doesn't return the relationship. it shows that they are connected, but not how which to me requires knowledge of which columns relate to each other and perhaps the on-delete and on-update actions. So to me this answer is wrong.

    But that is not what the official answer is - am I misinterpreting the meaning of the words?

    +1

    I picked one because there is no details of the FK relationship (other than name) which the second response seems to be asking for.

Viewing 15 posts - 1 through 15 (of 37 total)

You must be logged in to reply to this topic. Login to reply