At the heart of any CRUD app are database tables (also known as Models in Rails) and the relationships…