473,387 Members | 1,863 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Referential Integrity Problem

I've inadvertently placed this post in another similar newgroup, and I
apologise if you get it twice.

I'm building a database that consists of frontend and backend. Some
of the lookup tables need to reside in the frontend database. The
data in the lookup fields that relate to the backend tables will
never
change, but a descriptor for items in these fields will. I may need
to update the descriptors periodically, hence the need to keep these
tables in the frontend database so that the new descriptors will be
distributed with frontend updates.

Ideally the lookup fields should be linked to the backend tables with
referential integrity enforced. Because the tables are in 2
different
databases this can't be done.
What options do I have? Given that the lookup fields will always be
under my control and will never change, is enforcing referential
integrity really an issue?

Jun 26 '07 #1
3 2621
Since you cannot use Referential Integrity across different files, you will
have to manage it manually.

That means you intercept each insert and edit into the back end table, and
ensure that it matches one of the values in the front end. Similarly, you
must intercept each edit and delete in the front end table to ensure this
leaves no orphan in the back end.

There is still no guarantee that this will work okay. For example, if Fred
inserts a new value (say 93) into his front end, and then assigns that value
as a foreign key value in the back end, when Jenny opens her front end and
has *not* inserted 93 there, you have an orphaned record situation.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Wayne" <cq*******@volcanomail.comwrote in message
news:11**********************@x35g2000prf.googlegr oups.com...
I've inadvertently placed this post in another similar newgroup, and I
apologise if you get it twice.

I'm building a database that consists of frontend and backend. Some
of the lookup tables need to reside in the frontend database. The
data in the lookup fields that relate to the backend tables will
never
change, but a descriptor for items in these fields will. I may need
to update the descriptors periodically, hence the need to keep these
tables in the frontend database so that the new descriptors will be
distributed with frontend updates.

Ideally the lookup fields should be linked to the backend tables with
referential integrity enforced. Because the tables are in 2
different
databases this can't be done.
What options do I have? Given that the lookup fields will always be
under my control and will never change, is enforcing referential
integrity really an issue?
Jun 26 '07 #2
Thanks Allen. You've certainly given me some food for thought!
Jun 26 '07 #3

"Wayne" <cq*******@volcanomail.comwrote in message
news:11**********************@x35g2000prf.googlegr oups.com...
I've inadvertently placed this post in another similar newgroup, and I
apologise if you get it twice.

I'm building a database that consists of frontend and backend. Some
of the lookup tables need to reside in the frontend database. The
data in the lookup fields that relate to the backend tables will
never
change, but a descriptor for items in these fields will. I may need
to update the descriptors periodically, hence the need to keep these
tables in the frontend database so that the new descriptors will be
distributed with frontend updates.

Ideally the lookup fields should be linked to the backend tables with
referential integrity enforced. Because the tables are in 2
different
databases this can't be done.
What options do I have? Given that the lookup fields will always be
under my control and will never change, is enforcing referential
integrity really an issue?
Put the lookup tables in the BE, have the FE update the descriptors when you
update the FE on the user machines.
Jun 26 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Sharon Cowling | last post by:
Hi, my problem is this: I have a table called faps_key the unique identifier being key_code: taupo=# \d faps_key Table "faps_key" Column | Type | Modifiers...
1
by: Grant McLean | last post by:
Hi First a simple question ... I have a table "access_log" that has foreign keys "app_id" and "app_user_id" that reference the "application_type" and "app_user" tables. When I insert into...
7
by: Jimmie H. Apsey | last post by:
Referential Integrity on one of our production tables seems to have been lost. I am running Postgres 7.1.3 embedded within Red Hat kernel-2.4.9-e.49. Within that I have a table with referential...
5
by: Geisler, Jim | last post by:
So, as far as I know, PostgreSQL does not have any way of verifying the loss of referential integrity. Are there any recommended methods or utilities for checking referential integrity in a...
1
by: HGT | last post by:
Hello all, I am currently on a project which the source data come into the databases is always dirty (not surprisingly); however, due to the design of the database, it is very difficult to...
6
by: heyvinay | last post by:
I have transaction table where the rows entered into the transaction can come a result of changes that take place if four different tables. So the situation is as follows: Transaction Table...
3
by: moskie | last post by:
Is there a way to run an alter table statement that adds a constraint for a foreign key, but does *not* check the existing data for refrential integrity? I'm essentially looking for the equivalent...
6
by: CPAccess | last post by:
How do I maintain referential integrity between a main form and a subform, each based upon different (but joined with integrity enforced) table? Here's the situation: I have two tables:...
2
by: ApexData | last post by:
Access2000, using a continuous form. I’m getting a message that say “you cannot add or change a record because a related record is required in table Employee”. This occurs in all my combobox...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.