Let's say u have following architecture.
User have many departments, (fk user_I'd)
Each department HV many offices (fk department_I'd)
Each office HV many transactions ( encounter s) (fk office_id )
Now question is, if I want to get all encounters of a user I will need to search for all encoutets in offices in department s of a user.
That's lots of joins don't u think ?
Yet if I include all foreign keys of the tree in encounter table ? Then I can just do select * from encounters where user_I'd = X
Yet this makes my tables looks ugly and contain lots of repeated data of parent I'd !
So my question is, what is best practice in such case ? More fk or less and use joins ?