From: Tim P. <ti...@pa...> - 2003-11-18 20:24:38
|
Hi Paul,=20 On Tuesday 18 November 2003 7:56 pm, Paul Senescu wrote: > Hello Gentlemen - > > I figured I'd keep this off Webmacro Not sure I think this is cool,=20 but here goes my 2p.=20 > , but if you have sec to respond > that would be stellar and much appreciated. > > I have noticed that with both Oracle and PostgreSQL database table name= s > and columns are either defaulted to uppercase or lower case > respectively. And I am a case sensitivity freak. I enjoy mapping my > table names to objects as well as variables to column names. I am aware > that in order to maintain case all I have to do is surround the String > with quotes in the SQL. mySQL has an env variable for tables and column= s > are case sensitive by default. I would like to move my apps to > PostgreSQL from mySQL. I enjoy mySQL because it prevents me from writin= g > stored procedures and I kind of just use it for a data store and create > pseudo procedures in my app layer that I can just call. But I like the > idea of schemas and functions, etc. > > My questions are: > - How do you do it? Melati does not enforce that you use all lowercase for sql types but=20 it was assumed that that would be the way one would use it.=20 Melati will generate methods with names derived from the column/table=20 name.=20 The original idea was that a filed such as 'display name' would look like= =20 this: jdbc: displayname method: setDisplayname, getDisplayname Meta Data: Display Name However, as there was no compulsion and because we were forced to quote=20 all column/table names by dbs other than postgresql you can now use=20 jdbc: displayName method: setDisplayName, getDisplayName Meta Data: Display Name > - Is everything in uppercase or lowercase? The idea was that we would capitalise only the first letter, and that=20 a wierdly named method such as setDisplayname gave you a clue that it=20 was not a normal data field.=20 > - Does your preserved model maintain case then when you generate script= s yes, all names are quoted when we access the db. > you just leave out the quotes and allow the dB to convert the names t= o > whatever it wants? No, as Melati can cope with many different dbs, with different naming=20 conventions, and differing quoting conventions, we are forced to quote ev= ery=20 name in a db specific manner, fortunately Melati does it all for you.=20 > - Is the technology moving away for dB's and just using XML (I'd like t= o > stick to a dB, in particular postgre)? I don't think so, how could anyone really replace Oracle? There is the jakarta XMLDB project, I would be interested in others views= =2E > - Do you escape the quote in ever SQL String that you create in a .java > file? Yes, fortunately Melati ensures that I NEVER have to write any SQL.=20 > > Any feedback would be much appreciated. your welcome, but I think that bypassing the archiving and the rest of th= e=20 community does webmacro a diservice,=20 whilst I would very much like you as an individual to use Melati=20 I would also like the other webmacro users to see my comments and for=20 google to be able to access them . Dammit, I am going to copy webmacro=20 cheers timp > > cheers > paul > > =A4 http://www.spydercomm.com =A4 |