Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating a PostgreSQL database #25

Open
hodgesmr opened this issue Jun 16, 2014 · 5 comments
Open

Updating a PostgreSQL database #25

hodgesmr opened this issue Jun 16, 2014 · 5 comments
Labels

Comments

@hodgesmr
Copy link

Is there a mechanism in place for updating a PostgreSQL database from the latest XML dumps? I couldn't find anything other than what the README mentioned about MongoDB.

@philipmat
Copy link
Owner

philipmat commented Jun 16, 2014

Sadly no. The Discogs project doesn't give deltas to be able to easily compute updates.

@ijabz
Copy link
Collaborator

ijabz commented Jun 25, 2014

However there are two type of changes between datadumps:

  1. Existing releases/artists etc modified
  2. New releases/artists added

Because releaseids, artistids etc are sequential if you were only interested in -2 you could just say insert releases whose id is greater then the current id in the database , and so on for artists etc.

If you were interested in -1 as well if you had the the previous dump files there could be the possibility to compare each record in one dump with another and only update (or insert delete) if different.

So I think there is the possibility to do something

@philipmat
Copy link
Owner

I like the id idea, even if it introduces a higher complexity.
Alternatively, I guess we could compute a checksum for every top-level xml record and re-process those that have changed.

@philipmat philipmat added the hard label Feb 24, 2017
@pfouque
Copy link

pfouque commented Feb 27, 2017

However there are two type of changes between datadumps:

  1. Existing releases/artists etc modified
  2. New releases/artists added

There is also releases/artists removed or merged.

@philipmat
Copy link
Owner

philipmat commented Feb 27, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants