cancel
Showing results for 
Search instead for 
Did you mean: 

Why user table has large no of columns ? Why don't we have different tables for specialized class like B2BCustomer , Employee etc ?

Former Member
0 Kudos

Why does hybris have data of all specialized types of users into user table only? What are the advantages of such a schema ?

Accepted Solutions (1)

Accepted Solutions (1)

andyfletcher
Active Contributor
0 Kudos

Read up on Table per hierarchy vs Table per class e.g. http://blog.devart.com/table-per-type-vs-table-per-hierarchy-inheritance.html

Basically

TPH = better performance but more redundant columns and no chance of data integrity rules in the db

TPC = worse performance (more joins) especially with large hierarchies but no redundant columns and possibility of enforcing data integrity in database

Answers (0)