table relationship in query & relationship mode

table relationship in query & relationship mode

Post by UmxhdGlvbn » Tue, 04 Oct 2005 19:00:03

Whats difference between Relationship defined in Relationship Tools and
Relationship defined in Query Mode. We can make realationship wth any
combinations in qery mode although we might have defined relationship in
relationship window once. Also, how query mode will show relationhip type:
one to one, one to many

table relationship in query & relationship mode

Post by U3ByaW5rc » Wed, 05 Oct 2005 00:07:03

There may be a more correct technical answer, but I believe you are talking
about two different animals. A relationship is set in the Relationship
window primary to enforce referential integrity--to prohibit child records
from being added prior to adding a parent record, and permitting Cascade
updating and deleting.

The "relationship" set in a query window is a JOIN, the type of which
determines what records are returned in the query. An INNER join, the
default, returns only those records that exist in both tables, for example,
only those customers who have placed orders. To return ALL customers whether
or not they've placed an order, you would use a LEFT outer join. To see this
in the SQL version of your query, right click the join line, select Join
Properties, change the join type, and see how Access changes the SQL by
selecting View, SQL.

Setting a table relationship has a secondary benefit in that, when creating
a new query, joins are automatically created on the related fields.