What is the ideal model for creating classes that involve the database? [closed]

1

I have a very strong question about what is the best way to create classes to "interact" with the database (in PHP, in that case). For example:

I need very specific validations of each table to be executed before registering something in the database.

So it is ideal to create classes like: Insert, Update e Delete ? Or all these should actually be methods of a Class Database? Or would it be better to create each of this method for each model (MVC) of my project?

Anyway, what would be the best way to do this?

Thank you!

    
asked by anonymous 08.10.2016 / 05:05

0 answers