A user has 10 k means Clusters from a data set and wants to build 10 linear regression models with all these clusters separately. How to do this using loops in R?

1.1K    Asked by ranjan_6399 in Data Science , Asked on Jan 15, 2020
Answered by Ranjana Admin

Yes DML operations (update/insert/ delete) are allowed in the procedure also (DDL: such as create/ alter/drop/ truncate) is also allowed in the procedures.

In case if the procedure will get executed in parallel then DDL on a permanent table is not recommended as there could be chances that one procedure has already created a permanent table and another procedure is trying to create a table then one procedure may fail.

However it is recommended to use DDL statements if they exist and transactions should be used elsewhere there will be a chance of failing a procedure



Your Answer

Answer (1)

DML operations (INSERT, UPDATE, DELETE) are allowed in stored procedures, as well as DDL operations (CREATE, ALTER, DROP, TRUNCATE).

MyJDW

 However, when executing procedures in parallel, using DDL on permanent tables is not recommended. If one procedure creates a table while another tries to do the same, it could lead to conflicts and failures.


To avoid issues, it's best to:


Use DDL statements cautiously within procedures.


Implement transactions properly to ensure data consistency.


Consider using temporary tables if necessary to prevent conflicts.


This ensures better reliability and minimizes the risk of failures in stored procedures.

6 Hours

Interviews

Parent Categories