iluwatar / java-design-patterns

Design patterns implemented in Java
https://java-design-patterns.com
Other
89.41k stars 26.44k forks source link

Table Inheritance pattern #1274

Open iluwatar opened 4 years ago

iluwatar commented 4 years ago

Description

The Table Inheritance design pattern involves modeling a class hierarchy in a relational database. Each class in the hierarchy is mapped to its own table. The main elements of this pattern include:

This pattern is particularly useful when different subclasses have distinct properties that need to be stored in separate tables, and it helps in organizing complex data models efficiently.

References

Acceptance Criteria

  1. Implement the Table Inheritance pattern with a sample class hierarchy.
  2. Ensure that each class in the hierarchy has its own table with a common primary key.
  3. Write unit tests to verify the correct behavior of the pattern implementation, ensuring proper data retrieval across the hierarchy.
ved-asole commented 1 year ago

Hi @iluwatar, could you please assign this PR to me. I will take care of it.

stale[bot] commented 10 months ago

This issue has been automatically marked as stale because it has not had recent activity. The issue will be unassigned if no further activity occurs. Thank you for your contributions.