[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 369
  • Last Modified:

Storing Serialized objects in MS SQL Server 2005

I have an object (which contains other objects) which I have been able to serialize and de-serialize.

I am in the process of considering of storing it in a MS SQL Server 2005 database.

I am a newbie when it comes to databases, and I wanted to know if the size of each serialized object that I want to store in the database is too big? Each object is about 10 to 50 MB?

Will that be possible? Thanks everyone.
0
yaronusa
Asked:
yaronusa
  • 3
  • 3
3 Solutions
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
the VARBINARY field can, in sql 2005, store up to 2GB ...
0
 
yaronusaAuthor Commented:
And would I be correct to assume that a serialized object be inserted into a VARBINARY field? Just making sure...
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
yes. depending on what exactly is to be serialized, a VARCHAR or NVARCHAR could do the same job, but only if there are no non-character values to be serialized.
the VARBINARY data type has the advantage that it won't do any implicit changes to the data stream, like varchar/nvarchar might do for special characters, depending on the client's character set for example
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
yaronusaAuthor Commented:
So if I don't have any char types in my C# object, I'll be good to go? Is that what you mean by "non-character" values? Sorry if this is a dumb question :)  ...
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
in short:
dates, numbers (except float) and textual values are character data.
images, files are non-character data
0
 
yaronusaAuthor Commented:
Thanks all!
0
 
mattphungCommented:
Angelll,

can you take a look at my question. I am trying to write/get the object from the database

I'm trying to retreive data from a varbinary field in SQL 2005
ID: 24592601
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now