CakePHP database layer provides help in working with a relational database like making a connection, building queries, making changes to the structure, preventing SQL injections, and many more. The following are some of the basic database functions that CakePHP offers,
Validating Data : With the validator object, you can check the type, shape, and size of the data before converting them into entities.
Saving Data : After loading and making changes to the data, you can use the save()
function to insert or update the data into the database.
Deleting Data : With the delete()
function, you can do different delete types like cascading delete, bulk delete, strict delete with the data.
Retrieving Data & Result set : With the help of the get()
or find()
function, you can retrieve the data. With the first()
function, you can retrieve the resulting set.
Association : In CakePHP, different association types are available. With the help of this, you can like two or more databases.