473,385 Members | 1,736 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Using Views

I've searched for information on this but so far have not been able to
find any advice.

We have several databases running on SQL Server 7.0 that are
essentially identical in structure but are used for different data.
There are several tables that are identical in all databases.
Currently, we make updates to those tables in one database and
propogate the new versions of those tables to the other databases.
The maintenance to keep after this is somewhat problematic in that the
user, or dba, has to initiate some action to apply the update to all
tables anytime a change is made. An idea I have to simplify this
process is create views that access the data in a central location.
I would create a database for these shared tables, and replace the
tables in each individual database with a view of the same name. The
other nice thing about this solution is it is transparent to
applications that rely on this data. I contemplated using the shared
database by making code changes to change all the references to those
tables to DB..table, but that would take considerable man hours. Can
anyone give me a reason why this would not be a good idea? Thanks.
Jul 20 '05 #1
3 1392
Damon (da******@yahoo.com) writes:
I've searched for information on this but so far have not been able to
find any advice.

We have several databases running on SQL Server 7.0 that are
essentially identical in structure but are used for different data.
There are several tables that are identical in all databases.
Currently, we make updates to those tables in one database and
propogate the new versions of those tables to the other databases.
The maintenance to keep after this is somewhat problematic in that the
user, or dba, has to initiate some action to apply the update to all
tables anytime a change is made. An idea I have to simplify this
process is create views that access the data in a central location.
I would create a database for these shared tables, and replace the
tables in each individual database with a view of the same name. The
other nice thing about this solution is it is transparent to
applications that rely on this data. I contemplated using the shared
database by making code changes to change all the references to those
tables to DB..table, but that would take considerable man hours. Can
anyone give me a reason why this would not be a good idea? Thanks.


I'm afraid that the information is not really sufficient for a good
answer. For one thing: these updates to the tables you talk about,
are they updates to the data, or do add/remove/change columns?

If they are changes in data, I would look into replication.

If they are changes in table structure, I would look into a better build
process. Rather than making the changes in one database, all changes
should be made to source code in a version control system, and you should
develop change scripts to deploy the changes.

--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #2
Here is some additional information. The end user would never update or
change any of these tables. All structure and data changes would be
made by myself or the other admin. Since the user and application level
would only be accessing this data for lookup purposes, views seemed like
they would be a resonable solution to implement. Does this change your
recommendation? When you mention replication, are you referring to a
feature of SQL Server or a method of achieving what I want? Thanks.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 20 '05 #3
Damon Lichtenwalner (da******@yahoo.com) writes:
Here is some additional information. The end user would never update or
change any of these tables. All structure and data changes would be
made by myself or the other admin. Since the user and application level
would only be accessing this data for lookup purposes, views seemed like
they would be a resonable solution to implement. Does this change your
recommendation? When you mention replication, are you referring to a
feature of SQL Server or a method of achieving what I want? Thanks.


Yes, replication is a feature of SQL Server. But if the data is static and
only changed at maitenance points, replication is probably a little heavy-
duty for the task.

I still think the best way to go is develop methods to propagate the update
from scripts that are put under version control. This is a clean and
trackable way of doing it. For exrra security, you could add a table to
each database that permits you keep track of which scripts you have run
in that database.

If you go for views, you may still run into problem to change the views
if the underlying tables change. It also makes you less flexible if for
some reason some databases should be left on an earlier version. There is
also a limitation if you find that you need to scale out on more than one
server.

These may be minor costs, so you may be prepared to pay that price. But
the view solution is really only band-aid for insuffecient methods for
configuration management.

If the databases have different owners, there may also be issues with
cross-database ownership chains and all that. These are addressable,
but there is a risk that while the views relieves of some current hassles,
they will bring you new one.

--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Marko Poutiainen | last post by:
Situation: We had to make our SQLServer 2000 database multi-lingual. That is, certain things (such as product names) in the database should be shown in the language the user is using (Finnish,...
0
by: Marko Poutiainen | last post by:
Situation: We had to make our SQLServer 2000 database multi-lingual. That is, certain things (such as product names) in the database should be shown in the language the user is using (Finnish,...
3
by: KemperR | last post by:
Hello Experts outhere, may be someone can tell me whats going wrong with my ADOX trial. I have an Access 2002 database with some tables and queries (views) The code listed below works well up...
15
by: rod.weir | last post by:
Fellow database developers, I would like to draw on your experience with views. I have a database that includes many views. Sometimes, views contains other views, and those views in turn may...
7
by: Gary | last post by:
Hello guys! Bear with me, I am a newbie. She is the Data Warehouse manager. She has about 50 users to use the Oracle database from M$ Access via ODBC connection. All those users have only...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.