Link to home
Start Free TrialLog in
Avatar of FastEddie___
FastEddie___

asked on

Proper Use for SQL Views

I understand that SQL Views are just a snapshot or filter of data in a current table.

Is it proper to use views as a data propogation mechanisam that updates other tables to keep those tables current?

For example if I have a table called MasterCompanyData with fields like CompanyID, CompanyName, CompanyAddress, CompanyPhoneNumber and other databases thoughout the organization are also storeing company data of their own. What is the best way to keep the other databases and the MasterCompanyData table in sync?  Would it involve VIEWS ?

I have a situation where I'm currently maintaing a database and one of those tables has Company info. There are other developers in our organization that maintain their own databases that also contain their own Company info.  Now we want to unify the Company data and make one master list of companies from which we all can use for our own purposes.  

One thought is that whenever we create a new company in any one of our databases it will Update the MasterCompany table with a new company entry.

I'm not even sure if this is the best way to do it but that's the inital idea.

Perhaps it would be best to just use the MasterCompany table directly instead of having to propagate data.

I guess this is more of an architecture question.

Does anybody have suggestions on what is the best method to use when shareing data thoughout databases? and how does Views play a role in this mehod, if at all?

-Eddie



ASKER CERTIFIED SOLUTION
Avatar of Scott Madeira
Scott Madeira
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of FastEddie___
FastEddie___

ASKER

Would a transaction be more appropriate way of dealing with the updates?

Can you even use a view accross different databases?

I haven't had to work with multiple databases before so it's just kind of new to me.

Thank you.