You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ddlutils-user@db.apache.org by Tom Schindl <to...@gmx.at> on 2006/04/13 21:10:50 UTC

Adding Meta-Data Information into Database Schema

Hi,

Until now I have create my databases using the eclipse clay-plugin and
have written an utility to create nice looking HTML-documentation from
it (see http://oss.bestsolution.at/java/clay2ojb.html.en and
http://publicsvn.bestsolution.at/repos/java/clayUtils/trunk/).

Clay is nice but it has many different problems i don't want to outline
here but the key point is that I started looking for other formats to
store databases and found this project ;-)

I've taken a look to the database definition and think that it would be
a greate thing if documentation could be added using an element
<comment></comment> and not using an attribute.

One more question are you interested in an ant task which can generate
fully nice looking HTML-Dokumenation from the schema.xml and if I would
contribute it add it to the project sources?

Tom

Re: Adding Meta-Data Information into Database Schema

Posted by Tom Schindl <to...@gmx.at>.
Thomas Dudziak wrote:
> On 4/17/06, Tom Schindl <to...@gmx.at> wrote:
> 
> 
>>I've created a jira(DDLUTILS-94) entry where I've attached a sample of
>>how I think HTML-Generation could look like(customization is done using
>>css).
> 
> 
> I only had a glance at it, but I wondered why do you need the Ant task
> ? Wouldn't Ant's style task suffice ?

Well I'm creating not only one document from it but multiple ones:
1_overview.html
2_employee.html
2_address.html
2_${tablename}.html
...
3_index.html

I couldn't see how this could be done using the style task but I must
admit I haven't used the style task before ;-) You can try it by just un
packing my source into you eclipse project.

> 
> 
>>I've also already worked on an XSL to create PDF using FOP but I have
>>nothing to show up here at the moment. Other things I'm working on
>>currently:
>>- GEF DB-Designer emitting database.xml (at the moment I'm using clay
>>  but I not really happy with it)
>>- Inclusion of auto-generated ER-Diagramms into HTML using batik and
>>  SVG.
>>- Utility to convert clay-files into database.xml
> 
> 
> Cool stuff! I only tried Clay once but found it didn't do what I
> needed at that time (so I stayed with Visio then).

The most problematic stuff in clay is:
- staying database neutral
- drawing connections between models (only straight lines)

> 
> 
>>At the moment I think the database schema has the following shortcomings:
>>- only one schema
>>  => no foreign keys about schema boundries
> 
> 
> That is not exactly true because you can have multiple schemas in one
> XML file if you make the table names fully qualified, e.g.
> schemaName.tableName.

I see. But it's not really nice a more proper design would be:
--------------8<--------------
<project>
<database>
<!-- -->
</database>
<database>
<!-- -->
</database>
<database ref="file:///user-db.xml" />
</project>
--------------8<--------------

This would allow me to source in other databases into all projects ;-)

> 
> 
>>- no place for multiline comments
>>- no possibility to place custom data
> 
> 
> Well, yes. If you turn off validation, then you should be able to
> insert your own elements - the parsing should be unaffacted as long as
> the original structure is maintained.
> But surely, a schema with proper extension points would be nicer.
> 
> Tom
> 
> 


Re: Adding Meta-Data Information into Database Schema

Posted by Thomas Dudziak <to...@gmail.com>.
On 4/17/06, Tom Schindl <to...@gmx.at> wrote:

> I've created a jira(DDLUTILS-94) entry where I've attached a sample of
> how I think HTML-Generation could look like(customization is done using
> css).

I only had a glance at it, but I wondered why do you need the Ant task
? Wouldn't Ant's style task suffice ?

> I've also already worked on an XSL to create PDF using FOP but I have
> nothing to show up here at the moment. Other things I'm working on
> currently:
> - GEF DB-Designer emitting database.xml (at the moment I'm using clay
>   but I not really happy with it)
> - Inclusion of auto-generated ER-Diagramms into HTML using batik and
>   SVG.
> - Utility to convert clay-files into database.xml

Cool stuff! I only tried Clay once but found it didn't do what I
needed at that time (so I stayed with Visio then).

