Home All Groups Group Topic Archive Search About

Serializing / persistently storing & retrieving VB objects in & from SQL Server

Author
5 Jan 2006 8:48 AM
Martin Widmer
Hi guys

I am wondering what is a proper way to persistently store objects into
SQL-Server. I see four possible ways:

1.) Serialize to XML and then store the XML in the SQL server
2.) Write a new serializer that serializes the object by storing each
attribute value into a matching field in an SQL server table while
performing data type mapping and possibly compression etc...
3.) For each class write a proxy class who's objects are internally linked
directly and online to the matching tables in the SQL server
4.) Buy a proprietary serializing component from a 3rd party firm that does
all the job

Of course 4 will do but I want to learn how to do it myself. Any hints or
best practise advice?

Martin

Author
5 Jan 2006 11:45 AM
Ken Tucker [MVP]
Hi,

        SQL Server 2005 has User defined types.

http://msdn2.microsoft.com/en-us/library/ms131064.aspx

Ken
---------------
Show quoteHide quote
"Martin Widmer" <martin.wid***@businessnet.de> wrote in message
news:dpinhg$je4$1@nntp.init7.net...
> Hi guys
>
> I am wondering what is a proper way to persistently store objects into
> SQL-Server. I see four possible ways:
>
> 1.) Serialize to XML and then store the XML in the SQL server
> 2.) Write a new serializer that serializes the object by storing each
> attribute value into a matching field in an SQL server table while
> performing data type mapping and possibly compression etc...
> 3.) For each class write a proxy class who's objects are internally linked
> directly and online to the matching tables in the SQL server
> 4.) Buy a proprietary serializing component from a 3rd party firm that
> does all the job
>
> Of course 4 will do but I want to learn how to do it myself. Any hints or
> best practise advice?
>
> Martin
>