I am looking for an efficient way to store users’ information in a SQL Server 2008 table.
In the design all users data will be stored in a series of columns in a single table but one of the columns requires to store a list of values, for example: 'column1' will store the username, 'column2' will store the userID and 'column3' will store a list of items that will change over time.
I want to avoid putting this information on a different table for each user because that would require a lot of tables in the database.
What data type should I use for this 'column3'? Should I use a completely different approach?
I see that on SQL Server we can use the table data type, but this seems to work only for temporary storage.
Thank you.
Generally storing multiples values in column is an indication of poor database design. It makes it very difficult to efficiently select rows based on criteria within that single column. Having said that, if you really only ever need to select those values on a per row basis then consider using XML as SQL Server natively supports XML data.