We want to serialize some of our c# classes into a database column. We are going to use binary serialization.
What would be the best datatype to store the binary data? Should we use varbinary(max)? The classes are not very large and when serializing to the file system they are about 7Kb.
CREATE TABLE [dbo].[ClassTable](
[ID] [int] NOT NULL,
[ClassData] [varbinary](max) NOT NULL,
CONSTRAINT [PK_ClassTable] PRIMARY KEY CLUSTERED
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]