Answer the question
In order to leave comments, you need to log in
What approach to use when writing code for crud in a database with a lot of tables?
Most examples of working with a database show working with 1-2 tables, and I thought about how to write
code correctly for cases when you need to change data in 10-20 or 100-200 tables, it is unlikely that for each of the 200 tables they
write several functions for adding/removing records. If possible, then throw off an example project from github for example.
Answer the question
In order to leave comments, you need to log in
I am using a custom code generator.
First, I describe the data model, run the console command, and at the output I get a ready-made set of functions for working with the table.
There are many ready-made generators, you can look on the Internet and choose which one you like best.
Here is a good article with examples
https://medium.com/@zaurio/generator-the-client-to...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question