I want to represent some java concepts in a database schema. I don’t mean persist instances into Hibernate, I mean represent java’s type system as a series of tables and rows.
So for instance, with respect to types there are a certain definite set of relationships I would like represent. For example, there are two types in Java , primitive types and reference types, and primitive types break down into numeric and boolean and numeric breaks down into integral and floating type and integral breaks down into byte short int long and char and floating types break out into float and double (I think I got that right) .
Java also has classes and classes have methods and methods have signatures and constructors and return types and arguments , both of which have some type.
So I want to create a database that represents this kind of information in 3NF form. Such a database would permit queries about object instances which would be the data put into the database.
Is there anything like this ? I am turning up nothing useful in Google maybe because it’s hard to compose a query that doesn’t land you in JDBC and Hibernate territory. Still, I think someone must have already done this; maybe there’s even a standard or an RFC out there that I don’t know about.
What I don’t want is to try to reverse engineer some aspects of something like hibernate or anything like. I think that would actually be a largish task with very little payoff. It’s not that I can’t do it from scratch (after the usual false starts and mistakes have been made), it’s that I am wondering if it hasn’t already been done and spec’ed out somewhere.
Many thanks.
Not in the sense that you mean. This wheel has been invented before in various ORM mapping products, but I’m not aware of anyone who has done in independently of such a product. (Why would someone be motivated to do that? Its not like there are 100’s of projects that would make use of that work …)