Ask the Expert

Updating related information

Hi, is it possible (and if so at what cost) to create a database which when a person changes his/her details, it will update other accounts automatically regarding the initial changes? For instance if MR X and MRS Y are both on the database: MR X changes his address and types in his new one in his account on the database... Could the database automatically update MRS Y's information she has concerning MR X? Hope this makes sense!

    Requires Free Membership to View

This was a tough question, if only to decide on what level to answer. The question makes sense on so many.

Generally speaking, a change in Mr. X's address information could update the address information that Mrs. Y has on him. It would depend on whether the database designer wanted to allow it or prevent it, and this might depend on whether Mr. X could come after you with lawyers if you release his personal information to Mrs. Y.

The privacy issue aside, a feature to "automatically update" is usually quite desirable, and thankfully very easy to accomplish. You do it by not allowing Mrs. Y to have a copy of Mr. X's address in the first place. Instead, the database designer implements a relationship between Mrs. Y and Mr. X's address -- a link. This is basic relational modelling.

The rule is: there is only one copy of Mr. X's address.

You asked about the cost. It costs more if you break that rule. Don't let anyone suggest a trigger, which is expensive to develop and not required until after the rule has been broken.

For More Information


This was first published in July 2002

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: