Hello out there!
That's a rather generic issue so I hope I've chosen the correct forum in the end.
I'm about to write a DB-Query application.
The access is READ-ONLY and against already-existing schemas.
Let me explain the odds & ends:
A Client (provides the GUI for the queries) connects to a server/retrieves
a server-instance (JNDI/RMI) that provides a list of datapools.
A dataPool is configured using a plugin mechanism, where a plugin consists
of a xml-configuration, describing the db-host, the plugin/dataPool starter-class
and things like what will be presented to the user in the gui.
The "what the user will see" part consists of:
a query editor to write and execute plain, old SQL Available pre-defined queries, with coresponding parameters A list of Entities and their attributes, from which the user can drag/drop a sample table to define how the result list will look like and what the query constraints would be (this comes down to a QBE implementation)
You may have seen this QBE approach in Paradox, Star/Openoffice (yes, Access is similar)
The crucial part: The list of entities is either generated from the database metadata,
JDBC provides nice functionality for this, or provided by classes, delivered with the plugin, to
provide the user with functional names/relations rather then the techy-named tables/columns.
(the functional-to-technical translation may be done via config files or read from an existing repository
like most CRMs bring with them).
The helper classes from the plugin will know how to generate the SQL for a given Entity and their related Entities - if the user chose such things.
Now the "reinvent the wheel" part. There are a lot of frameworks out there, in particular Hibernate that allow for abstract query (QBE) generation. I have no experience with this but from what I've read across the web it would be hard to form a QBE for:
the relations: a(id), b(id), ab(aID, bID) and to retrieve "the 'a's that are linked to every 'b'" which would resolve to a query like
or
or (fancy stuff with HAVING)
or ...
You get the point.
Now we need a question:
Do you know of any QBE implementations that allow complex query generation
(I've read that hibernate has an implementation of QBE and E-QBE but never worked with them, tbh, I've little experience with hibernate) ?
Can you suggest frameworks for what I want to achieve?
Is my intention clear at all, if not, what other information do you need?
Is there something I should get straight in my thoughts about the problem ?
Looking forward to your comments!
Regards.
That's a rather generic issue so I hope I've chosen the correct forum in the end.
I'm about to write a DB-Query application.
The access is READ-ONLY and against already-existing schemas.
Let me explain the odds & ends:
A Client (provides the GUI for the queries) connects to a server/retrieves
a server-instance (JNDI/RMI) that provides a list of datapools.
A dataPool is configured using a plugin mechanism, where a plugin consists
of a xml-configuration, describing the db-host, the plugin/dataPool starter-class
and things like what will be presented to the user in the gui.
The "what the user will see" part consists of:
You may have seen this QBE approach in Paradox, Star/Openoffice (yes, Access is similar)
The crucial part: The list of entities is either generated from the database metadata,
JDBC provides nice functionality for this, or provided by classes, delivered with the plugin, to
provide the user with functional names/relations rather then the techy-named tables/columns.
(the functional-to-technical translation may be done via config files or read from an existing repository
like most CRMs bring with them).
The helper classes from the plugin will know how to generate the SQL for a given Entity and their related Entities - if the user chose such things.
Now the "reinvent the wheel" part. There are a lot of frameworks out there, in particular Hibernate that allow for abstract query (QBE) generation. I have no experience with this but from what I've read across the web it would be hard to form a QBE for:
the relations: a(id), b(id), ab(aID, bID) and to retrieve "the 'a's that are linked to every 'b'" which would resolve to a query like
or
or (fancy stuff with HAVING)
or ...
You get the point.
Now we need a question:
Do you know of any QBE implementations that allow complex query generation
(I've read that hibernate has an implementation of QBE and E-QBE but never worked with them, tbh, I've little experience with hibernate) ?
Can you suggest frameworks for what I want to achieve?
Is my intention clear at all, if not, what other information do you need?
Is there something I should get straight in my thoughts about the problem ?
Looking forward to your comments!
Regards.