Table inheritance in AX2012

Hi all,

Can any tell me the Advantage & disadvantage of using Table inheritance.

here is a white paper

hi kranthi,

Thanks for your quick response, i read some part of the white paper. But, i didn’t understood in which type of scenarios we are using this?

Let me know, if you have any idea on this.

You can go through RetailPeriodicDiscount , RetailPeriodicDiscountMixAndMatch & RetailPerioidicDiscountMultibuy tables to understand how it works.

Table inheritance uses a parent child relationship where your Child tables get updated and subsequently the parent tables are also updated.

Well, we use it for a specific type of tables compared to transferorders

We have our TransferMaterial table and then our child tables

  • TransferMaterialShipping

  • TransferMaterialReturn

We start from 1 form in which stuff from the transferMaterial table is displayed, depending of the type (shipping/return), the users can view the specific data in the child classes.

It is used for table per type scenarios (for master data). when you have a master data and the information required for each type of record varies then rather than building a single table with many field it is suggested to use the inheritance pattern to split the tables per type and having the related information(fields) among them.

The base table will have the common information(fields) and the derived tables(designed for every type) will have the type specific information.

For more information

The parent/child is used for tables with foreign key relations(see the terminology

The records in base/derived tables will have same recId, means logically represent a single record.

We have to create table inheritance if there are common collumns with lines table in that case dont require to create same column in line tables. for example if some sale information we are storing in salestable and same is in sales line and sales transaction tables etc… than the common columns can be reuse from sales table to other child tables.

We can inherit the tables as well which means less code writing and extending the capabilities of base table to be used in derived table.

Table inheritance can be used when there is 1:n or n:n relationships between two tables and when base table and derived table both carry different information about same item/object.

  1. An existing row in the proposed base table, and the corresponding row in the derived table, both refer to the same item in the real world.
  2. Each row in the proposed base table has exactly one corresponding row in the derived table.
  3. If one row is ever deleted from either table, the corresponding row must also be deleted.
  4. The base table probably has at least two tables that derive from it.
    1. The two derived tables have fields for different kinds of things.
    2. The two derived tables refer to different variations of the general items that are tracked together in the base table.
  5. No item that is represented in a base table would ever be represented in more than one of its derived tables.

Dear Anand,

Please correct your word.

Table inheritance can be used when there is 1:n or n:n relationships between two tables.

It seems wrong as it deviates with the Documentation.

I think there should be 1-1 relation associated between base table to derived table.

By the way let me know if my concern is wrong.