Skip to main content
8 events
when toggle format what by license comment
Nov 17, 2018 at 2:21 comment added Loren Pechtel @Tezra No, I'm saying that sometimes a piece of data from a secondary table is needed often enough to make it make sense to put a copy in the main record. (Example that I have done--the employee table includes the last time in and the last time out. They are used only for display purposes, any actual calculation comes from the table with the clock-in/clock-out records.)
Nov 16, 2018 at 20:18 comment added Tezra @LorenPechtel Actually, that would still be a bad reason... cache data should be kept in an intermediate cache store, and while the cache is still valid, that query should never hit the main DB.
Nov 15, 2018 at 9:52 comment added miroxlav @LorenPechtel – Yes, thanks, in my use of term pre-calculated I also include cases of cached values stored where needed. In systems with complex dependencies, they are the way to keep the performance normal. And if programmed with adequate know-how, these values are reliable and always-in-sync. I just did not want to add case of caching into the answer to keep the answer simple and on safe side. It got downvoted anyway. :)
Nov 15, 2018 at 7:52 history edited miroxlav CC BY-SA 4.0
added 63 characters in body
Nov 15, 2018 at 7:46 history edited miroxlav CC BY-SA 4.0
added 577 characters in body
Nov 15, 2018 at 4:10 comment added Loren Pechtel It can be legitimate even without precalculated stuff. I've done it a couple of times where the data is stored properly but for performance reasons it's useful to stuff a few cached results in the main records.
Nov 15, 2018 at 0:29 history edited miroxlav CC BY-SA 4.0
added 75 characters in body
Nov 15, 2018 at 0:21 history answered miroxlav CC BY-SA 4.0