❔ SQL query for multiple data objects
Hello folks, Imagine i have a json array of json objects that i send to an API wich uses a SQL query to INSERT the data into the database.
Each json object in the array contains data that should be pushed into table 1.
every json object also contains a property called parameters that is an Array of objects. each object of this parameters array needs to be inserted into table 2.
Is it normal practice to for example loop over all parameters and execute the SQL query for each item? It feels wrong to do that somehow but then again i dont know what other option there is. Thanks in advance!
Each json object in the array contains data that should be pushed into table 1.
every json object also contains a property called parameters that is an Array of objects. each object of this parameters array needs to be inserted into table 2.
Is it normal practice to for example loop over all parameters and execute the SQL query for each item? It feels wrong to do that somehow but then again i dont know what other option there is. Thanks in advance!
