The big advantage of frameworks, like Rails, is convention over configuration. So you don’t get the same thing done 100 different ways. You know that the route /users/32 goes to UsersController#show. You also get conveniences like generators. You get an ORM for the cases of trivial SQL. Rails even gives you AREL to sanely compose complex SQL queries without having to manually glue string fragments together.