You are here: Re: SQL 2005: creating "correct" and "incorrect" versions of a database « MsSQL Server « IT news, forums, messages
Re: SQL 2005: creating "correct" and "incorrect" versions of a database

Posted by Erland Sommarskog on 06/20/06 22:19

metaperl (metaperl@gmail.com) writes:
> I work at a place which is currently running SQL 2000, but they are
> planning to migrate to 2k5. I was thinking that this is the perfect
> opportunity to fix all the weaknesses we have had in our data model for
> the longest: primary keys and foreign keys with different names, use of
> character columns for boolean fields, use of integer columns for
> toggles, no referential integrity, etc.
>
> So, even if I create my Utopian perfect data model and modify all of
> our data loaders to use it, our live website must use the old incorrect
> version because there is way too much work involved in redoing the
> code.
>
> My question then becomes: if I have a correct version, how easy and
> with what approach would one take the data in the correct one and
> mirror it to the poorly designed schema?

I'm not really sure that I see the point with redesigning the
data model, but then replicate the data to the old crappy version.
Or is the web site, only one consumer of the database? What if
updates are performed from the web site?

What you could do is to redo the data model, but then define views
that mimicks the old tables. But again, this would be useful if you
also start with a long-term conversion of the web site.

--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация