Split database and relationships (1 Viewer)

Gavx

Registered User.
Local time
Tomorrow, 02:51
Joined
Mar 8, 2014
Messages
148
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
Local time
Today, 09:51
Joined
Oct 29, 2018
Messages
10,206
Hi. Relationships have to be created where the tables are defined. Normally, that means the back end.
 

Gavx

Registered User.
Local time
Tomorrow, 02:51
Joined
Mar 8, 2014
Messages
148
thanks
 

zeroaccess

Active member
Local time
Today, 11:51
Joined
Jan 30, 2020
Messages
586
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, 12:51
Joined
Feb 19, 2002
Messages
28,774
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, 12:51
Joined
Feb 19, 2002
Messages
28,774
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 (Users: 0, Guests: 1)

Top Bottom