gotchaMinor
Difference between storing a DBUnit file in version control and using Liquibase for Database Version control?
Viewed 0 times
filedbunitcontrolversionliquibasedatabasedifferencebetweenusingfor
Problem
What is the difference between storing a DBUnit database-loadable xml file in version control, and using Liquibase for database version control?
I'm relatively familiar with DBUnit having used it in Matt Raible's Appfuse project, and I've used it for unit testing in projects based on Appfuse. It never crossed my mind before, but it would seem to me that it could also be used for Database version control.
Now Liquibase appears to be used for version control of a database, but I fail to see how another tool is needed for this when you can just pull database changes using DBUnit, and get your data with it as well (storing that file in version control to facilitate your db vcs needs.)
There must be a reason that both of these tools exist, but I can't understand what the difference in scope between them is, could someone please explain this to me?
I'm relatively familiar with DBUnit having used it in Matt Raible's Appfuse project, and I've used it for unit testing in projects based on Appfuse. It never crossed my mind before, but it would seem to me that it could also be used for Database version control.
Now Liquibase appears to be used for version control of a database, but I fail to see how another tool is needed for this when you can just pull database changes using DBUnit, and get your data with it as well (storing that file in version control to facilitate your db vcs needs.)
There must be a reason that both of these tools exist, but I can't understand what the difference in scope between them is, could someone please explain this to me?
Solution
From their own FAQ:
"Can I use DbUnit in order to check and execute DDL statements?
No. DbUnit is not intended to track or test structural DB changes. For this purpose check out liquibase."
So it appears that DbUnit is useful for storing data differences between different versions of a database, while LiquiBase is for schema changes.
"Can I use DbUnit in order to check and execute DDL statements?
No. DbUnit is not intended to track or test structural DB changes. For this purpose check out liquibase."
So it appears that DbUnit is useful for storing data differences between different versions of a database, while LiquiBase is for schema changes.
Context
StackExchange Database Administrators Q#2115, answer score: 2
Revisions (0)
No revisions yet.