Hi All,
I am trying to prepare DB design for APEX application. Requirement is as follows.
In Departments IR page, users are asking below columns
- Number of employees in each department (Department may or may not have employees)
- Primary Location for Department (Department can have multiple addresses and addresses are stored in other table, along with primary flag)
- Alternative Manager's Email Address for Department (alt_manager_id column, this is optional column and refers to employees table)
I can implement these requirements using either inline sub queries or using OUTER JIONs. But, these approaches will have performance impact as the data grows (like 100s of thousands of rows). So, my question is, is it ok to store these data directly at "Departments" table and update "Departments" table when child tables gets updated. Basically, I am trying to store summary data at master table, instead of deriving it as on when needed from child tables. Is this considered bad practice? Is it ok to implement such DB design?
Thank you