-2

What is the correct sentence to express the relationship between the user and his direct manager:

  1. A many-to-many table must be maintained because managers have several employees under them.
  2. A field of type reference (foreign key) must be added to the users table with a reference to the record of his direct manager.
  3. There is no need to add anything because a manager is also an employee, so we will use the inheritance mechanism.
  4. Neither answer is correct.

I think the 2nd option is the correct sentence because it suggests using a field of type reference (foreign key) in the users table to establish a direct relationship between a user and their manager

5
  • 1
    Which option do you think is correct, and why?
    – mustaccio
    Jan 17 at 17:51
  • @mustaccio The 2nd option because it suggests using a field of type reference (foreign key) in the users table to establish a direct relationship between a user and their manager Jan 17 at 20:20
  • You should add that to the question.
    – mustaccio
    Jan 17 at 20:24
  • @mustaccio I added Jan 17 at 20:28
  • Is this an assignment ? The relationship can be different in different companies. Jan 18 at 5:04

1 Answer 1

1

So your actual question seems to be, "how can I be confident that my answer is correct?"

You have a working hypothesis, which doesn't seem wrong at the first glance: a reference to the manager's record does allow you to express the user-manager relationship. Now you have to consider other answers to see if they might be even better.

  • The "many-to-many table" option seems wrong: although it's true that "managers have several employees under them", this option also suggests that employees might have several managers above them, which is most likely false.

  • The "inheritance mechanism" option doesn't look right either: inheritance may exist between entities (i.e. the "manager" entity has the same attributes as a "user" entity, plus some attributes specific only to managers), but it cannot exist between instances of such entities (i.e. a particular manager does not have the same attribute values as any of their subordinate employees).

Since we have two apparently incorrect answers and one plausible answer, the fourth option also seems wrong, and you're left with a single option.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.