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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T02:46:19+00:00 2026-05-26T02:46:19+00:00

I’m working on a datamodel that has a set of types that share some

  • 0

I’m working on a datamodel that has a set of types that share some common fields such as Id, Name, Description. To be more concrete:

The Document class has a list of Attributes. These Attributes are in our domain, types like String, Integer, DateTime and more “complex” types such as Address and lists of String, Integer, Address, etc. Now, in my head I would model the Attribute classes so that I have an abstract base class (AttributeBase) that contains common attributes (Id, Name, Description) and then have the more specific attributes in the appropriate sub classes. E.g. StringAttribute (Value), IntegerAttribute(Value), AddressAttribute(Street, etc), StringListAttribute, IntegerListAttribute, AddressListAttribute. We are talking about 15-20 different sub classes. But how would you model those classes in the database? Would you choose TPH, TPT or TPC? I have read about the performance hit when choosing TPT and EF 4.1 and having one massiv table for TPH doesn’t sound right to me even if the performance is better. We are talking about potentially 10000 – 1000000++ rows of data in the tables.

Do you have any first hand experience when it comes to these scenarios? I would really like to here from you on this subject.

  • 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-26T02:46:20+00:00Added an answer on May 26, 2026 at 2:46 am

    TPH doesn’t sound good from DB perspective but it is actually a storage model used by many products using this type of metadata. Example is SharePoint (2007) which has all data in single table – it follows more complex model but the basis is the same. I don’t like SharePoint and the way how it stores data but by thinking about the problem I didn’t find better solution to model generic solution supporting huge amount of data.

    TPT and TPC will looks more normalized in DB but their usage will result in slow application. Moreover normalizing IntAttribute to table with Id, Name and Description and second table with Id and integer Value is IMHO over normalized in most cases.

    Btw. if you are doing anything with documents and you want to assign properties to documents you should definitely check Sharepoint because it allows that out-of-the box.

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

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I've got a string that has curly quotes in it. I'd like to replace
In my XML file chapters tag has more chapter tag.i need to display chapters
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
Basically, what I'm trying to create is a page of div tags, each has

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.