Visão Geral
Este curso apresenta os fundamentos da linguagem Oracle PL/SQL (Procedural Language/SQL), capacitando o participante a desenvolver blocos de código, procedimentos, funções, packages e gatilhos para automatizar processos e implementar regras de negócio em bancos de dados Oracle. O curso combina conceitos teóricos e atividades práticas para fornecer uma base sólida no desenvolvimento PL/SQL.
Conteúdo Programatico
Module 1: Introduction to PL/SQL Programming
- Overview of PL/SQL architecture
- Benefits of procedural programming in Oracle
- Understanding PL/SQL execution environment
- Structure of a PL/SQL block
- Using Oracle SQL Developer for PL/SQL development
- Writing and executing simple PL/SQL programs
Module 2: Variables, Data Types and Operators
- Declaring variables and constants
- PL/SQL data types
- Variable scope and visibility
- Assignment operators
- Expressions and calculations
- Type conversion techniques
Module 3: Program Control Structures
- Conditional statements (IF, ELSIF, ELSE)
- CASE expressions and statements
- Loop structures
- WHILE loops
- FOR loops
- Nested control structures
Module 4: Working with SQL in PL/SQL
- Using SELECT INTO statements
- Data manipulation with INSERT, UPDATE and DELETE
- Transaction control concepts
- Managing COMMIT and ROLLBACK operations
- Using SQL functions within PL/SQL
- Best practices for SQL integration
Module 5: Cursors and Record Processing
- Introduction to cursors
- Implicit and explicit cursors
- Cursor attributes
- Cursor FOR loops
- Processing multiple rows
- Working with records and collections
Module 6: Exception Handling
- Understanding runtime errors
- Built-in exceptions
- User-defined exceptions
- Exception handling blocks
- Logging and error reporting techniques
- Debugging PL/SQL applications
Module 7: Procedures and Functions
- Creating stored procedures
- Creating stored functions
- Input and output parameters
- Function return values
- Calling procedures and functions
- Reusable code development practices
Module 8: Packages and Modular Programming
- Introduction to packages
- Package specification and body
- Managing package variables
- Package procedures and functions
- Benefits of modular development
- Package maintenance and versioning
Module 9: Triggers and Database Automation
- Introduction to database triggers
- BEFORE and AFTER triggers
- Row-level and statement-level triggers
- Auditing and validation triggers
- Trigger management and maintenance
- Trigger best practices
Module 10: Practical Labs and Real-World Applications
- Developing complete PL/SQL programs
- Business rule implementation exercises
- Database automation scenarios
- Error handling and debugging workshops
- Performance and code optimization basics
- Final PL/SQL development project