When to look for stored procedures, not embedded SQL

I am confused when moving on to stored procedures rather than embedded SQL in code

When I googled, I recognized these points

  • They allow modular programming.
  • They can reduce network traffic.
  • They can be used as a safety mechanism.

Please tell me how network traffic is connected?

+5
source share
6 answers

they can reduce network traffic only by returning the necessary data to the client.

; /, , , , . , , ,

+2

SP: ( , ), ... , .

: . SProcs , , EXECUTE SProcs - / .

+4

, proc, SQL.

- , SQL - .

+3

, /, SQL, .

, ; SQL, , , .

SQL , . LAMP .

+1

procs ...

, :

  • ( db PL/SQL. - )
  • ( ).
  • / ( / , db )
  • ( , - )
  • ( -).
  • , Fortran , , , .
  • // .. ( dbs - )
  • .

(, db) , , .

" " . , , .

( , ). - , .

0

.

  • , ?
  • ? ?

, , " plsql," SQL "," ". SQL Pl/Sql :

SQL DDL, DML . Oracle. SQL - SQL . - API, Open Database Connectivity (ODBC) Java Database Connectivity (JDBC).

. :

  • , Oracle PL/SQL, . , Oracle.

  • : Pl/sql

      • ( , ). db, sql , .. , /. , , , ! sql, .
    • .
    • , SGA.
  • pl/sql Oracle, :

    • DML, db

    • sql ** SQL

    • , CURSOR SQL.

    • Complex dynamic sql processing using the dbms_SQL API in combination with native dynamic SQL ( known fourth method ).

    • All modular reasons (you already mentioned): 1 Encapsulating calculations 2 To simplify the subqueries used inside the external sql 3 Combine scalar and aggregate values ​​within the same sql 4 Write once, using a lot.

    • Etc ...

0
source

All Articles