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 7512131
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T23:46:20+00:00 2026-05-29T23:46:20+00:00

Consider Microsoft SQL Server 2008 I need to create a table which can be

  • 0

Consider Microsoft SQL Server 2008

I need to create a table which can be created two different ways as follows.

Structure Columnwise
StudentId number, Name Varchar, Age number, Subject varchar
eg.(1,'Dharmesh',23,'Science')
   (2,'David',21,'Maths')


Structure Rowwise
AttributeName varchar,AttributeValue varchar
eg.('StudentId','1'),('Name','Dharmesh'),('Age','23'),('Subject','Science')
   ('StudentId','2'),('Name','David'),('Age','21'),('Subject','Maths')

in first case records will be less but in 2nd approach it will be 4 times more but 2 columns are reduced.

So which approach is more better in terms of performance,disk storage and data retrial??

  • 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-29T23:46:22+00:00Added an answer on May 29, 2026 at 11:46 pm

    Your second approach is commonly known as an EAV design – Entity-Attribute-Value.

    IMHO, 1st approach all the way. That allows you to type your columns properly allowing for most efficient storage of data and greatly helps with ease and efficiency of queries.

    In my experience, the EAV approach usually causes a world of pain. Here’s one example of a previous question about this, with good links to best practices. If you do a search, you’ll find more – well worth a sift through.

    A common reason why people head down the EAV route is to model a flexible schema, which is relatively difficult to do efficiently in RDBMS. Other approaches include storing data in XML fields. This is one reason where NOSQL (non-relational) databases can come in very handy due to their schemaless nature (e.g. MongoDB).

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

Sidebar

Related Questions

Consider the need to develop a lightweight desktop DB application on the Microsoft platforms.
I read in a Microsoft T-SQL Performance Tuning whitepaper that correlated sub-queries can be
Consider this code: using Microsoft.Office.Interop.Word; ApplicationClass _application = new ApplicationClass(); Can I get the
My question is similar to Upgrading SQL Server 2000 to 2005 or 2008 -
Consider we have a dynamic library ( HelloWorld.dll ) which is compiled with Microsoft
Consider the following picture representing the WCF channel stack: alt text http://i.msdn.microsoft.com/ee672186.image001(en-us).jpg I'm implementing
Consider this problem: I have a program which should fetch (let's say) 100 records
Consider these two function definitions: void foo() { } void foo(void) { } Is
Consider the Oracle emp table. I'd like to get the employees with the top
Consider an indexed MySQL table with 7 columns, being constantly queried and written to.

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.