[thelist] Database merging
Ken Moore
psm2713 at hotmail.com
Wed Jun 1 21:38:11 CDT 2005
Hi, Evolt,
>Hello:
>
>I have a question about database development.
>
>How do I go about merging databases? The problem is that the databases on
>the production and staging servers are different, and now I need to move
>stage to production. Production has some tables that no longer exist in
>stage, and vice versa. In addition, some columns have been removed and
>others added.
>
>We're running PostgreSQL 7.3.
>
As a database programmer of 20+ years, this is what I would do.
1. Make a complete back up of the entire database and store it on one of the
servers.
2. Make a complete back up of the entire database and store in another
office.
3. Make a complete back up of the entire database and store it offsite.
4. Run a complete analysis of both databases and eliminate any unused
tables.
5. Combine any tables with overlapping data (for examples: very similar
tables with add/deleted info or tables with names of people in US in
North America)
5.1 Create a new table with all of the names of all tables to be
consolidated
5.2 Combine them using SELECT statements
5.3 Determine by visual examination which columns to overwrite and which
to eliminate, giving preference to in use production name.
6. Do another complete analysis to determine the integrity between code and
column names.
7. Update code accordingly.
8. Create a duplicate development environment and NEVER change either
without the other.
Ken
If you like, contact me off line at cor412 at hotmail.com
_________________________________________________________________
Is your PC infected? Get a FREE online computer virus scan from McAfee®
Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
More information about the thelist
mailing list