fbpx
Wikipedia

Single Table Inheritance

Single table inheritance is a way to emulate object-oriented inheritance in a relational database. When mapping from a database table to an object in an object-oriented language, a field in the database identifies what class in the hierarchy the object belongs to.[1] All fields of all the classes are stored in the same table, hence the name "Single Table Inheritance". In Ruby on Rails the field in the table called 'type' identifies the name of the class. In Hibernate (Java) and Entity Framework this pattern is called Table-Per-Class-Hierarchy and Table-Per-Hierarchy (TPH) respectively.,[2][3] and the column containing the class name is called the Discriminator column.

See also edit

References edit

  1. ^ Fowler, Martin (2003). Patterns of Enterprise Application Architecture. The Addison-Wesley Signature Series. Contributions by Dave Rice, Matthew Foemmel, Edward Hieatt, Robert Mee, and Randy Stafford. Addison-Wesley. p. 278. ISBN 0-321-12742-0.
  2. ^ "Tutorial: Implement Inheritance with EF in an ASP.NET MVC 5 app". January 21, 2019. Retrieved November 3, 2015.
  3. ^ King, Gavin; Bauer, Christian; Andersen, Max Rydahl; Bernard, Emmanuel; Ebersole, Steve (September 15, 2010). "Chapter 9. Inheritance mapping". HIBERNATE - Relational Persistence for Idiomatic Java. Graphics design by James Cobb and Cheyenne Weaver (Version 3.5.6-Final ed.). Retrieved November 3, 2015.

External links edit

  • Single Table Inheritance
  • Single Table Inheritance in Yii
  • Single Table Inheritance in Django


single, table, inheritance, single, table, inheritance, emulate, object, oriented, inheritance, relational, database, when, mapping, from, database, table, object, object, oriented, language, field, database, identifies, what, class, hierarchy, object, belongs. Single table inheritance is a way to emulate object oriented inheritance in a relational database When mapping from a database table to an object in an object oriented language a field in the database identifies what class in the hierarchy the object belongs to 1 All fields of all the classes are stored in the same table hence the name Single Table Inheritance In Ruby on Rails the field in the table called type identifies the name of the class In Hibernate Java and Entity Framework this pattern is called Table Per Class Hierarchy and Table Per Hierarchy TPH respectively 2 3 and the column containing the class name is called the Discriminator column See also editObject relational mapping ActiveRecord Rails References edit Fowler Martin 2003 Patterns of Enterprise Application Architecture The Addison Wesley Signature Series Contributions by Dave Rice Matthew Foemmel Edward Hieatt Robert Mee and Randy Stafford Addison Wesley p 278 ISBN 0 321 12742 0 Tutorial Implement Inheritance with EF in an ASP NET MVC 5 app January 21 2019 Retrieved November 3 2015 King Gavin Bauer Christian Andersen Max Rydahl Bernard Emmanuel Ebersole Steve September 15 2010 Chapter 9 Inheritance mapping HIBERNATE Relational Persistence for Idiomatic Java Graphics design by James Cobb and Cheyenne Weaver Version 3 5 6 Final ed Retrieved November 3 2015 External links editSingle Table Inheritance Single Table Inheritance in Yii Single Table Inheritance in Django nbsp This software engineering related article is a stub You can help Wikipedia by expanding it vte Retrieved from https en wikipedia org w index php title Single Table Inheritance amp oldid 1176765826, wikipedia, wiki, book, books, library,

article

, read, download, free, free download, mp3, video, mp4, 3gp, jpg, jpeg, gif, png, picture, music, song, movie, book, game, games.