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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T03:49:36+00:00 2026-05-15T03:49:36+00:00

Today, I studied about about 2 database design inheritance approaches: Single Table Inheritance Class

  • 0

Today, I studied about about 2 database design inheritance approaches:

  1. Single Table Inheritance
  2. Class Table Inheritance

In my student opinion, Single Table Inheritance makes a database smaller vs other approaches because it uses only 1 table. But I read that the more favorable approach is Class Table Inheritance according to Bill Karwin.

What are the pros and cons of Single Table Inheritance and in which case should it be used?

  • 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-15T03:49:37+00:00Added an answer on May 15, 2026 at 3:49 am

    In my student opinion Single Table Inheritance make database more smaller vs other approaches because she use only 1 table.

    Not necessarily. If the entities of your hierarchy have not much attributes in common, this will result in many null columns and will waste a lot of space.

    But I read that the more favorite approach is Class Table Inheritance according Bill Karwin.

    IMHO, there is no single answer, the different strategies (one table per hierarchy, one table per concrete class, one table per class) have all strengths and weaknesses and choosing one or the other depend on the context.

    Single Table Inheritance pros and cons and in which case it used?

    This strategy is nice when you need “polymorphic” queries (no need of joins or unions) as long as you can minimize the number of nullable columns (and convince the DBA that a denormalized schema won’t be a problem in the long run).

    Actually, I suggest to check Mapping Objects to Relational Databases: O/R Mapping In Detail by Scott Ambler (the author of the reference paper about ORM) and especially the section 2.6 Comparing The Strategies—there is no point in paraphrasing him.

    His summary of the Single Table Strategy:

    Advantages:

    • Simple approach.
    • Easy to add new classes, you just need to add new columns for the
      additional data.
    • Supports polymorphism by simply changing the type of the row.
    • Data access is fast because the data is in one table.
    • Ad-hoc reporting is very easy because all of the data is found in
      one table.

    Disadvantages:

    • Coupling within the class hierarchy is increased because all classes are
      directly coupled to the same table. A
      change in one class can affect the
      table which can then affect the other
      classes in the hierarchy.
    • Space potentially wasted in the database.
    • Indicating the type becomes complex when significant overlap between types
      exists.
    • Table can grow quickly for large hierarchies.

    When to use:

    • This is a good strategy for simple
      and/or shallow class hierarchies where
      there is little or no overlap between
      the types within the hierarchy.

    But I warmly recommend to read the whole paper.

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

Sidebar

Ask A Question

Stats

  • Questions 447k
  • Answers 447k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer This is a situation for Radio Buttons instead of checkboxes.… May 15, 2026 at 7:25 pm
  • Editorial Team
    Editorial Team added an answer The best thing to do is use an accelerator of… May 15, 2026 at 7:25 pm
  • Editorial Team
    Editorial Team added an answer Use .prevAll(), like this: $("#some-id").prevAll() For example: $("#some-id").prevAll().css('color', 'red')​​​​​​​​​​​;​ Give… May 15, 2026 at 7:25 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.