Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 448047
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T21:37:51+00:00 2026-05-12T21:37:51+00:00

I am working on social networking site. now our team decide to store user

  • 0

I am working on social networking site. now our team decide to store user profile in denormalized manner. so our table structure is like this

here attribute it means one fields for user profile e.g. Firstname,LastName,BirthDate etc…

and groups means name of a group of fields e.g. Personal Details, Academic Info, Achievements etc..

**

Attribute/Groups master – it creates
hierarchy of groups and attributes.

**

Attribute_GroupId      bigint   
ParentId               bigint   
Attribute_GroupName    nvarchar(1000)   
ISAttribute            bit  
DisplayName            nvarchar(1000)   
DisplaySequence        int  

**

Attribute Control Info – stores which
control have to be populated at run
time for the attribute as well as its
validation criteria…

**

Attribute_ControlInfoId     bigint  
AttributeId                 bigint  
ControlType                 nvarchar(1000)  
DataType                    nvarchar(1000)  
DefaultValue                nvarchar(1000)  
IsRequired                  bit 
RegulareExpression          nvarchar(1000)  

**

And finally Attribute Values where for
every attribute , user wise values
will be stored

**

AttributeId      bigint         Checked
IsValueOrRefId   bit            Checked
Value            nvarchar(MAX)  Checked
ReferenceDataId  bigint         Checked
UserId           bigint         Checked
                                Unchecked

Now they are saying that we’ll create index on Attribute Values table. there is no primary key also there.

AS there’s huge data going to be stored in this table. e.g. if there are 50 million users and 30 attributes are there it’ll store 1500 million records. in this case if we create index on table, isn’t Insert and Update statement will be very slow as well as at time of data fetching for one user. quires will also be very slow.

i thought one option for that like instead of attribute wise values i can store one XML record for one user.

so, please can anybody help me out to find out best option for this case. how should i store data?

here i can not make hard code table because at any time new fields can be added by administrator so i need some data structure where i can easily add any fields in user profile with 1-2 steps only.

please reply me if anybody has better solution for this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T21:37:51+00:00Added an answer on May 12, 2026 at 9:37 pm

    Check out those articles which highlight just how bad that design choice is, and what potential problems you’re getting yourself into if you stick to that design:

    • Five Simple Database Design Errors You Should Avoid
    • Joe Celko: Avoiding the EAV of Destruction
    • Bad CaRMa

    It seems to be a fairly common design problem – and it seems like a good idea to programmers to solve it that way, with a attribute/value table – but it’s really not a good idea from a database performance point of view.

    Also:

    Now they are saying that we’ll create
    index on Attribute Values table. there
    is no primary key also there.

    As some SQL gurus like to say: “If it doesn’t have a primary key, it’s not a table”.

    You definitely need to find a way to get a primary key onto your tables – if you don’t have anything that you can use per se, add a column “ID” of type “INT IDENTITY(1,1)” to it and put the primary key on that column. You need a primary key! Database design, first lesson, first five minutes….

    You need to rethink your design and come up with something more clever to store the data you need.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on social networking site where user can post photo and text
I've been working on the database for a very basic social networking site: all
I am working on a user based social network. I am building the site
I am working on a social networking site where we are implementing profiles, pages,
I am working on a social networking site and it has a wall like
I am working on a social networking site with a family tree that is
I am working on a social networking site, where users can send messages to
I'm working on a new social networking site and I want to give users
I am developing a social networking site. It has functionality like user registration, people
I'm working on a user based, social networking type of web application in Django.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.