|
|
@ -320,7 +320,31 @@ Figure~\ref{fig:plsql1}.
|
|
|
|
|
|
|
|
|
|
|
|
\begin{figure}[htb]
|
|
|
|
\begin{figure}[htb]
|
|
|
|
\begin{center}
|
|
|
|
\begin{center}
|
|
|
|
\includegraphics[width=12cm]{plsql2.png}
|
|
|
|
|
|
|
|
|
|
|
|
\begin{tikzpicture}
|
|
|
|
|
|
|
|
\node[draw] (a) at (0,1) {\begin{minipage}[h][2cm][t]{5cm}
|
|
|
|
|
|
|
|
Fichier de commandes SQL\\
|
|
|
|
|
|
|
|
~\quad SELECT ...\\
|
|
|
|
|
|
|
|
~\quad UPDATE ...\\
|
|
|
|
|
|
|
|
~\quad UPDATE ...\\
|
|
|
|
|
|
|
|
\end{minipage}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
\draw[thick,-latex] (2.75,1.75) -- (7.75,1.75) node[midway,above] {SELECT ...};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
\draw[thick,-latex] (2.75,1) -- (7.75,1) node[midway,above] {UPDATE ...};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
\draw[thick,-latex] (2.75,.25) -- (7.75,.25) node[midway,above] {UPDATE ...};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
\node[draw] (b) at (10,1) {
|
|
|
|
|
|
|
|
\begin{minipage}[h][2cm][t]{4cm}
|
|
|
|
|
|
|
|
\ \\
|
|
|
|
|
|
|
|
\ \\
|
|
|
|
|
|
|
|
\centering MOTER SQL\\
|
|
|
|
|
|
|
|
\end{minipage}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
\end{tikzpicture}
|
|
|
|
|
|
|
|
% \includegraphics[width=12cm]{plsql2.png}
|
|
|
|
\end{center}
|
|
|
|
\end{center}
|
|
|
|
\caption{}\label{fig:plsql1}
|
|
|
|
\caption{}\label{fig:plsql1}
|
|
|
|
\end{figure}
|
|
|
|
\end{figure}
|
|
|
@ -331,8 +355,42 @@ sont transmis globalement au moteur SQL, comme le montre la
|
|
|
|
Figure~\ref{fig:plsql2}.
|
|
|
|
Figure~\ref{fig:plsql2}.
|
|
|
|
|
|
|
|
|
|
|
|
\begin{figure}[htb]
|
|
|
|
\begin{figure}[htb]
|
|
|
|
\begin{center}
|
|
|
|
\begin{center}
|
|
|
|
\includegraphics[width=12cm]{plsql1.png}
|
|
|
|
|
|
|
|
|
|
|
|
\begin{tikzpicture}
|
|
|
|
|
|
|
|
\node[draw] (a) at (0,1) {\begin{minipage}[h][3.25cm][t]{5cm}
|
|
|
|
|
|
|
|
Bloc PL/SQL\\
|
|
|
|
|
|
|
|
Begin \\
|
|
|
|
|
|
|
|
~~~~~~SELECT ...\\
|
|
|
|
|
|
|
|
~\quad If ... then\\
|
|
|
|
|
|
|
|
~\quad UPDATE ...\\
|
|
|
|
|
|
|
|
~\quad UPDATE ...\\
|
|
|
|
|
|
|
|
~\quad End;\\
|
|
|
|
|
|
|
|
\end{minipage}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
\draw[thick,-latex] (2.75,1) -- (7.75,1) node[midway,above] {
|
|
|
|
|
|
|
|
\begin{minipage}[h][1.22cm][t]{3cm}
|
|
|
|
|
|
|
|
begin \\
|
|
|
|
|
|
|
|
SELECT ...\\
|
|
|
|
|
|
|
|
~\quad If ... then\\
|
|
|
|
|
|
|
|
~\quad UPDATE ...\\
|
|
|
|
|
|
|
|
~\quad UPDATE ...\\
|
|
|
|
|
|
|
|
~\quad End;\\
|
|
|
|
|
|
|
|
\end{minipage}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
\node[draw] (b) at (10,1) {
|
|
|
|
|
|
|
|
\begin{minipage}[h][3.25cm][t]{4cm}
|
|
|
|
|
|
|
|
\ \\
|
|
|
|
|
|
|
|
\ \\
|
|
|
|
|
|
|
|
\ \\
|
|
|
|
|
|
|
|
\centering MOTER SQL\\
|
|
|
|
|
|
|
|
\end{minipage}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
\end{tikzpicture}
|
|
|
|
|
|
|
|
% \includegraphics[width=12cm]{plsql1.png}
|
|
|
|
\end{center}
|
|
|
|
\end{center}
|
|
|
|
\caption{Interaction entre PL/SQL et SQL.}\label{fig:plsql2}
|
|
|
|
\caption{Interaction entre PL/SQL et SQL.}\label{fig:plsql2}
|
|
|
|
\end{figure}
|
|
|
|
\end{figure}
|
|
|
@ -421,7 +479,48 @@ ligne attendant la suite de commande SQL.
|
|
|
|
|
|
|
|
|
|
|
|
\begin{figure}[htb]
|
|
|
|
\begin{figure}[htb]
|
|
|
|
\begin{center}
|
|
|
|
\begin{center}
|
|
|
|
\includegraphics[width=12cm]{bloc.png}
|
|
|
|
\fbox{
|
|
|
|
|
|
|
|
\begin{minipage}[h][2cm][t]{15cm}
|
|
|
|
|
|
|
|
\code{DECLARE} \\
|
|
|
|
|
|
|
|
D\'eclartion des variables locales au bloc, des constantes, des
|
|
|
|
|
|
|
|
execeptions, des cureurs.\\
|
|
|
|
|
|
|
|
\ \\
|
|
|
|
|
|
|
|
(facultative)
|
|
|
|
|
|
|
|
\end{minipage}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
\ \\
|
|
|
|
|
|
|
|
\ \\
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
\fbox
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
\begin{minipage}[h][7.25cm][t]{15cm}
|
|
|
|
|
|
|
|
\qquad \fbox{
|
|
|
|
|
|
|
|
\begin{minipage}[h][3cm][t]{10cm}
|
|
|
|
|
|
|
|
\code{BEGIN} \\
|
|
|
|
|
|
|
|
\ \\
|
|
|
|
|
|
|
|
Instructions PL/SQL et SQL \\
|
|
|
|
|
|
|
|
Possibilit\'es de blocs imbriqu\'es\\
|
|
|
|
|
|
|
|
\ \\
|
|
|
|
|
|
|
|
(obligatoire)
|
|
|
|
|
|
|
|
\end{minipage}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
\qquad \fbox{
|
|
|
|
|
|
|
|
\begin{minipage}[h][3cm][t]{10cm}
|
|
|
|
|
|
|
|
\code{EXCEPTION} \\
|
|
|
|
|
|
|
|
Traitements des erreurs, des cas particuliers\\
|
|
|
|
|
|
|
|
\ \\
|
|
|
|
|
|
|
|
(facultative)
|
|
|
|
|
|
|
|
\end{minipage}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
\ \\
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
\code{END ;}
|
|
|
|
|
|
|
|
\end{minipage}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
% \includegraphics[width=12cm]{bloc.png}
|
|
|
|
\end{center}
|
|
|
|
\end{center}
|
|
|
|
\caption{Structure d'un programme \plsql{}.}\label{fig:bloc}
|
|
|
|
\caption{Structure d'un programme \plsql{}.}\label{fig:bloc}
|
|
|
|
\end{figure}
|
|
|
|
\end{figure}
|
|
|
|