RE: RE: [Objectbridge-developers] XML used in test.ojb.server, et c
Brought to you by:
thma
From: Dixon-Peugh, D. <Dav...@tp...> - 2001-01-11 18:27:25
|
Are you asking for the underlying objects of the OQL? Or something a bit more sophisticated. The underlying objects are likely just going to be nodes in a parse tree, and not really have a lot of stuff on them. The way I understand ObJectBridge will handle its OQL stuff, is that it will just take the queries, rewrite them into SQL and then execute it on the RDBMS. . . Oh, now I get it. Since data can be pulled from multiple stores at one time, it becomes necessary to do some DB type work in memory. Being able to compose a query which runs against many DBs is what you are after. So, for the OQL support we will need: 1: Parse OQL into Parse Tree 2: Rewrite the Parse Tree into one or more statements per datasource, plus one or more statements which can be handled in memory by OJB. 3: Execute each of the statements on the remote datasource, collecting data into OJB. 4: Execute the OJB specific operations to join the data 5: Return the results in the ODMG type requested. ------------ So, what you are looking for are steps 2 - 5, correct? (Step 1 is probably pretty easy. I've seen a couple of JavaCC parsers for OQL out there.) Some things we can note here: OJB does not necessarily have to implement all operations of OQL. So, theoretically, we could rewrite a "BETWEEN" that has to happen as a "<" "AND" ">" structure. (Even though it would probably be better to write "BETWEEN" in there, as <&> will take longer. OJB will probably need to index things as they come in. Fortunately, OJB also has access to the execution plan, and can build the apropriate index (without relying on someone to find it for us.) OJB will need to be able to translate OQL into SQL of the apropriate form. ----------- All in all, it looks like a tall order. It can be done however. Merant did the same type of thing for their "Reflections" ODBC driver. (Only for RDBMSes though.) David (D-P) -----Original Message----- From: obj...@li... [mailto:obj...@li...]On Behalf Of David Forslund Sent: Thursday, January 11, 2001 9:58 AM To: Mahler Thomas Cc: objectbridge Subject: RE: RE: [Objectbridge-developers] XML used in test.ojb.server, etc At 08:37 AM 1/11/2001 +0100, Mahler Thomas wrote: Between is harder and not really needed. "LIKE" is usually sufficient, although GREATER_THAN and LESS_THAN or almost as important. What we do is aggregate the constraints with "AND" and "OR". I'm not sure how to express the AND and OR with a query by example. I don't see a way to have BETWEEN, >, < and conjunction of clauses with AND or OR in a query by example solution. Of course we could start with an adhoc solution but I think it will be better to directly go for OQL, as we need to implement it anyway to be ODMG compliant. We don't see a need for "between" Simply "<",">", and "AND" provides that. I don't see how to use AND's and OR's in a QBE, either. But to implement an OQL solution, you need to have underlying Java objects. These need to be implemented first and then parse OQL to map to them. We would be interested in the underlying Java objects. Would this be a helpful feature for you? I can start working on such a functionality within the next days. In our application on sourceforge (OpenEMed), we have a persistent abstraction layer that is implemented over a number of different kinds of persistent store (ODBMS, and RDBMS). The RDBMS part uses Software Tree's JDX product that works very well. We would like to use an open source product, if at all possible, however. Castor is a likely candidate, but still is evolving rapidly. I'll have a look at your stuff to get an impression. Don't be overwhelmed by the size of our application. Look in the tools directory in the Database package to see what we are up to. I had problems to get the big tarball (> 14M) due to problems with my companies proxy servers, will try it later. You can browse the CVS repository for OpenEMed/src/tools/gov/lanl/Database to see the relevant files. Thanks, David W. Forslund dw...@la... Computer and Computational Sciences http://www.acl.lanl.gov/~dwf <http://www.acl.lanl.gov/~dwf> Los Alamos National Laboratory Los Alamos, NM 87545 505-665-1907 FAX: 505-665-4939 |