Best way to store profile property type data in SQL Server -


I am coming to a new project and would like some advice to stop the future rumor. I will use a user profile for an example and will keep each method in basic form for clarification.

An approach:

Creating a table with multiple columns: <

approach two:

Creating Relationship Based System:

  Table 1: ProfileItimes (ProfileId, ProfileName, Datatype) Table 2: User Profile (UserID, ProfileId, ProfileVal)   

Approach is clear in its use

approach two scenarios:

Users go to edit their profile Receive and have not already addressed now.

  if not (select UserID from userproof userID = @userID and profilevalue = 'address') in INSERT ... etc ... Finally update ... end   

Which method would be more efficient for scalability? Method Two I can create an admin application that allows a user to create profile types without changing the table in SQL. Will future queries of this data be more intense? Like to display the user's profile page and ask each other? Or maybe I'll create a custom view to solve the problem?

Thank you in advance for your advice.

How to directly

  Table: UserProfile (UserID, ProfileName, ProfileValue )   

And ProfileName's datatype, ProfileValue are both "string". Then "user" and "user profile" can work for user profiles and can be scalable. Using a DB table, type conversion can be done in the program.

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -