Part II. Inheritance in Class Hierarchies

Whenever an app has to manage the data of a larger number of object types, there may be various subtype (inheritance) relationships between some of the object types. Subtypes and inheritance are important elements of information models. Software applications have to implement them in a proper way, typically as part of their model layer within a model-view-controller (MVC) architecture. Unfortunately, application development frameworks do often not provide much support for dealing with class hierarchies and inheritance.

Table of Contents
12. Subtyping and Inheritance
1. Introducing Subtypes by Specialization
2. Introducing Supertypes by Generalization
3. Intension versus Extension
4. Type Hierarchies
5. Kinds and Roles
6. The Class Hierarchy Merge Design Pattern
7. Subtyping and Inheritance in Computational Languages
7.1. Subtyping and inheritance in OOP
7.2. Subtyping and inheritance with XML Schema
7.3. Subtyping and inheritance with OWL
7.4. Representing class hierarchies with SQL database tables
7.4.1. Single Table Inheritance
7.4.2. Table per Class Inheritance
7.4.3. Joined Tables Inheritance
8. Quiz Questions
8.1. Question 1: Statements about a Class Hierarchy
8.2. Question 2: Class Hierarchy Merge
13. Subtyping with Plain JS
1. Subtyping with Constructor-Based Classes
2. Case Study 1: Eliminating a Class Hierarchy
2.1. Make the JS class model
2.2. New issues
2.3. Code the model classes of the JS class model
2.3.1. Summary
2.3.2. Code the enumeration type BookCategoryEL
2.3.3. Code the model class Book
2.4. Write the View and Controller Code
2.4.1. Summary
2.4.2. Add a segment information column in Retrieve/List All
2.4.3. Add a category selection field in Create and Update
3. Case Study 2: Implementing a Class Hierarchy
3.1. Make a JS class model
3.2. Make a JS entity table model
3.3. New issues
3.4. Code the model classes of the JS class model
3.4.1. Defining subtype relationships
3.4.2. Loading the instances of the root class Person
3.4.3. Saving the supertable when saving a subtable
4. Quiz Questions
4.1. Question 1: Constructor-Based Inheritance Pattern
4.2. Question 2: Check Method for Segment Property
14. Subtyping with Java EE
1. Subtyping in Java
2. Case Study 1: Implement a Class Hierarchy with Single Table Inheritance
2.1. Make the Java Entity class model
2.2. New issues
2.3. Code the classes of the Java Entity class model
2.3.1. Summary
2.3.2. Code the enumeration type BookCategoryEL
2.4. STI database schema
2.5. Write the view and controller code
2.5.1. Summary
2.5.2. Add a segment information column in Retrieve/List All
2.5.3. Add a "Special type" select control in Create and Update
3. Case Study 2: Implement a Class Hierarchy with Joined Table Inheritance
3.1. Make the Java Entity class model
3.2. New issues
3.3. Code the model classes of the Java Entity class model
3.3.1. Define the category relationships
3.3.2. Database schema for joined table class hierarchy
3.4. Write the View and Controller Code
4. Run the App
15. Subtyping Practice Projects
1. Project 1 - Person Types and Movie Types