Discussion:
[Ozone-users] something like an Index?
Martin Walch
2006-04-15 12:09:04 UTC
Permalink
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
Nicolas Barrera
2006-04-17 10:30:04 UTC
Permalink
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!
Post by Martin Walch
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
https://lists.sourceforge.net/lists/listinfo/ozone-users
Jimmy Stiefel
2006-04-25 08:14:11 UTC
Permalink
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
Post by Martin Walch
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
https://lists.sourceforge.net/lists/listinfo/ozone-users
w***@web.de
2006-05-18 17:52:10 UTC
Permalink
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. :)
Post by Jimmy Stiefel
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
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!
Post by Martin Walch
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?
Loading...