From: shapper on
Hello,

I am creating a newsletter system where each newsletter is composed by
an image and text.
Should I save the entire Newsletter markup on the table?

Or should I save the elements as follows:

create table dbo.Newsletters
(
Id int not null,
[Image] varbinary(max) filestream constraint DF_Newsletters_Image
default(0x),
[Text] varbinary(max) filestream constraint DF_Newsletters_Text
default(0x),
[Key] uniqueidentifier not null rowguidcol constraint
U_Newsletters_Key unique,
[Name] nvarchar(100) not null
constraint PK_Newsletters primary key clustered(Id)
) -- Newsletters

And then compose the newsletter markup on C# code using the Image and
Text field?

Thank You,
Miguel
From: Plamen Ratchev on
This depends on your business requirements. If you need to update separate the image or the text, then it makes sense to
keep them as separate columns. If you always treat them as one atomic attribute then use a single column.

--
Plamen Ratchev
http://www.SQLStudio.com
From: --CELKO-- on
Do you re-use text and/or pictures in different newsletters? In that
case you would have a Newsletters table that references the articles
and references the pictures to make a finished newsletter.

Do you use text and its picture in only one newsletter? I would put
them in one table.