RE: [Objectbridge-developers] [Fwd: [objectbridge - Open Discussion] New repository.xml/dtd propo
Brought to you by:
thma
From: Ivan T. <to...@cr...> - 2001-08-29 13:20:59
|
On Wed, 2001-08-29 at 14:34, Lasse Lindg=E5rd wrote: > Thomas, >=20 > I think you misunderstood my mail a little.=20 >=20 > As I see it we have two use cases that contradict eachother: > 1) You can have several classes that map into just one table >=20 > 2) The names of the database collumns is 99% the same as the java > properties. >=20 > 1, points to Ivans scheme. 2, points to having just one mapping > structure as I propose. >=20 > The way I see it the both cases will potentially produce redundant > information. > I just feel that the 2nd case will be much more common. >=20 > /Lasse >=20 Perhaps, I should explain why I proposed this scheme in the first time: I tried to generate the DDL from the current XML structure. As you can see, most of the data is already there, so there shouldn't be much trouble doing that. But most data is not all data! We need to add indexes, size attributes for jdbc_types and maybe more. Now let's look at the simple example described in repository.xml. $ grep 'table.name' | sort=20 produces: <table.name>Artikel</table.name> <table.name>Artikel</table.name> <table.name>BOOKS</table.name> <table.name>CDS</table.name> <table.name>Kategorien</table.name> <table.name>Kategorien</table.name> <table.name>Kategorien</table.name> <table.name>Kategorien</table.name> <table.name>OJB_DLIST_ENTRIES</table.name> <table.name>OJB_DLIST</table.name> <table.name>OJB_DLIST</table.name> <table.name>OJB_DMAP_ENTRIES</table.name> <table.name>OJB_DMAP</table.name> <table.name>OJB_DSET_ENTRIES</table.name> <table.name>OJB_DSET</table.name> <table.name>OJB_NRM</table.name> <table.name>OJB_SEQ</table.name> <table.name>ORDER_POSITION</table.name> <table.name>PRODUCT</table.name> <table.name>PRODUCT</table.name> <table.name>TREEGROUP</table.name> <table.name>TREE</table.name> Which means, 2 classes map to table Artikel, 4 classes map to table Kategorien and so on. Actually, there are 22 table descriptions for 16 unique tables 37.5% overhead. Currently, we only have three database related entries for each field (jdbc_type, column.name and PrimaryKey). Adding two more in a bigger project and you are lost (or at least I am :).=20 Of course, this is not an exhaustive reserch on my part so you don't have to put too much fate on my calculations. Perhaps, the best solution will be to support both by XSLT or another program? -- Ivan |