Thread: AW: AW: AW: [Objectbridge-developers] generating mapping files an d da taba ses
Brought to you by:
thma
From: Mahler T. <tho...@it...> - 2001-08-24 10:35:15
|
Hi again, > -----Urspr=FCngliche Nachricht----- > Von: Ivan Toshkov [mailto:to...@cr...] > Gesendet: Donnerstag, 23. August 2001 17:14 > An: Mahler Thomas > Cc: 'Lasse Lindg=E5rd'; obj...@li... > Betreff: Re: AW: AW: [Objectbridge-developers] generating=20 > mapping files > and da taba ses >=20 >=20 > On Thu, 2001-08-23 at 16:40, Mahler Thomas wrote: > > > Unfortunately, there isn't quite enough data in the=20 > > > repository.xml file > > > to generate the correct SQL statements. So far, I don't=20 > know when to > > > generate 'NOT NULL' and the size of VARCHAR objects. > > >=20 > > > So, perhaps we should add this data to the XML? > > >=20 > >=20 > > Yes I have been thinking in this direction too. >=20 > Ok, I've added the following two attributes to jdbc_type:=20 > 'not-null' and > 'size'. The problem is that (even in the test repository) many = tables > are described in several places each, which can lead to inconsitency. > So, what do you think of the following form? >=20 > <MappingRepository> > <JdbcConnectionDescriptor id=3D"default"> > ... > </JdbcConnectionDescriptor> > <JdbcConnectionDescriptor id=3D"other"> > ... > </JdbcConnectionDescriptor> > ... I like this idea to keep the JdbcConnectionDescriptors out of the ClassDescriptors! > <TableDescriptor name=3D"table_name" id=3D"tableId" > [jdbc-ref=3D"other"]> > <ColumnDescriptor name=3D"columnName" [primaryKey=3D"yes|no"] > [not-null=3D"yes|no"] .../> > </TableDescriptor> > ... it's also good to have tables separately described from classes, as = several classes may be mapped to the same table! I think we need some more information for jdbc_type, as size works only = for CHAR(X) and VARCHAR(Y), but there are also things like DECIMAL(6,2) or NUMERIC(3,8) allowed in SQL ! Maybe it's also a good idea to have a switch [indexed=3D"yes|no"]. This = would allow to generate indexes on certain columns that are used in where = clauses. > <ClassDescriptor [table-ref=3D"tableId"]> > ... > <FieldDescriptor [column-name=3D"columnName"]> > ... > </FieldDescriptor> > </ClassDescriptor> > </MappingRepository> >=20 >=20 >=20 |
From: Ivan T. <to...@cr...> - 2001-08-24 10:48:23
|
On Fri, 2001-08-24 at 12:47, Mahler Thomas wrote: > Hi again, >=20 > > -----Urspr=FCngliche Nachricht----- > > Von: Ivan Toshkov [mailto:to...@cr...] > > Gesendet: Donnerstag, 23. August 2001 17:14 > > An: Mahler Thomas > > Cc: 'Lasse Lindg=E5rd'; obj...@li... > > Betreff: Re: AW: AW: [Objectbridge-developers] generating=20 > > mapping files > > and da taba ses > >=20 > >=20 > > On Thu, 2001-08-23 at 16:40, Mahler Thomas wrote: > > > > Unfortunately, there isn't quite enough data in the=20 > > > > repository.xml file > > > > to generate the correct SQL statements. So far, I don't=20 > > know when to > > > > generate 'NOT NULL' and the size of VARCHAR objects. > > > >=20 > > > > So, perhaps we should add this data to the XML? > > > >=20 > > >=20 > > > Yes I have been thinking in this direction too. > >=20 > > Ok, I've added the following two attributes to jdbc_type:=20 > > 'not-null' and > > 'size'. The problem is that (even in the test repository) many tables > > are described in several places each, which can lead to inconsitency. > > So, what do you think of the following form? > >=20 > > <MappingRepository> > > <JdbcConnectionDescriptor id=3D"default"> > > ... > > </JdbcConnectionDescriptor> > > <JdbcConnectionDescriptor id=3D"other"> > > ... > > </JdbcConnectionDescriptor> > > ... >=20 > I like this idea to keep the JdbcConnectionDescriptors out of the > ClassDescriptors! >=20 > > <TableDescriptor name=3D"table_name" id=3D"tableId" > > [jdbc-ref=3D"other"]> > > <ColumnDescriptor name=3D"columnName" [primaryKey=3D"yes|no"] > > [not-null=3D"yes|no"] .../> > > </TableDescriptor> > > ... >=20 > it's also good to have tables separately described from classes, as sever= al > classes may be mapped to the same table! > I think we need some more information for jdbc_type, as size works only f= or > CHAR(X) and VARCHAR(Y), but there are also things like DECIMAL(6,2) or > NUMERIC(3,8) allowed in SQL ! > Well, this may not be the best solution, but size=3D"3, 8" could do the trick. Of course, if there is more information needed, we should put it. > Maybe it's also a good idea to have a switch [indexed=3D"yes|no"]. This w= ould > allow to generate indexes on certain columns that are used in where claus= es. >=20 Sure! |
From: <ll...@li...> - 2001-08-24 12:50:00
|
Have you looked at the http://castor.exolab.org format for mapping files ?? As far as I can read from their mailing list several project exists that can generate castor mapping files. DDL programs also exists. I don't know castor JDO that well, but I looked at the mapping files and they look pretty much the same contentwise as the objectbridge ones. Wouldn't that be better than reinventing the wheel ? /Lasse |
From: Thomas M. <tho...@ho...> - 2001-08-26 10:20:39
|
Hi Lasse, Lasse Lindg=E5rd wrote: > = > Have you looked at the http://castor.exolab.org format for mapping file= s > ?? > = > As far as I can read from their mailing list several project exists tha= t > can generate castor mapping files. DDL programs also exists. > = > I don't know castor JDO that well, but I looked at the mapping files an= d > they look pretty much the same contentwise as the objectbridge ones. > = > Wouldn't that be better than reinventing the wheel ? Sure the best thing would be to have a standardized DTD for O/R mappings. There are also some attempts in this direction (see for example Jon Garfunkels LORAX project http://www.coopdata.net/software/lorax/). There is also XMI which tries to be a unifed standard for UML models... There is also a DTD for describing mappings in JDO... But I none of these attempts has succeeded as a generally accepted standard. I also had a look at the Castor DTD. Of course it has things in it we could reuse. But it's all so intermixed with stuff for XML mapping, LDAP access, etc. that I won't like to have it as grammar for describing O/R mapping. Sure it would be great to have an O/R mappings interchangeable between both tools! = So long as there is no standard I guess the best thing we can do is to have a very simple DTD that fits all OJB mapping needs and nothing more. This will keep parsing simple. Once there is an established standard we can easily adopt to it. --Thomas > = > /Lasse > = > _______________________________________________ > Objectbridge-developers mailing list > Obj...@li... > http://lists.sourceforge.net/lists/listinfo/objectbridge-developers |
From: <ll...@li...> - 2001-08-26 17:03:50
|
Yeah. You are right there. The formats are too unestablished to depend on. It would be pretty easy to generate a XSLT program that can transform between the two formats. Then the castor tools would be applicable to ObJectBridge. Once I get to know the format better, I might be able to produce such a stylesheet. Then I could contribute the stylesheet to the castor tools as an objectbridge extension. /Lasse -----Original Message----- From: obj...@li... [mailto:obj...@li...] On Behalf Of Thomas Mahler Sent: 1. januar 1997 00:30 To: Lasse Lindg=E5rd Cc: obj...@li... Subject: Re: AW: AW: [Objectbridge-developers] generating mapping files and da taba ses Hi Lasse, Lasse Lindg=E5rd wrote: >=20 > Have you looked at the http://castor.exolab.org format for mapping files > ?? >=20 > As far as I can read from their mailing list several project exists that > can generate castor mapping files. DDL programs also exists. >=20 > I don't know castor JDO that well, but I looked at the mapping files and > they look pretty much the same contentwise as the objectbridge ones. >=20 > Wouldn't that be better than reinventing the wheel ? Sure the best thing would be to have a standardized DTD for O/R mappings. There are also some attempts in this direction (see for example Jon Garfunkels LORAX project http://www.coopdata.net/software/lorax/). There is also XMI which tries to be a unifed standard for UML models... There is also a DTD for describing mappings in JDO... But I none of these attempts has succeeded as a generally accepted standard. I also had a look at the Castor DTD. Of course it has things in it we could reuse. But it's all so intermixed with stuff for XML mapping, LDAP access, etc. that I won't like to have it as grammar for describing O/R mapping. Sure it would be great to have an O/R mappings interchangeable between both tools! =20 So long as there is no standard I guess the best thing we can do is to have a very simple DTD that fits all OJB mapping needs and nothing more. This will keep parsing simple. Once there is an established standard we can easily adopt to it. --Thomas >=20 > /Lasse >=20 > _______________________________________________ > Objectbridge-developers mailing list > Obj...@li... > http://lists.sourceforge.net/lists/listinfo/objectbridge-developers _______________________________________________ Objectbridge-developers mailing list Obj...@li... http://lists.sourceforge.net/lists/listinfo/objectbridge-developers |