<?xml version="1.0"?>
<rss version="2.0">
   <channel>
      <title>5.1 Infografía. by Jorge Martinez Cruz</title>
      <link>https://padlet.com/martinezcruzorge002/rne2jtkdh44dqos9</link>
      <description></description>
      <language>en-us</language>
      <pubDate>2023-11-13 17:34:46 UTC</pubDate>
      <lastBuildDate>2023-11-13 18:06:26 UTC</lastBuildDate>
      <webMaster>hello@padlet.com</webMaster>
      <image>
         <url>https://padlet.net/icons/png/1f4bb.png</url>
      </image>
      <item>
         <title>Procedimientos Almacenados:</title>
         <author>martinezcruzorge002</author>
         <link>https://padlet.com/martinezcruzorge002/rne2jtkdh44dqos9/wish/2787757773</link>
         <description><![CDATA[<p>Un procedimiento almacenado es un conjunto de instrucciones SQL precompiladas y almacenadas en la base de datos para realizar una tarea específica.</p><p><br/></p><p><strong>Características:</strong></p><ul><li><p>Pueden aceptar parámetros.</p></li><li><p>Se almacenan en la base de datos para su reutilización.</p></li><li><p>Ayudan a modularizar y organizar el código.</p></li></ul><p><br/></p><p><strong>Ventajas:</strong></p><ul><li><p>Reducción de la redundancia del código.</p></li><li><p>Mayor seguridad al limitar el acceso directo a las tablas.</p></li></ul><p><br/></p><p><strong>Ejemplo:</strong></p><ul><li><p>CREATE PROCEDURE ObtenerClientes AS SELECT * FROM Clientes;</p></li></ul>]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/2051007496/9d5c219d6c0ad93021f47364e840f075/foto161.jpg" />
         <pubDate>2023-11-13 17:36:55 UTC</pubDate>
         <guid>https://padlet.com/martinezcruzorge002/rne2jtkdh44dqos9/wish/2787757773</guid>
      </item>
      <item>
         <title>Funciones:</title>
         <author>martinezcruzorge002</author>
         <link>https://padlet.com/martinezcruzorge002/rne2jtkdh44dqos9/wish/2787768374</link>
         <description><![CDATA[<p>Una función es un conjunto de instrucciones SQL que acepta parámetros y devuelve un valor.</p><p><br/></p><p><strong>Tipos:</strong></p><ul><li><p>Funciones escalares: Devuelven un único valor.</p></li><li><p>Funciones de tabla: Devuelven un conjunto de filas.</p></li></ul><p><br/></p><p><strong>Usos Comunes:</strong></p><ul><li><p>Realizar cálculos.</p></li><li><p>Manipular cadenas de texto o fechas.</p></li></ul><p><br/></p><p><strong>Ejemplo:</strong></p><ul><li><p>CREATE FUNCTION CalcularDescuento (@precio DECIMAL) RETURNS DECIMAL AS BEGIN RETURN @precio * 0.1; -- Descuento del 10% END;</p></li></ul>]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/2051007496/a3ec6972294394a89183b2a619dd5590/programmer_1653351_1280.png" />
         <pubDate>2023-11-13 17:43:51 UTC</pubDate>
         <guid>https://padlet.com/martinezcruzorge002/rne2jtkdh44dqos9/wish/2787768374</guid>
      </item>
      <item>
         <title>Triggers (Disparadores):</title>
         <author>martinezcruzorge002</author>
         <link>https://padlet.com/martinezcruzorge002/rne2jtkdh44dqos9/wish/2787769502</link>
         <description><![CDATA[<p>Un trigger es un conjunto de instrucciones SQL asociado a una tabla y se ejecuta automáticamente antes o después de ciertos eventos.</p><p><br/></p><p><strong>Tipos:</strong></p><ul><li><p><strong>BEFORE</strong>: Se ejecuta antes del evento.</p></li><li><p><strong>AFTER</strong>: Se ejecuta después del evento.</p></li></ul><p><br/></p><p><strong>Usos Comunes:</strong></p><ul><li><p>Validaciones antes de insertar o actualizar datos.</p></li><li><p>Registro de cambios en una tabla.</p></li></ul><p><br/></p><p><strong>Ejemplo:</strong></p><ul><li><p>CREATE TRIGGER ActualizarInventario AFTER INSERT ON Ventas FOR EACH ROW UPDATE Inventario SET Cantidad = Cantidad - NEW.CantidadVendida WHERE ProductoID = NEW.ProductoID;</p></li></ul>]]></description>
         <enclosure url="https://padlet-uploads.storage.googleapis.com/2051007496/fc5906d1250eecd406a9d7b80fd27126/triggers20130708.png" />
         <pubDate>2023-11-13 17:44:32 UTC</pubDate>
         <guid>https://padlet.com/martinezcruzorge002/rne2jtkdh44dqos9/wish/2787769502</guid>
      </item>
   </channel>
</rss>
