Generate POPO from database