Requirement Summary
View DB data (row content) and tree-navigate along references (foreign keys) while presenting their corresponding JPA (Java Persistence API) definitions / metadata
Use Cases
- As a developer, I need to understand existing test/staging data through the lens of Java objects as mapped to the DB schema by JPA.
- As a support person, I need to understand some specific production data quickly (navigation), with the help of any metadata I can get (Java classes/fields/enums, along with their javadocs and annotations)
Current Pain
For understanding DB data, I need to switch back and forth between DB view and Java source IDE, searching for DB-side names in Java source code's JPA annotations.
Essential Features
- navigate / explore references via foreign keys, whether explicit or not, by the virtue of them being defined by JPA annotations
- present Java element names, annotations, and any javadocs
- class javadocs on tables
- field/property javadocs on columns
- present Enum values as text (where persisted as numbers), also along with any javadocs on the enum and its enum class
Example
- Starting e.g. with a simple SQL/JPQL query (or some other means) to get to some rows, such as:
select * from book where id=55;
- The tool should display:
- the row of table 'book' with id=55 along with the Java class name 'Book' that's mapped to table 'book' via JPA; include the 'Book' class javadoc as info popup or in a side panel
- each column for that row shows the column name along with the Java field that's mapped to that column. Examples:
- "Tom Sawyer" - book_title:varchar(255) <- bookTitle:String
- "Mark Twain" - author_id:bigint <- author:Author
- ^^ This is a reference; whether 'author_id' is explicitly defined in the DB schema as a foreign key or not, it should be easily possible to tree-navigate to the author of a book from this field, by the virtue of its Java type being another JPA Entity class.
- "3" - genre:int <- genreType:GenreType, "AMERICAN_FICTION"
- ^^ This is an enum; it should display the corresponding Java enum name
Closest Matches
- DBeauty: lets you navigate DB data along foreign key references, but no display of JPA definitions
- JPA plugins for IDEs such as JPA Buddy: let you view and edit JPA mapping to DB schema, but no navigation of actual data and presenting it according to Java definitions