Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Relationships and Linked Databases 1

Status
Not open for further replies.

demoman

Programmer
Oct 24, 2001
242
US
Howdy!

I have two databases. One has all of the reports, modules, forms and queries. The other has all of the data. The app database is linked (fairly standard set-up).

I am just completing a major revision change to my app. There was a substantial change to the database structure. The mod has gone quite well, but most complex query is not quite right. I am pretty close to tracking it down. There is an inner join which needs to be a left outer. But a question has come up.

If you can define relationships in BOTH databases, and potentially different, which one has the control? Or is there some safeguard for this?

Perhaps, someone has a pointer to 'in-depth' reference material on this subject.

Thanks
Steve
 
I think you'll find that your front end (application) database inherits the relationships from the back end automatically. They may not show up in the Relationships window until you click the Show All button.

You can define additional relationships in the front end, but you can't give them referential integrity. The referential integrity relationships inherited from the back end are all that exist, so there's no conflict of control.

Any additional relationships you might define are basically used only in building queries and perhaps in identifying Master/Child Link Fields when using subforms/subreports. They appear by default, but you can change or delete them for the particular instance. (You do realize, don't you, that it's valid for two tables to have multiple relationships?) If you leave them in, the JOIN clause in the SQL will include them; if you delete them, it won't. That's all a relationship without referential integrity means: it's a hint about what joins are possible in building new queries.

So in conclusion, the RI relationships in the back end will be enforced, and any you define in the front end will just be hints. There's no conflict of control after all. Rick Sprague
 
Can someone tell me what i am doing wrong i need help on how to transfer data from one table to another.

Basically when i input it into say a form it inputs itself into one or more tables.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top