MLH wrote:
I have two tables with a 1 to many relationship between the
parent table and the child table. The parent table is tblOwners
and contains vehicle owner records. The child table is tblVehicleJobs
and contains records of towed vehicles that belong to the owners
in tblOwners.
Trouble is, towing company does not always know the ownership
info when towing a vehicle into the shop. So, its impossible to enter
the owner until after-the-fact when the ownership info is obtained
from the state DMV. I really do wish I could make the settings in
relationships window to enforce referential integrity. Not only is it
good policy, it gives me the advantage of being able to implement
cascading updates/deletes.
Any way to get around this. The vehicle info is ALWAYS known -
make, model, year, etc... But the owner info doesn't come until
later. Hoping someone has worked around this in the past. I'm not
too keen on the 'bogus owner record' deal, as REAL owner info
will eventually be known.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
"Unknown" place holder is the standard method to use when the data is
unknown. Is this Owner identification the Primary Key (PK) and that's
why you don't want to use it - 'cuz of possible duplicates?
What I do in this situation, multiple unknowns, not duplicates, is
create a report that lists all UNKNOWNs that need to be known & run that
in a timely manner. You could also just run the report's query
everytime the application is opened & have a user notification
indication of either the number of Unknown owners or the vehicle IDs
that have missing owner info.
If it comes to many vehicles having the same owner you'll have to have a
"merge" utility that will merge all the unknown owners you created for
the vehicles, into the known owner record. Not that hard just, change
the OwnerID in the vehicles table to the now-known-owner's OwnerID and
delete the old unknown owner records.
HTH,
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv
iQA/AwUBQzYmSoechKqOuFEgEQJbnQCffp+EZbm+aUSWGubYiIqfVb TyLjgAoMRx
T6kwSneZ1zDg5DGUYv8knuWp
=dlVO
-----END PGP SIGNATURE-----