Re: question about serialization
- From: Silvio Bierman <sbierman@xxxxxxxxxxxxxxxxxx>
- Date: Wed, 26 Mar 2008 17:12:04 +0100
Tobi wrote:
I'm prepping for the SCJP, and am for the first time playing with
serialization. I was wondering for what cases would serialization be
used, as preferable to storing stuff in a database? I've never seen
it used any place that I have worked. Is it commonly used? Or is it
more common with apps that aren't web based?
Thanks.
Tobi
That depends. Database use can be roughly divided into two categories:
1) Providing structured, secured an (for most practical purposes) standardized access to structured data.
2) Serializing object values/states with the sole purpose of restoring them at a later point in time.
Use case 1) is where relational databases where invented for and can by no means be compared to object serialization in Java. In this situation the database is one of the core deliverables as well as the integration point where custom applications and generic analysis and reporting tools, backup tools etc. can be linked together.
Use case 2) is a heavily stylized way of (mis-) using a relational database as a storage medium for object states. Numerous ORM tools exist to help automate this.
To make matters worse people who do not know the difference tend to mix both use cases inside the same physical database.
Besides a lot of minuses and pluses use case 2) can be similar to object serialization.
Regards,
Silvio Bierman
.
- References:
- question about serialization
- From: Tobi
- question about serialization
- Prev by Date: After I try latest of Netbean and Eclipse I wonder if have Another beter IDE?
- Next by Date: Re: After I try latest of Netbean and Eclipse I wonder if have Another beter IDE?
- Previous by thread: question about serialization
- Next by thread: Re: question about serialization
- Index(es):
Relevant Pages
|