Hi,

there is one marginal difference if you want to *insert*
objects from applications *outside* of OJB (without
using OJB).
If you want to do that, your database have to generate
the UID's to keep your data consistent (per default OJB
use a table based high/low sequence generator called
SequenceManagerHighLowImpl).

With MySQL you can use Identity columns (supported by
SequenceManagerNativeImpl), with PostgreSQL
database based sequence keys (supported by
SequenceManagerNextValImpl).

OJB identify each persistence capable object by a unique
ojb-Identity objects. These ojb-Identity
objects were created using the sequence manager instance to
get UID's. When doing an insert a ojb-Identity object is
created before the real object was written to database.

That's no problem when using database based sequence keys,
the sequence manager ask the DB for the next key - that's it.
When using Identity columns that is not possible, because
as recently as the real object was written to database, you
can ask the DB for the last generated UID. Thus in
SequenceManagerNativeImpl we have to do a trick and use
a 'temporary' UID till the object was written to database.

Conclusion, in this special case I would recommend a DB
supporting database based sequence keys.

regards,
Armin


Jason Pyeron wrote:


MySQL is designed to be efficient at the sake of loss of ANSI 92 comliance.

PostGreSQL is a great DATABASE but thats about it, poor admin, not that fast when it really matters.



On Mon, 17 Nov 2003, Robert J Celestino wrote:


As far as ease of use with ojb, all are equal.

So the following is just about preference, but take this with a grain of salt since I am, by no means, a database "expert" (could that be why I am using OJB? :-) ).

I have used both postgresql and mysql on real production products. The impression I get from most DB types, is that mysql is a "toy database" and postgress is more "industrial strength". This may have been true 5 years ago, but I don't think that is true anymore.

I find that mysql has nicer tools.

Given my experience I would vote for mysql. I find it up to any task I throw at it.

----------------------------------------------------------------
Bob Celestino
SAS Research and Development
919 - 531 - 9425
[EMAIL PROTECTED]

SAS - The Power to Know


> -----Original Message-----
> From: Jewett, Diane C [mailto:[EMAIL PROTECTED] > Sent: Monday, November 17, 2003 3:35 PM
> To: OJB Users List
> Subject: Which database to use - PostgreSQL or MySQL?
> > > What is the best and most reliable open-source database to use?
> > Is one easier to use with OJB?
> > ------------------------------------------------------------
> ---------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> >


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to