In every storage mechanism for data, there are four basic types of functions: create, read, update, and delete (CRUD). These allow us to perform all the basic ways of manipulating and viewing the data that is needed for our web apps. To use these functions, we will use an object in the database named a session. Sessions will be explained later in the chapter, but for now, think of them as a storage location for all of our changes to the database.
CRUD
Creating models
To create a new row in your database using our models, add the model to the session and commit objects. Adding an object to the session marks its changes for saving. Committing is when the session is saved to the database, as follows:
>>> user = User...