1

I was reading this discussion: Using a Single Row configuration table in SQL Server database. Bad idea?

But I didn't find the answer I was looking for regarding the text data type.

If I have a key/value pair settings table in the database, how would I store a text data type?

I don't want to add a field with the data type text because I guess this would be a performance issue.

I'm thinking that maybe I could have another table where I store the text and then link it together with an ID. That way there would be no bad effect on the main settings table.

Like so:

tblSettings
[id], [key], [valueChar], [valueInt], [valueDate], [valueFloat], [valueMeta]
1, 'template', null, null, null, null, 1

tblMeta
[id], [valueText]
1, '<html>....'

Would that be a good solution or is there a better one that I'm not thinking of?

Community
  • 1
  • 1
M.D
  • 101
  • 1
  • 8

0 Answers0