Re: changing db schema's after application deployment




"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.


.



Relevant Pages

  • Re: Opening codes
    ... Doug Steele, Microsoft Access MVP ... 'This function will disable the shift at startup causing the Autoexec ... Dim db As Database ...
    (microsoft.public.access.modulesdaovba)
  • Re: Protecting DB
    ... Security (ULS). ... Assigning appropriate permissions to various database objects ... startup properties for your users. ... to disable the Shift key bypass for those users who are wedgie resilient. ...
    (microsoft.public.access.modulesdaovba)
  • Re: changing db schemas after application deployment
    ... 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 ... 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. ... 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. ...
    (comp.lang.java.databases)
  • Re: Opening codes
    ... more secure syntax shown in http://www.mvps.org/access/general/gen0040.htm ... 'This function will disable the shift at startup causing the Autoexec ... Dim db As Database ...
    (microsoft.public.access.modulesdaovba)
  • RE: Retrieve no. of forms, tables, etc. from Access DBs
    ... There are, I believe, two ways to make screens like this ... Startup code that is... ... Any of the 25000 database in the list may contain code that runs ... If so, when I run the below example in Excel, code execution ...
    (microsoft.public.access.modulesdaovba)