Link to home
Start Free TrialLog in
Avatar of d
d

asked on

answer for this

q)When joining more than 2 tables, what rule is true?

1) All tables must be related to each other.
 2)Every table must be related to at least one table.
3) A table does not have to be related.
 4)There must be one table that is directly related to all other tables.

q) When using a join, which option is true about the joining columns in each table.

1) Must have the same name  
2)Must have the same data type
3) Must have the same name and data type.  ]
4)Must have a PK FK relationship.
5)  Must have been joined in the past.
Avatar of Jim Horn
Jim Horn
Flag of United States of America image

Curiosity overwhelms me, which class is this homework for?
@Jim,

Precise reaction coming to my while reading the question and your comment which put it in words. Perfect.
Avatar of d
d

ASKER

i know the answers
1)option 1
2)OPTION 4
BUT TO CONFORM
Avatar of d

ASKER

IS THIS ANWERS ARE CURRECT
And yet another thought was, never ever I had any formal education in Microsoft SQL Server and why none of these questions come to my mind when I am typing a query.
Avatar of d

ASKER

PLEASE ANY ONE TELL ME
Why not create two tables, with a single column each, and test each theory?
ASKER CERTIFIED SOLUTION
Avatar of Arifhusen Ansari
Arifhusen Ansari
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Consider question 2 a bit more ...

Would you attempt to join a number column to a name column?
or a date column to book title column?

Remember that each given answer starts with MUST.
Avatar of d

ASKER

can any one tell me the answer
dr pallavi - In case you haven't noticed EE is not a homework site.  We expect you to be able to think a little and work with the comments experts give you, and not just copy-paste a multiple-choice question and then demand 'give me the answer'.  Otherwise it's called academic dishonesty.
Ps. Answer to question 2 isn't option 4....
EE's homework policy is here http://support.experts-exchange.com/customer/portal/articles/1435136

Accordingly let me try to explain why option 4 isn't correct for question 2.

It is NOT mandatory that every join be through a PK/FK, you can join through columns that are not keys.

But, if you try to join through columns that are different data types, one of those columns will be converted to a compatible data type and this can lead to query errors. E.g. You cannot join a date to a varchar unless one of those columns is converted.

So, option 4 is incorrect.

Reconsider: Question 2, option 2.