Re: something like an Index?
Jimmy Stiefel <[email protected]> Tue, 25 Apr 2006 03:13:31 -0700
| Newsgroups | gmane.comp.java.ozone.user |
|---|---|
| Message-ID | <1145960012.3441.215.camel@crystal> |
You build your own indexes in Ozone any way you want. In your example, I'd recommend something along the lines of a TreeMap inside an Ozone object so it is persistent. Make Person extend OzoneRemote so it is a first class persistent object. Define Index that extends OzoneObject, and wraps a TreeMap in its impl. Create two Index in the database & name them, one to map id -> Person "id_index", one to map name -> Person "name_index". Write a little code to keep them consistent and that's it. Use TreeMap methods like submap for qeuries, throw in some regular expressions for more powerful searching. Whatever query methods you need, make sure to write them as methods on your Index so the collection traversals and contained object method invocations all happen inside the server context so they are local calls and therefore fast. ~Jimmy On Sat, 2006-04-15 at 16:08 +0200, Martin Walch wrote: > Hello, > > I'm new to ozone and also rather new to databases in general. > For my current project some kind of OODBMS seems to be a good choice. > However, beside some rather complex structures, I've got also long lists > of Objects of the same class. > Concretely: I have got a list of persons with names, addresses, ids and so on. > I need to find somebody in this list either by name or by id. Both options must work fast. > So in a RDBMS like e. g. MySQL I would probably create an index for names and one for ids. > Well, this is no RDBMS. > > How can I implement this in Ozone? > _______________________________________________________________ > SMS schreiben mit WEB.DE FreeMail - einfach, schnell und > kostenguenstig. Jetzt gleich testen! http://f.web.de/?mc=021192 > > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting language > that extends applications into web and mobile media. Attend the live webcast > and join the prime developer group breaking into this new coding territory! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > _______________________________________________ > Ozone-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/ozone-users ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642