Problem solve Get help with specific problems with your technologies, process and projects.

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!

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

Dig Deeper on Oracle and SQL

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.