> At the moment I think the database schema has the following shortcomings:
> - only one schema
>   => no foreign keys about schema boundries

That is not exactly true because you can have multiple schemas in one
XML file if you make the table names fully qualified, e.g.
schemaName.tableName.

> - no place for multiline comments
> - no possibility to place custom data

Well, yes. If you turn off validation, then you should be able to
insert your own elements - the parsing should be unaffacted as long as
the original structure is maintained.
But surely, a schema with proper extension points would be nicer.

Tom

Re: Adding Meta-Data Information into Database Schema

Posted by Tom Schindl <to...@gmx.at>.
Thomas Dudziak wrote:
> On 4/13/06, Tom Schindl <to...@gmx.at> wrote:
> 
> 
>>Until now I have create my databases using the eclipse clay-plugin and
>>have written an utility to create nice looking HTML-documentation from
>>it (see http://oss.bestsolution.at/java/clay2ojb.html.en and
>>http://publicsvn.bestsolution.at/repos/java/clayUtils/trunk/).
>>
>>Clay is nice but it has many different problems i don't want to outline
>>here but the key point is that I started looking for other formats to
>>store databases and found this project ;-)
>>
>>I've taken a look to the database definition and think that it would be
>>a greate thing if documentation could be added using an element
>><comment></comment> and not using an attribute.
> 
> 
> While that certainly is helpful, the DTD is currently fixed as it is
> shared with the Torque project and it should be kept this way. Once
> the 1.0 of DdlUtils is out, I'm going to adress this issue (possibly
> with a schema instead of a DTD) which would make these changes a lot
> easier.
> Anyway, feel free to add an issue in JIRA for this.
> 
> 
>>One more question are you interested in an ant task which can generate
>>fully nice looking HTML-Dokumenation from the schema.xml and if I would
>>contribute it add it to the project sources?
> 
> 
> Hmm, I wonder, would a nice XSLT (perhaps with some Java extensions)
> suffice ? This would make it easy to generate HTML or PDF (using FOP)
> via Ant's style task. And users can adapt the stylesheets to their
> liking.
> 
> Tom
> 
> 

I've created a jira(DDLUTILS-94) entry where I've attached a sample of
how I think HTML-Generation could look like(customization is done using
css).

I've also already worked on an XSL to create PDF using FOP but I have
nothing to show up here at the moment. Other things I'm working on
currently:
- GEF DB-Designer emitting database.xml (at the moment I'm using clay
  but I not really happy with it)
- Inclusion of auto-generated ER-Diagramms into HTML using batik and
  SVG.
- Utility to convert clay-files into database.xml

At the moment I think the database schema has the following shortcomings:
- only one schema
  => no foreign keys about schema boundries
- no place for multiline comments
- no possibility to place custom data

Tom

Re: Adding Meta-Data Information into Database Schema

Posted by Thomas Dudziak <to...@gmail.com>.
On 4/13/06, Tom Schindl <to...@gmx.at> wrote:

> Until now I have create my databases using the eclipse clay-plugin and
> have written an utility to create nice looking HTML-documentation from
> it (see http://oss.bestsolution.at/java/clay2ojb.html.en and
> http://publicsvn.bestsolution.at/repos/java/clayUtils/trunk/).
>
> Clay is nice but it has many different problems i don't want to outline
> here but the key point is that I started looking for other formats to
> store databases and found this project ;-)
>
> I've taken a look to the database definition and think that it would be
> a greate thing if documentation could be added using an element
> <comment></comment> and not using an attribute.

While that certainly is helpful, the DTD is currently fixed as it is
shared with the Torque project and it should be kept this way. Once
the 1.0 of DdlUtils is out, I'm going to adress this issue (possibly
with a schema instead of a DTD) which would make these changes a lot
easier.
Anyway, feel free to add an issue in JIRA for this.

> One more question are you interested in an ant task which can generate
> fully nice looking HTML-Dokumenation from the schema.xml and if I would
> contribute it add it to the project sources?

Hmm, I wonder, would a nice XSLT (perhaps with some Java extensions)
suffice ? This would make it easy to generate HTML or PDF (using FOP)
via Ant's style task. And users can adapt the stylesheets to their
liking.

Tom