Re: changing db schema's after application deployment
- From: "Joan" <Joan@xxxxxxxxxxxxxx>
- Date: Wed, 31 Aug 2005 15:32:08 -0500
"Dave Brown" <dave@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:df4o74$roo$1@xxxxxxxxxxxxxxxxxxxxxxx
G'Day all,
Thought I'd make a post to see what other people think of something I just started to think about.. I'm developing a swing based App, at the moment during development i'm switching between using mySql & hsqldb as my database for the app(Just because I find the gui's available for mysql easier to use, but the final version will be in hsqldb,maybe..)
Anyway I started to think about what happens in the future when hopefully I have a user base and make changes to my application which require changes to the database. Say for example I add a new column to one of my tables, well I suppose in the startup code I can check for the existance of that particular column and create it if it isnt there already. Which led me to think rather than ship a already existing database, why dont I have a routine at startup that checks for the existance of a database, and creates it and then checks for the existance of each table/column.
Is this a common approach ?
It would make my life eaiser in the sense each time I make a change to my database using mysql I also have to make the change to hsqldb, recopy the hsqldb to my directoy used by my installer generator blah blah when really if the change is made once in my startup procedure then it doesnt matter what db I'm using.
Rgds,
On one of my projects last year I have a method I can call that only needs
the database name and the table name and it returns an Object[][] of the
table data, a String[] of the column names, int numRows, int numCols.
BUT, of course, in order to maintain your sanity, you need to know what
the data is before you can program something to deal with it. For example,
is it stock market data; high, low etc. or is it monthly sales of chocolate;
city, pounds, price.
I don't see how your arrangement where you change the database and expect
the program to still work the same unless you are ignoring the new info.
.
- Follow-Ups:
- Re: changing db schema's after application deployment
- From: Dave Brown
- Re: changing db schema's after application deployment
- Prev by Date: Re: changing db schema's after application deployment
- Next by Date: Re: changing db schema's after application deployment
- Previous by thread: Re: changing db schema's after application deployment
- Next by thread: Re: changing db schema's after application deployment
- Index(es):
Relevant Pages
|
|