Split database and relationships (1 Viewer)

Gavx

Registered User.
Local time
Tomorrow, 02:53
Joined
Mar 8, 2014
Messages
151
When the database is split between front end and back end where do you create the relationships? In the front or back end?
 

theDBguy

I’m here to help
Staff member
Local time
Today, 08:53
Joined
Oct 29, 2018
Messages
21,360
Hi. Relationships have to be created where the tables are defined. Normally, that means the back end.
 

Gavx

Registered User.
Local time
Tomorrow, 02:53
Joined
Mar 8, 2014
Messages
151
thanks
 

zeroaccess

Active member
Local time
Today, 10:53
Joined
Jan 30, 2020
Messages
671
You will also notice that if you design a single-file database and then later split it, the relationships will move to the back-end with the tables.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 11:53
Joined
Feb 19, 2002
Messages
42,989
To expand on the answer and help you to understand why,

The relationships are always defined in the database where the physical tables exist. This allows the relationships to be enforced regardless of what FE makes changes to the tables.

For multi-user Access apps, each user has his own personal copy of the FE but all the data changes happen in the BE and so if you made a mistake and one of the FE's didn't have the relationships correctly defined, that app could break the others if did something to violate the RI you defined.

This concept is universal. If your tables are in SQL Server, that database is where the relationships are defined.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 11:53
Joined
Feb 19, 2002
Messages
42,989
I didn't mean to imply that the rule was limited to Access and SQL Server. It applies to ALL RDBMS'
 

Users who are viewing this thread

Top Bottom