Key/Value Pairs - data types and validation

H

heromull

Can someone point me to some resources or help out with the design for
this issue?

I'm using asp.net 1.1, C# and SQL Server. I need to persist about 30
values for each user. These values do not really relate to any of the
other data.
So I'd like to place all these "misc" values in single db table
(CustomerValues).

CREATE TABLE [CustomerValues] (
[ID] [int] IDENTITY (1, 1) NOT NULL ,
[Key] [varchar] (50) NOT NULL ,
[Value] [varchar] (255) NULL
)

Some of these Values would actually be int, some varchar, some bit.
I'm thinking they would be put into a hashtable in the client app.
First of all, is this a good idea and if not what are my options?
Also, how would I enforce/validate the different data types in my
client app?

Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top