Re: something like an Index?
[email protected] Thu, 18 May 2006 21:41:05 +0200
| Newsgroups | gmane.comp.java.ozone.user |
|---|---|
| Message-ID | <[email protected]> |
Thank you both for your answers. Indeed I have started planing my application with Trees given by the Java API. However, I did not take TreeMap, but TreeSet, because there must not be any duplicates. I am starting to understand how to use Ozone and I like it. It is what I was looking for. :) On Tue, 2006-04-25 at 12:13, Jimmy Stiefel wrote: > 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 Mon, 2006-04-17 at 14:28, Nicolas Barrera wrote: > As far as i 'm concerned.., > > ozone developers 're opposed to the idea of having some kind of query > language that would for example aid you to ask for 'all persons whose > name starts with "Q" and whose id is lower than 5 (etc, etc,)....' in > just one sentence > > If you re working with ozone you 'll ask the db for an object which > contain references to your persons collection and then you 'd iterate > and filter that collection in a really Object-Oriented-Programming > way. > > Off-topic: i totally agree with these guys in that the OOP way is the > nicer and better-looking (and even the correct one), but i 'm not sure > if performance is a drawback for this focus or not. > > greetings, hope i ve give you some hint.., > > lastly, if you 're looking for indexes in ozone.... well i belive that > ozone users don't care about indexes, they care about OBJECTS, so as i > said earlier, you pick up your collection and iterate it. > > c ya! > 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? ------------------------------------------------------- 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