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

  • SEARCH
  • Home
  • 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 8728261
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T08:35:45+00:00 2026-06-13T08:35:45+00:00

The Overview: I have a table category that is for the most part used

  • 0

The Overview:

I have a table “category” that is for the most part used to categorise products and currently looks like this:

CREATE TABLE [dbo].[Category]
( 
CategoryId int IDENTITY(1,1) NOT NULL, 
CategoryNode hierarchyid NOT NULL UNIQUE,
CategoryString AS CategoryNode.ToString() PERSISTED,
CategoryLevel AS CategoryNode.GetLevel() PERSISTED,
CategoryTitle varchar(50) NOT NULL,
IsActive bit NOT NULL DEFAULT 1
)

This table is heavily queried to display the category hierarchy on a shopping website (typically every page view) and can have a substantial number of items.

I’m using the Entity Framework in my data layer.

The Question:

I have a need to add what could potentially be a fairly large “description” which could come in the form of the entire contents of a web-page and I’m wondering whether I should store this in a related table rather than adding it to the existing category table given that the entity framework will drag the “description” column out of the database 100% of the time when 99.5% of the time I’ll only want the CategoryTitle and CategoryId.

Typically I wouldn’t worry about the overhead of the Entity Framework, but in the case I think it might be important to take it into consideration. I could work around this with a view or a complex type from a stored proc, but this means a lot of refactoring that I’d prefer to avoid.

I’m just interested to know if anyone has any thoughts, suggestions or a desire to slap my wrists in relation to this scenario…

EDIT:

I should add that the reason I’m hesitating to set up a secondary table is because I don’t like the idea of adding an additional table that has a 1 to 1 relationship with the Category table – it seems somewhat pointless. But I’m also not a DBA so I’m not sure whether this is an acceptable practice or not.

  • 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-06-13T08:35:47+00:00Added an answer on June 13, 2026 at 8:35 am

    I would store in a different table for the simple reason to not increase the size of a record in Category table. An increase in record size due to such a VARCHAR column will reduce the number of records that can fit a given disk page (typically of size 4KB), thereby increasing the number of pages to fetch to main memory to search, increasing the number of disk accesses, affecting the query execution times.

    I would store this in a different table (i.e. vertically partition the category table into most frequently accessed columns and not-so-frequently used columns), and define a OneToOne relationship at the application layer with the entity that contains the not-so-frequently used column, as a member in the main Category entity, set the fetch type to LAZY.

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

Sidebar

Related Questions

So i have a query that looks like this: SELECT col1, col2, col3 ...
Say I have a table like this in my MsSql server 2005 server Apples
I have a MainWindow with a table that shows all books in an overview.
I have a overview page that shows the data in a table. A pop-up
brief overview so this is in context, I have an application in java that
Overview: I have an advancedDataGrid that I am using a GroupingCollection on and I
I have a document that is an overview document within a folder, there are
I have been stumped by an issue. It seems that most of the tricks
i have a table stores activity a want to generate a overview selecting sum(total)
Overview: I have two text boxes at the top of this form for inputting

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.