Discussion

Ask HN: When denormalize is preferred instead normalization?

So I'm a solo developer and I have problem with my small product(saas 2 client)

So this app is handling my client main business transaction like selling their services. I saved the transaction detail into a record, who is the client, how much the cost, what services is it.

Then my client also want the app to have accounting feature

Problem is I find it hard to design the system

My current approach is on every transaction record it have a child record (the accounting journal postings)

And I copying value and detail from the parent object to child object, that is needed for accounting task. every time the parent object is saved(rails callback)

is it bad practices? Should I just refer the value instead copying it?

But if I refer the value instead copying it I think I will meet with query complexity problem

21 points iceporter 3 years ago 16 comments

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton