Separated at the database
Every record belongs to one firm. Besides the application's own checks, the database itself refuses to show or change another firm's rows (row-level security), and links between records can never cross from one firm to another.
