0

I'm using Oracle 12c. Given an existing table (we call it TBL_M), and based on the criteria below, I was wondering if using inheritance makes sense to lay out the entities:

Information for one group of data (we call it Group One):

RATE
AMOUNT
FREQUENCY

And information for another group of data (we call it Group Two):

RATE
AMOUNT
FREQUENCY
DEPTH

So the columns needed for this become:

TBL_P

TBL_P_ID
RATE
AMOUNT
FREQUENCY
TBL_M_ID (fk)

TBL_C

TBL_C_ID
DEPTH
TBL_P_ID (fk)

For Group Two, every time we want to make an entry, we populate both tables (TBL_P and TBL_C). However, when the information is for Group One, TBL_P.TBL_M_ID is going to be set to NULL redundantly.

Would it be more efficient to split this into two separate tables, one for Group One, and the other for Group Two? e.g.

TBL_ONE

TBL_ONE_ID
RATE
AMOUNT
FREQUENCY
TBL_M_ID (fk)

TBL_TWO

TBL_TWO_ID
RATE
AMOUNT
FREQUENCY
DEPTH
TBL_M_ID (fk)
MDCCL
  • 8,520
  • 3
  • 30
  • 61
NuCradle
  • 101
  • You might find of help this Q & A. – MDCCL Apr 02 '19 at 19:55
  • Thank you. That post was very well thought out. I ended up using a single table with all the shared and unshared data as I found it redundant to create that TBL_C for a single column. 70% of times, that column (DEPTH) is going to be populated, and only in 30% of cases would be NULL. The table only gets inserted with 3 rows every day, and roughly ~300+ a year. Number of daily reads would be around 1000/day. – NuCradle Apr 03 '19 at 03:09

0 Answers0