metaperl wrote:
Quote:
If you went to a company and saw that their programming applications
were pulling data from un-normalized tables, how would you transition
them to normalized tables and yet keep the application running
smoothly? |
First of all, decide if it's worth it to do this. Sometimes the
information systems have a limited lifespan, and it's not worth the
effort to redesign it, if the whole system will be replaced a few months
later. Or if the company goes under.
But here's one possible plan:
1. Rename the current tables to something else.
2. Create updatable views to those tables, in a simple one view to one
table fashion.
3. Gradually restructure the underlying tables to be normalized, as you
redefine the views' query to re-form the non-normalized representation.
This way minimizes rewriting code in the applications using these tables.
But it depends on having a good implementation of views, that permits
using triggers or something, to make views on complex queries into
updatable views (which eliminates MySQL, because they have no solution
to make such views updatable).
Or else you need to rewrite the INSERT/UPDATE/DELETE queries to write to
the underlying tables, even if you continue to use the SELECT queries
without alteration.
Regards,
Bill K.