Due to the coupling of database interaction and application logic when using the active record pattern, unit testing an active record object without a database becomes difficult.[citation needed] The negative effects on testability in the active record pattern can be minimized by using mocking or dependency injection frameworks to substitute the real data tier with a simulated one.[citation needed]