March 22, 2005 at 11:49 am
I have inherited a database with a table which stores XML in two text fields in the same table; 1 field is populated if there is no error in the data and the other field is populated if there is error data.
What about this design? Should I separate the table with two text fields into separate tables?
March 22, 2005 at 11:56 am
What's the size of the fields?
What's the size of the table (100 millions of rows of much smaller)?
Is is something like toggle field, (always 1 field filled but never both nor neither)?
Why do you store xml in a table (that one is always beyond me... never seen a situation where there's no other way around that)?
March 22, 2005 at 12:01 pm
Small table, fewer than 100 rows. Yes a toggle situation; 1 or other of the fields is populated, depeneding on error condition or not.
March 22, 2005 at 12:30 pm
BTW you didn't answer why you are inserting xml in the db..
I think I would go with a design similar to this one :
Create table a
( PK int not null identity(1,1) primary key
, DescXML varchar(8000) not null
, HasErrors bit not null default(0)
)
go
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply