This document discusses database modeling for a system with companies, departments, and employees. It describes setting up composite primary keys to link the three tables together and using associations and joins to efficiently query across the tables. Methods are defined on the Company model to count employees. A view is created to select large companies with over 1000 employees.Read less