Hibernate Mapping Class Inheritance
SQL based models provide only has a relationships between entities. SQL database management systems dont support type inheritance -- and even when it's available, it's usually proprietary or incompleteThere are four different approaches to representing an class hieritance hierarchy:
???- Table per concrete class with implicit polymorphism -- Use no explicit inheritance mapping, and default runtime polymorphic behavior.
???- Table per concrete class -- Discard polymorphism and inheritance relationships completely from the SQL schema.
???- Table per class hierarchy -- Enable polymorphism by denormalizing the SQL schema, and utilize a type discriminator column that holds type information.
???- Table per subclass -- Represent is a(inheritance) relationships as has a (foreign key) relationships.
posted on 2008-11-01 15:17 picture talk 閱讀(332) 評論(0) 編輯 收藏