Re: Storing lots of (unnamed?) objects with ozone

Leo Mekenkamp <[email protected]>
Newsgroups gmane.comp.java.ozone.user
Message-ID <[email protected]>
On Tue, 2004-05-25 at 03:43, Benjamin Podszun wrote:
> Hi there.
> 
> I'm currently working on a quite big web portal project (design
> stage/proof of concepts/evaluation currently) and - since I'm really
> annoyed by SQL in code and interested in a completely oo-oriented design
> I found this project. I read the documentation and samples and played a
> little with it, but I still have some questions that arise:
> 
> 1)
> I need to store lots (thousands/more) of persistant objects. Since I'm
> not (yet) used to this design paradigm: How can I efficently store (and
> more important: retrieve) such objects? My first thought was to
> implement a persistant ListObject for any type of object I need to store
> and to use my own stubs to make sure that I
> a) don't have all objects in memory as soon as I want a single one
> b) don't need to name all objects (linked lists perhaps?)
> Has anyone done this? This is supposed to be a web application. Is the
> performance (given that I design it the right way (TM)) sufficient with
> really lots of objects?
> 
> 2)
> I really have problems (headache..) to think about both ozone and
> different views on my objects/data.. I try to avoid the word selection
> here, but - that's what it ends up to be.. Do you know any howtos/guides
> to handle something like "Get me all of my users that live in Canada and
> don't speak french"?
> 
> I'd be glad to get a little help, even if it reads "Go back to google
> again" or "Sorry, I think you want to stick to relational databases with
> your requirements/current knowledge about oodbms".

Every technology has its pros and cons. The big pro for a relational
(SQL supporting) database lies in its flexibility to process all sorts
of different queries that are specified at runtime. The big pro for an
object database lies in its ability to store complex object models
without much hassle.

When you constantly need to do stuff like "Get me all of my users that
live in Canada and don't speak french" and right after that "...and are
older than 21" and more of that sort of queries, you should definitely
consider using a relational database. Not that ozone could not cope with
this sort of thing, but it would probably be significantly slower than
an rdbms: to compare 1 property in 2 database objects those objects have
to be deserialized completely before they can be compared to each other;
an rdbms can have all sorts of optimizations to avoid reading/writing
too much.

What it all boils down to is: 1) how complex is the data model 2) how
complex and ever changing are your queries. If you only need to store
users and their preferences and need to retrieve them in all sorts of
different ways, that suggests using an rdbms. If you need to store
entities, some of which are users, some are companies, some are
whatever, and where users are divided in sub-categories, each with their
own properties, and all of these entities need to be connected to each
other, and you use simple queries, that suggests using an odbms.

Cheers,
Leo




-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.