I am confused about a few points:
What is the difference between a stored procedure and a view?
When should I use stored procedures, and whe
First you need to understand, that both are different things. Stored Procedures are best used for INSERT-UPDATE-DELETE statements. Whereas Views are used for SELECT statements. You should use both of them.
In views you cannot alter the data. Some databases have updatable Views where you can use INSERT-UPDATE-DELETE on Views.