-
1. Re: Location for module generic but Oracle specific SQL scri
jae77 Sep 22, 2004 10:48 AM (in response to mlavergn)i don't see anything wrong w/ that location. i would recommend using a similiar format to the setup.xml file so that either a .sql file and/or a beanshell script can be generated via xlst to help make things a bit easier.
in some cases if the table structure have actually changed, it may be easier to write export/import scripts and have the user just re-create the tables. -
2. Re: Location for module generic but Oracle specific SQL scri
mlavergn Sep 22, 2004 11:24 AM (in response to mlavergn)Good point, it would be in the form "nukes10.xml" in a setup.xml flavor, not a plain SQL script, my bad there.
I also agree with your second point, Oracle's ability to deal with table structure changes in-db varies quite a bit by Oracle version so exp/imp is the easiest catch-alll solution for those. Although, in theory, an Ant script that detects Oracle version and determines a course of action (in-db vs. exp/imp) could be more efficient ... but hopefully that's nothing we need to deal with in the immediate future! -
3. Re: Location for module generic but Oracle specific SQL scri
theute Sep 22, 2004 12:09 PM (in response to mlavergn)setup.xml allows us to use them in the installer for an even easier way to install nukes.
We should look for something database independent. Julien told me about LDBC http://ldbc.sourceforge.net/ and it might be a good point, they don't support SAPDB yet though... ( i saw users using Nukes with SAPDB on the forum)
But they support:
Oracle 8.1.7
Oracle 9.2.0
Microsoft SQL server
MySQL
IDM DB2
Postgresql
PointBase
HSQLDB
and few others not tested
It would greatly help us as we would have to write only 1 setup.xml for all those databases. All the queries are very simple table creation and insertions so LDBC should not have any trouble. -
4. Re: Location for module generic but Oracle specific SQL scri
jae77 Sep 22, 2004 1:44 PM (in response to mlavergn)LDBC looks interesting and may help solve this issue perminantly.
off the top of my head, i think ppl would still be able to use any database of their choosing, but there would be a bit more work involved b/c they would have to manually create the tables and load the data themselves (in addition to changing the datasource db driver, etc). -
5. Re: Location for module generic but Oracle specific SQL scri
julien1 Sep 22, 2004 2:01 PM (in response to mlavergn)loading the data is a pain, because each database as a different way to express it.
boolean is expressed as "true|false" in hsqldb whereas it is expressed as 0/1 in mysql for instance. -
6. Re: Location for module generic but Oracle specific SQL scri
jae77 Sep 22, 2004 2:16 PM (in response to mlavergn)i think LDBC should handle this through their grammar mapping, so it may make it a non-issue. since the wife is going to be out of town this weekend and i don't have anything to do as of right now, i may be able to prototype something real quick to see what happens.
i'm thinking that if it does work we may be able to continue to use a 'pure' cmp approach and build a "default data" module that will prompt you to load default data if necessary, but this would need to be flushed out a bit more. -
7. Re: Location for module generic but Oracle specific SQL scri
julien1 Sep 22, 2004 2:36 PM (in response to mlavergn)You have to check first that something like : "INSERT INTO BLAH ('aaa',1,true) works, i.e work with Statement.
Because if it does rely on PreparedStatement when you execute something your statement looks like "INSERT INTO BLAH (?,?,?)" then the proprietary driver takes care of marshalling the types when it talks to the database.
LDBC could be used only to create portable CREATE TABLE/DROP TABLE statements. Perhaps it could work for Statement.