Hi all,
Can any tell me the Advantage & disadvantage of using Table inheritance.
Hi all,
Can any tell me the Advantage & disadvantage of using Table inheritance.
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 http://msdn.microsoft.com/EN-US/library/gg843731.aspx
The parent/child is used for tables with foreign key relations(see the terminology http://msdn.microsoft.com/EN-US/library/gg845237.aspx)
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.
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.