Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Table Inheritance pattern #1274

Closed
iluwatar opened this issue Jul 7, 2020 · 4 comments · Fixed by #3105
Closed

Table Inheritance pattern #1274

iluwatar opened this issue Jul 7, 2020 · 4 comments · Fixed by #3105

Comments

@iluwatar
Copy link
Owner

iluwatar commented Jul 7, 2020

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:

  • Class Hierarchy Representation: Each class in the hierarchy has its own table.
  • Primary Key: All tables share a common primary key.
  • Relationships: Tables are related through foreign keys representing the inheritance structure.

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
Copy link
Contributor

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

Copy link

stale bot commented Nov 16, 2023

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.

@stale stale bot added the status: stale issues and pull requests that have not had recent interaction label Nov 16, 2023
@stale stale bot removed the status: stale issues and pull requests that have not had recent interaction label Mar 24, 2024
@iluwatar iluwatar moved this from In Progress to Todo in Java Design Patterns project Mar 24, 2024
@iluwatar iluwatar added info: help wanted status: stale issues and pull requests that have not had recent interaction labels Mar 24, 2024
@stale stale bot removed the status: stale issues and pull requests that have not had recent interaction label Mar 24, 2024
@HabibaMekay
Copy link
Contributor

Hi @iluwatar, I am interested in working on the Table Inheritance design pattern. Could you please assign this task to me?

Thank you!

@Karim-Ashraf1
Copy link

Karim-Ashraf1 commented Nov 29, 2024

Hi @iluwatar, I want to work on this issues I have some ideas for it could you please assign it to me ?

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants