VO-DML <-> database schema

Gerard Lemson glemson1 at jhu.edu
Thu May 14 16:59:55 CEST 2020


JPA is only for Java and is not generic enough to represent full mapping of Vo-DMl data models to tables.
But we did generate JPA (and JAXB)-annotated java classes as well.
If we could come up with a standard serialization of VO-DML as TAP_SCHEMA one might indeed not need annotation at all.
But I don’t see that happening.



On 2020-05 -14, at 14:47, Gerard Lemson <glemson1 at jhu.edu<mailto:glemson1 at jhu.edu>> wrote:

Short follow up:
Would be nice to represent the mapping as a votable with empty tables, annotated with the data model.
But there are some substantial complications with a relational mapping caused by freedoms allowed in VO-DML wrt VO-URP.
Such as data type inheritance and attributes/references with cardinalities > 1.

For that sort of thing, I think that the JPA annotations do a fairly good job - it might be nice to adopt a similar set of annotation concepts - TBH in the past, when I wanted to create data models, I have tended to hand write Java POJOs and then JPA and JAXB annotate them to produce DDL and XML schema. I liked the way that the Java annotations were “close” to the related data items, but I cannot think of a way of doing that directly with the VO-DML, so I agree that a separate mapping document is needed - I am not sure that I am keen on your VOTable suggestion though, as it effectively requires annotating the whole model rather than just having to write the (hopefully) few rules where the “default” behaviour is not sufficient or decidable.

Cheers,
              Paul.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ivoa.net/pipermail/dm/attachments/20200514/521c12ee/attachment-0001.html>


More information about the dm mailing list