Reverse-engineering the database schema