473,749 Members | 2,463 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Migrating data between dbs with different schemas

2 New Member
Hi all,
I have a database (postgresql) designed with a particular schema. I have now set up a new postgresql database to store the same data (possibly some new info added) but has a different schema. (Basically, we have designed a new application and tweaked the database schema). The new db is set up using Java5 Java Persitence Architecture (annotations etc). The problem is we need to migrate the data from the old db to the new db. Is there an easy way to do this (other than manually entering the data).
Cheers steve
Feb 13 '07 #1
2 2193
michaelb
534 Recognized Expert Contributor
One easy way to import your data is to create a data-dump with pg_dump utility.
Whether or not you can use this approach depends on how the new schema differs from the old one.
If you only added new fields you can probably use pg_dump, but you need to opt for INSERT, not COPY and you also have to use field-names

This should work unless the new fields require values.
But even if they do, there's an easy workaround.

Take a look at this:

http://www.postgresql.org/docs/8.0/s...pp-pgdump.html

Hope it helps, but in any case let us know.
Feb 13 '07 #2
Michael Raven
4 New Member
Hi all,
Is there an easy way to do this (other than manually entering the data).
Cheers steve
Well there are commecial and free software exists to solve this
e.g.
EMS DB Comparer for PostgreSQL (http://www.sqlmanager. net/en/products/postgresql/dbcomparer)
PremiumSoft Navicat, function Structure Synchronization (http://www.navicat.com )
pgdiff project (http://pgdiff.sourcefo rge.net)
and so on...
Feb 20 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
2098
by: raulgz | last post by:
Hi: I have two diferents hosts with sql server 2000: server1, server2 with two diferents bbdd database1, database2 with two diferents schemas owner1,owner2 with the same set of tables table1,table2,table3,... these tables have fk a pk with identity columns I need pass only all rows from server1.database1.owner1.table1 to
1
1915
by: Neil | last post by:
Folks, I've got a problem at work, and I'm hoping that someone out there may have had something similar (although I doubt it!) or may be able to offer some advice. I'm in the process of designing a system that interacts with a third party external firm. Basically, they will send us an XML document (the quote request) via SOAP that contains a load of info with all the information required to make an insurance quote. Our company will do
2
2192
by: Che | last post by:
Greetings, I am writing an application that uses an extendible XML file. in order to validate that XML I use a main XSD and in additional - few more extensions XSD's that uses the types in the main XSD as base types. my clients can define their own XSD's extensions and use my generic application to process their XML's. The problem:
8
6310
by: xmail123 | last post by:
Hi, As was pointed out whatever you return from a WebMethod needs to be serializable to SOAP. An ArrayList is not serializable. I will be needing to return other data types from web methods. Is there a document, or can some one list those types that are not serializable and the syntax for converting them? Thanks
4
2626
by: Collin Peters | last post by:
I have searched the Internet... but haven't found much relating to this. I am wondering on what the best practices are for migrating a developmemnt database to a release database. Here is the simplest example of my situation (real world would be more complex). Say you have two versions of your application. A release version and a development version. After a month of developing you are ready to release a new version. There have...
9
6651
by: MR | last post by:
I get the following Exception "The data at the root level is invalid. Line 1, position 642" whenever I try to deserialize an incoming SOAP message. The incoming message is formed well and its length is 642 bytes ( I have appended it to the end of this message). I suspect that the reason may have something to do with an incorrect declaration of which class to de-serialize to. In the attached code I substituted @@@@@@@ in the code below with...
3
1531
by: vj | last post by:
Please let me know , what are the various impacts on migrating UDB DB2 8.1 to Mainframes. Thanks Vijay.T
13
2445
by: Matt Fielder | last post by:
First off, if this is better posted in another group that qualifies as a manged group, please let me know. I currently have an application written in VB.Net using MSDE as the database. Current install is via InstallShield. As I've just found out that MSDE is not supported under Vista, I need to migrate to SQLExpress. I am also potentially interested in migrating to using an installer built in Visual Studio. I have a few questions:
2
1525
by: stpro13 | last post by:
Hi all, I have a database (postgresql) designed with a particular schema. I have now set up a new postgresql database to store the same data (possibly some new info added) but has a different schema. (Basically, we have designed a new application and tweaked the database schema). The new db is set up using Java5 Java Persitence Architecture (annotations etc). The problem is we need to migrate the data from the old db to the new db. Is there an...
0
8996
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8832
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9388
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9254
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8256
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6800
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6078
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4608
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2791
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.