Avatar of RunForrestRun
Flag for United States of America

asked on 

What's the best way to build database tables to support derived classes & similar objects?

I'm trying to figure out the best way to construct database tables to support what are, programmatically speaking, derived classes.

My base class will be "Request"

"OriginalRequest" & "AmendedRequest" both extend "Request".

"OriginalRequest" is a parent of "AmendedRequest" with a one-to-many relationship.

 In constructing the database tables, given that "OriginalRequest" & "AmendedRequest" are only different by one attribute and their children are virtually identical,  is it wise to build the tables as I have in the attached diagram, better to consolidate the requests and add fields to make it self-referencing to preserver the Original to Amended relationship or a different way all together?

Thanks in advance for your time & help.

Project ManagementProgramming Theory

Avatar of undefined
Last Comment

8/22/2022 - Mon