General information
Title:
Auomating updates via the DBC
I've heard about triggers and RI and cascading deletes and etc, but don't really know anything about them. I got the feeling they could be really usefull if they do what I think they do.
Here's a couple of things I do by hand. Are these the sort of things that can be automated?
I have a billing file that contains trips and their cost. I also have a history file that has trips and their cost. They have a common key of tinstkey. If the user modifies the cost in the billing file, I go seek that record in the history file and modify it. Same if they delete or add a trip to the billing file. I don't do the reverse.
In most places I use an integer for the pk so the user never changes it. In some places, though, where the users are used to calling a thing by it's code, I just used the code as the key. Usually the code won't change, but since it is possible for the user to change it, I need to make the update in all tables that use this code. I plan to write a program to search all the tables and change it.
Thanks,
-Michelle
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only