Re: Persistence



I fail to understand why discussing the relevance of that is so
relevant, as I think it's trivial.

An application using a RDBMS for persistence and an application using
a RDBMS for data management, are two very different applications.

see? wordgames.

"It's called persistence!"
"NO, it's called data management"


If don't think there are a significant difference between persistence
and data management, I don't know what to say...

The sillyness in your remark is in the fact that to store data into
whatever container you came up with, you have to execute some logic.
Whatever that logic is is not that important, it only will control the
limitations of what you can do with the data in the persistent storage
(e.g. if there's no retrieval logic, reading the data back will be hard)

If you think a SQL database is about storing data into a container, I
can't help you. I would like to add another option to my original
question.

5. I am too ignorant about the relational model and SQL database, so
lets just label it as "persistence".

so calling it DIFFERENT is IMHO impossible, unless YOU use definitions
for 'persistence' and 'datamanagement' which are different than mine,

Persistence = storing data on disk
Data management = manipulating data, quering data, enforcing data
integrity, storing data on disk

Still, I think these websites
uses queries which has nothing to do with persistence. Do you think
"select * from employee where today()-date_of_birth > ? and city > ?"
has something to do with persistence?

Do you?

No.

If you use MySQL, you have
probably no idea if the data you ask for resides cached in RAM or on
the disk.

my example's point was that using Mysql to read it from a file or
doing the reading yourself isn't that much different,

You must be kidding. Show me your file implementation of
"select * from employee where today()-date_of_birth > ? and city > ?".

So what was your goal for this discussion, as it's a bit unclear
to me.

To understand what people mean when they say: "I need a database to
persist my objects".

I think you should ask the people who say that to you. You and I can
come to an agreement about that, but it still can clash with the
definition someone else uses when they're talking to you.

I just did. That's why I started this thread. I you don't talk about
persistence in this way, I am not asking you.

'persist my objects' is pretty clear to me though. The data inside the
objects, the state at time T of the objects has to be persisted
somewhere. What they REALLY mean is that the entity states of the
entities inside the object containers have to be synchronized with the
real entities inside the RDBMS. An entity is data, not the table
definition, that's an entity definition. If you have data in a table
row, that's an entity (there are more forms of an entity, lets stick
with this one) instance. If you load the entity instance into memory,
you can manipulate that copy, as it is a copy, or a mirror if you will.
You don't manipulate the REAL entity though. So to make your changes of
the IN-MEMORY copy of the entity permanent, you have to synchronize
your in-memory copy with the real one inside the persistent storage.
You then 'persist' the entity, or object's data, which is short for
'you persist the changes made to the in-memory copy of the entity so
the real entity in the persistent storage is updated with these changes
and the changes therefore are made permanent'.

Why do you need a RDBMS to do this? Synchronizing in-memory objects
with persistent storage does not require quieries or integrity
constraints. A much simpler tool would do the job.

Fredrik Bertilsson
http://frebe.php0h.com

.



Relevant Pages

  • Re: Relational database & OO
    ... Actually a program is all about storing, because you store ... An ORM framework sitting on top of an RDBMS ... persistence, you're talking about the means by which data is moved to a ... example of inappropriately re-implementing the data management features ...
    (comp.object)
  • Re: Relational database & OO
    ... pretty sure I've read plenty of talk about 'storing' data in a stack, ... Actually a program is all about storing, because you store ... 'persistence' evokes very different concepts in my mind and in yours, ... Everybody with a solid background using RDBMS knows that a RDBMS is ...
    (comp.object)
  • Re: Relational database & OO
    ... data to a persistence storage medium. ... using the features already provided by the RDBMS, ... Caching is the second issue. ...
    (comp.object)
  • Re: Searching OO Associations with RDBMS Persistence Models
    ... no idea of how a person will be persisted on disk (flat files, indexes, ... It may not be persisted at all (all-in-RAM database). ... persistence is not needed, the query and transaction features of a ... RDBMS would still be useful. ...
    (comp.object)
  • Re: Relational database & OO
    ... but completely orthogonal to persistence. ... and that an RDBMS does a lot more than just store data. ... A all-in-RAM database would not write ... If your application only needs flat files, a database is overkill. ...
    (comp.object)