PL/SQL provides two types of composite datatypes - records and collections. Records allow grouping of related data elements, while collections allow storing multiple values in a single variable. Collections include index-by tables, nested tables, and varrays. Cursors allow processing rows from a SQL query one by one. Explicit cursors must be declared, opened, fetched from, and closed. Implicit cursors are used for DML statements. Functions return a value and can be used in SQL expressions, while procedures perform actions without returning a value. Both can accept parameters.
This document provides an overview and introduction to advanced PL/SQL concepts. It covers fundamentals like data types, control structures, cursors, exceptions and error handling. It also discusses more advanced topics such as Oracle types and collections, interacting with Oracle databases using PL/SQL, creating subprograms and packages, and error handling. The document is presented by Vinay Kumar and intended to teach advanced PL/SQL concepts.
This document provides an overview of PL/SQL including:
- PL/SQL block structure with declare, execution, and exception sections
- Variables, constants, datatypes
- Control structures like IF/ELSE statements and loop structures
- Procedures and functions
- Uses of PL/SQL include combining SQL with procedural logic, writing reusable code, and handling exceptions.
Oracle - Program with PL/SQL - Lession 06Thuan Nguyen
This document discusses explicit cursors in PL/SQL. It covers:
1) Declaring explicit cursors to query rows from a table and control the cursor through opening, fetching, and closing.
2) Using cursor attributes to check the status and number of rows fetched.
3) Processing cursor rows using a cursor FOR loop or fetching into a record variable.
What is PL/SQL
Procedural Language – SQL
An extension to SQL with design features of programming languages (procedural and object oriented)
PL/SQL and Java are both supported as internal host languages within Oracle products.
The document discusses PL/SQL, a programming language extension of SQL that adds procedural language features. It defines PL/SQL blocks and their components. It describes advantages like better performance and error handling. It also covers conditional statements, iterative statements, cursors, stored procedures, functions, exception handling, triggers, and embedded SQL in PL/SQL.
This document provides an agenda and overview for a two-day PL/SQL Fundamentals training course. The agenda covers key PL/SQL concepts like language features, the DECLARE, BEGIN, and EXCEPTION clauses, explicit cursors, nested blocks, and declared subprograms. Students will learn to program with PL/SQL using a sample COMPANY database that will be set up on Oracle Database Express Edition. The course is a prerequisite for more advanced PL/SQL trainings.
The document discusses PL/SQL programming concepts like procedures, cursors, and how to build and use them. It provides examples of creating procedures that update employee salaries, using cursors to loop through database records, and controlling cursor flow. The seminar exercise asks students to create a procedure that increases employee salaries by £500 or £1000 depending on the employee's grade level using concepts covered in the document.
This document provides an introduction to PL/SQL, including PL/SQL block structure, data types, variables, control structures, and more. PL/SQL combines procedural language elements with SQL statements to enhance database programming capabilities. Key elements include DECLARE, BEGIN, and END sections in a PL/SQL block; data types like NUMBER, VARCHAR2, DATE; variables and constants; control structures like IF-THEN-ELSE; and functions for output.
This document provides an overview and introduction to advanced PL/SQL concepts. It covers fundamentals like data types, control structures, cursors, exceptions and error handling. It also discusses more advanced topics such as Oracle types and collections, interacting with Oracle databases using PL/SQL, creating subprograms and packages, and error handling. The document is presented by Vinay Kumar and intended to teach advanced PL/SQL concepts.
This document provides an overview of PL/SQL including:
- PL/SQL block structure with declare, execution, and exception sections
- Variables, constants, datatypes
- Control structures like IF/ELSE statements and loop structures
- Procedures and functions
- Uses of PL/SQL include combining SQL with procedural logic, writing reusable code, and handling exceptions.
Oracle - Program with PL/SQL - Lession 06Thuan Nguyen
This document discusses explicit cursors in PL/SQL. It covers:
1) Declaring explicit cursors to query rows from a table and control the cursor through opening, fetching, and closing.
2) Using cursor attributes to check the status and number of rows fetched.
3) Processing cursor rows using a cursor FOR loop or fetching into a record variable.
What is PL/SQL
Procedural Language – SQL
An extension to SQL with design features of programming languages (procedural and object oriented)
PL/SQL and Java are both supported as internal host languages within Oracle products.
The document discusses PL/SQL, a programming language extension of SQL that adds procedural language features. It defines PL/SQL blocks and their components. It describes advantages like better performance and error handling. It also covers conditional statements, iterative statements, cursors, stored procedures, functions, exception handling, triggers, and embedded SQL in PL/SQL.
This document provides an agenda and overview for a two-day PL/SQL Fundamentals training course. The agenda covers key PL/SQL concepts like language features, the DECLARE, BEGIN, and EXCEPTION clauses, explicit cursors, nested blocks, and declared subprograms. Students will learn to program with PL/SQL using a sample COMPANY database that will be set up on Oracle Database Express Edition. The course is a prerequisite for more advanced PL/SQL trainings.
The document discusses PL/SQL programming concepts like procedures, cursors, and how to build and use them. It provides examples of creating procedures that update employee salaries, using cursors to loop through database records, and controlling cursor flow. The seminar exercise asks students to create a procedure that increases employee salaries by £500 or £1000 depending on the employee's grade level using concepts covered in the document.
This document provides an introduction to PL/SQL, including PL/SQL block structure, data types, variables, control structures, and more. PL/SQL combines procedural language elements with SQL statements to enhance database programming capabilities. Key elements include DECLARE, BEGIN, and END sections in a PL/SQL block; data types like NUMBER, VARCHAR2, DATE; variables and constants; control structures like IF-THEN-ELSE; and functions for output.
PL/SQL is a block-structured language used for accessing and manipulating Oracle databases. A PL/SQL block contains three parts: a declarative section, executable section, and exception-handling section. PL/SQL supports both scalar and composite datatypes. Control structures include conditional statements like IF-THEN-ELSE and CASE, and iterative statements like LOOP, WHILE, and FOR. Database interaction is done through SQL statements and cursors, which allow processing of multiple rows returned from a query.
PL/SQL allows developers to write blocks of code that can be stored and reused in the database. It provides procedural language capabilities like conditional statements and loops. Executing SQL statements as a PL/SQL block allows the database to process multiple statements simultaneously, improving performance by reducing network traffic. PL/SQL also handles errors during program execution.
This document discusses cursors in Oracle PL/SQL. It defines a cursor as a handle or pointer to a context area that allows a program to control how SQL statements are processed. There are two types of cursors - implicit cursors that are automatically created, and explicit cursors that are declared by the programmer. The processing of an explicit cursor involves declaring it, opening it to allocate memory, fetching rows from it one at a time, and closing it to free memory. Cursors can be used to retrieve and process rows from a query.
The document provides an overview of PL/SQL and server-side database programming. It discusses:
1) What PL/SQL is and how it extends SQL with programming features like variables, loops, and conditionals to allow for procedural logic on the server-side.
2) The advantages of server-side programming using PL/SQL over client-side programming, including improved performance due to reduced network traffic and ability to reuse code.
3) Key PL/SQL concepts like blocks, data types, scope rules, operators, program flow control structures, exceptions, and subprograms like procedures and functions.
PL/SQL is a combination of SQL and procedural programming languages. It allows developers to perform operations like control flow statements, variable declarations, and exception handling. PL/SQL code is organized into blocks that contain a declarative part, an executable part, and an optional exception-handling part. Variables and other objects can be declared locally or globally depending on their scope. Control structures like IF-THEN-ELSE, CASE, and loops allow conditional and iterative execution. Procedures and functions can also be created to reuse code.
PL/SQL is a programming language that combines the SQL operations of querying and manipulating data in an Oracle database with the procedural language constructs of variables, conditions, and loops. PL/SQL can be used for database-side programming as well as client-side application development. It provides advantages like better performance, portability, higher productivity, and integration with Oracle. PL/SQL supports various data types, control structures, exception handling, and object-oriented programming features. Cursors allow processing of multiple rows returned from a SQL statement and can be static, dynamic, or reference types. Procedures and functions are reusable program units that allow passing parameters and returning values.
The document provides an overview of advanced PL/SQL programming concepts including:
- Decision control structures like IF/THEN, IF/THEN/ELSE, and nested IF statements.
- Using SQL queries within PL/SQL programs.
- Implementing loops using LOOP/EXIT, WHILE, FOR, and cursor FOR loops.
- Retrieving and manipulating database data using implicit and explicit cursors.
- Handling runtime errors through the use of predefined, undefined, and user-defined exceptions.
PL/SQL is a database-oriented programming language that extends SQL with procedural capabilities like condition checking, looping, and branching. It allows programmers to handle errors and display user-friendly error messages. PL/SQL code is organized into declarative regions, and it can define variables, constants, cursors, procedures, and functions. Cursors are used to process result sets from a SQL query row by row.
This document provides an introduction and overview of PL/SQL blocks and functions in Oracle. It discusses:
1) The structure of a PL/SQL block including the declarative, executable, and exception handling sections. PL/SQL blocks allow accessing and manipulating data in an Oracle database.
2) Built-in PL/SQL data types like numeric, character, and date types.
3) How to create PL/SQL functions using the CREATE FUNCTION syntax. Functions must return a value and can be used in SQL statements.
4) Examples of simple functions to calculate the area of a circle and return an employee name from a table.
5) Using %TYPE and %ROWTYPE attributes to declare
Procedures and functions are named PL/SQL blocks that perform specific tasks. Procedures can return values using OUT and IN OUT parameters but are not required to, while functions must return a value of a specified datatype. Procedures are executed using EXECUTE or within other procedures, while functions can also be used in SELECT statements. Parameters can be used to pass values into and return values from both procedures and functions.
This document provides an overview of SQL concepts including:
- Data types like char, varchar, and null
- Core SQL commands like select, update, delete, truncate, and alter
- Joins like inner, left, and cross joins
- Transaction control with commit, rollback, and savepoints
- Exception handling and the ACID properties of transactions
- Other objects like views, sequences, indexes, and stored procedures
PL/SQL extends SQL with procedural language capabilities. It allows variables, control structures like IF/THEN statements, and subprograms. The basic unit is a block that declares variables, contains an executable section, and can handle exceptions. Blocks can be anonymous, named, stored as subprograms or triggers. Cursors allow processing query result sets row by row. Variables and attributes simplify code maintenance. Packages and modularization improve program organization. Error handling uses exceptions to manage runtime errors gracefully.
Triggers in PL/SQL are blocks of code that are automatically executed in response to certain events or actions on a database table, such as INSERT, UPDATE or DELETE operations. There are different types of triggers including row-level triggers that fire for each row affected, statement-level triggers that fire once per SQL statement, and timing triggers that fire before or after the triggering statement. Triggers are useful for maintaining complex constraints, recording changes made to tables, and enforcing referential integrity. A trigger contains a triggering event, an optional trigger restriction, and the trigger action to be executed.
This document provides an introduction to PL/SQL, including what PL/SQL is, why it is used, its basic structure and components like blocks, variables, and types. It also covers key PL/SQL concepts like conditions, loops, cursors, stored procedures, functions, and triggers. Examples are provided to illustrate how to write and execute basic PL/SQL code blocks, programs with variables, and stored programs that incorporate cursors, exceptions, and other features.
This document discusses SQL objects and PL/SQL datatypes in Oracle. It provides an overview of PL/SQL as an extension to SQL that allows procedural logic. It describes PL/SQL-specific and SQL object datatypes, including records, collections, and pipelined functions. It also covers SQL collection operators and comparing collections in PL/SQL.
Stored procedures are blocks of SQL code that can be stored on a database server for repeated execution. They allow for encapsulation of repetitive tasks, improved security, and better performance compared to executing SQL statements directly from a client application. Key features of stored procedures include portability, reusability, and the ability to accept parameters and return values. Common SQL statements like SELECT, INSERT, UPDATE and DELETE can be used within a stored procedure. Functions are similar but can only return a single value and have additional limitations compared to procedures.
Oracle - Program with PL/SQL - Lession 05Thuan Nguyen
This document discusses composite data types in PL/SQL including records, INDEX BY tables, and tables of records. It provides examples of how to create each type, use the %ROWTYPE attribute to define records based on database tables, and demonstrates various methods for accessing and manipulating data in INDEX BY tables including COUNT, EXISTS, DELETE and TRIM. The key concepts covered are how to define and work with composite data structures in PL/SQL to efficiently retrieve and process sets of related data.
This document provides guidelines for developing databases and writing SQL code. It includes recommendations for naming conventions, variables, select statements, cursors, wildcard characters, joins, batches, stored procedures, views, data types, indexes and more. The guidelines suggest using more efficient techniques like derived tables, ANSI joins, avoiding cursors and wildcards at the beginning of strings. It also recommends measuring performance and optimizing for queries over updates.
This document provides an overview of PL/SQL programming including:
- PL/SQL fundamentals such as being a full-featured programming language that combines SQL queries with procedural commands.
- Data types in PL/SQL including scalar, composite, and reference variables.
- Program blocks, assignment statements, arithmetic operators, and built-in functions for output, string manipulation, and data conversion.
- Techniques for debugging PL/SQL programs including finding syntax errors through compiler messages and finding logic errors by examining variable values.
PL/SQL is a block-structured language used for accessing and manipulating Oracle databases. A PL/SQL block contains three parts: a declarative section, executable section, and exception-handling section. PL/SQL supports both scalar and composite datatypes. Control structures include conditional statements like IF-THEN-ELSE and CASE, and iterative statements like LOOP, WHILE, and FOR. Database interaction is done through SQL statements and cursors, which allow processing of multiple rows returned from a query.
PL/SQL allows developers to write blocks of code that can be stored and reused in the database. It provides procedural language capabilities like conditional statements and loops. Executing SQL statements as a PL/SQL block allows the database to process multiple statements simultaneously, improving performance by reducing network traffic. PL/SQL also handles errors during program execution.
This document discusses cursors in Oracle PL/SQL. It defines a cursor as a handle or pointer to a context area that allows a program to control how SQL statements are processed. There are two types of cursors - implicit cursors that are automatically created, and explicit cursors that are declared by the programmer. The processing of an explicit cursor involves declaring it, opening it to allocate memory, fetching rows from it one at a time, and closing it to free memory. Cursors can be used to retrieve and process rows from a query.
The document provides an overview of PL/SQL and server-side database programming. It discusses:
1) What PL/SQL is and how it extends SQL with programming features like variables, loops, and conditionals to allow for procedural logic on the server-side.
2) The advantages of server-side programming using PL/SQL over client-side programming, including improved performance due to reduced network traffic and ability to reuse code.
3) Key PL/SQL concepts like blocks, data types, scope rules, operators, program flow control structures, exceptions, and subprograms like procedures and functions.
PL/SQL is a combination of SQL and procedural programming languages. It allows developers to perform operations like control flow statements, variable declarations, and exception handling. PL/SQL code is organized into blocks that contain a declarative part, an executable part, and an optional exception-handling part. Variables and other objects can be declared locally or globally depending on their scope. Control structures like IF-THEN-ELSE, CASE, and loops allow conditional and iterative execution. Procedures and functions can also be created to reuse code.
PL/SQL is a programming language that combines the SQL operations of querying and manipulating data in an Oracle database with the procedural language constructs of variables, conditions, and loops. PL/SQL can be used for database-side programming as well as client-side application development. It provides advantages like better performance, portability, higher productivity, and integration with Oracle. PL/SQL supports various data types, control structures, exception handling, and object-oriented programming features. Cursors allow processing of multiple rows returned from a SQL statement and can be static, dynamic, or reference types. Procedures and functions are reusable program units that allow passing parameters and returning values.
The document provides an overview of advanced PL/SQL programming concepts including:
- Decision control structures like IF/THEN, IF/THEN/ELSE, and nested IF statements.
- Using SQL queries within PL/SQL programs.
- Implementing loops using LOOP/EXIT, WHILE, FOR, and cursor FOR loops.
- Retrieving and manipulating database data using implicit and explicit cursors.
- Handling runtime errors through the use of predefined, undefined, and user-defined exceptions.
PL/SQL is a database-oriented programming language that extends SQL with procedural capabilities like condition checking, looping, and branching. It allows programmers to handle errors and display user-friendly error messages. PL/SQL code is organized into declarative regions, and it can define variables, constants, cursors, procedures, and functions. Cursors are used to process result sets from a SQL query row by row.
This document provides an introduction and overview of PL/SQL blocks and functions in Oracle. It discusses:
1) The structure of a PL/SQL block including the declarative, executable, and exception handling sections. PL/SQL blocks allow accessing and manipulating data in an Oracle database.
2) Built-in PL/SQL data types like numeric, character, and date types.
3) How to create PL/SQL functions using the CREATE FUNCTION syntax. Functions must return a value and can be used in SQL statements.
4) Examples of simple functions to calculate the area of a circle and return an employee name from a table.
5) Using %TYPE and %ROWTYPE attributes to declare
Procedures and functions are named PL/SQL blocks that perform specific tasks. Procedures can return values using OUT and IN OUT parameters but are not required to, while functions must return a value of a specified datatype. Procedures are executed using EXECUTE or within other procedures, while functions can also be used in SELECT statements. Parameters can be used to pass values into and return values from both procedures and functions.
This document provides an overview of SQL concepts including:
- Data types like char, varchar, and null
- Core SQL commands like select, update, delete, truncate, and alter
- Joins like inner, left, and cross joins
- Transaction control with commit, rollback, and savepoints
- Exception handling and the ACID properties of transactions
- Other objects like views, sequences, indexes, and stored procedures
PL/SQL extends SQL with procedural language capabilities. It allows variables, control structures like IF/THEN statements, and subprograms. The basic unit is a block that declares variables, contains an executable section, and can handle exceptions. Blocks can be anonymous, named, stored as subprograms or triggers. Cursors allow processing query result sets row by row. Variables and attributes simplify code maintenance. Packages and modularization improve program organization. Error handling uses exceptions to manage runtime errors gracefully.
Triggers in PL/SQL are blocks of code that are automatically executed in response to certain events or actions on a database table, such as INSERT, UPDATE or DELETE operations. There are different types of triggers including row-level triggers that fire for each row affected, statement-level triggers that fire once per SQL statement, and timing triggers that fire before or after the triggering statement. Triggers are useful for maintaining complex constraints, recording changes made to tables, and enforcing referential integrity. A trigger contains a triggering event, an optional trigger restriction, and the trigger action to be executed.
This document provides an introduction to PL/SQL, including what PL/SQL is, why it is used, its basic structure and components like blocks, variables, and types. It also covers key PL/SQL concepts like conditions, loops, cursors, stored procedures, functions, and triggers. Examples are provided to illustrate how to write and execute basic PL/SQL code blocks, programs with variables, and stored programs that incorporate cursors, exceptions, and other features.
This document discusses SQL objects and PL/SQL datatypes in Oracle. It provides an overview of PL/SQL as an extension to SQL that allows procedural logic. It describes PL/SQL-specific and SQL object datatypes, including records, collections, and pipelined functions. It also covers SQL collection operators and comparing collections in PL/SQL.
Stored procedures are blocks of SQL code that can be stored on a database server for repeated execution. They allow for encapsulation of repetitive tasks, improved security, and better performance compared to executing SQL statements directly from a client application. Key features of stored procedures include portability, reusability, and the ability to accept parameters and return values. Common SQL statements like SELECT, INSERT, UPDATE and DELETE can be used within a stored procedure. Functions are similar but can only return a single value and have additional limitations compared to procedures.
Oracle - Program with PL/SQL - Lession 05Thuan Nguyen
This document discusses composite data types in PL/SQL including records, INDEX BY tables, and tables of records. It provides examples of how to create each type, use the %ROWTYPE attribute to define records based on database tables, and demonstrates various methods for accessing and manipulating data in INDEX BY tables including COUNT, EXISTS, DELETE and TRIM. The key concepts covered are how to define and work with composite data structures in PL/SQL to efficiently retrieve and process sets of related data.
This document provides guidelines for developing databases and writing SQL code. It includes recommendations for naming conventions, variables, select statements, cursors, wildcard characters, joins, batches, stored procedures, views, data types, indexes and more. The guidelines suggest using more efficient techniques like derived tables, ANSI joins, avoiding cursors and wildcards at the beginning of strings. It also recommends measuring performance and optimizing for queries over updates.
This document provides an overview of PL/SQL programming including:
- PL/SQL fundamentals such as being a full-featured programming language that combines SQL queries with procedural commands.
- Data types in PL/SQL including scalar, composite, and reference variables.
- Program blocks, assignment statements, arithmetic operators, and built-in functions for output, string manipulation, and data conversion.
- Techniques for debugging PL/SQL programs including finding syntax errors through compiler messages and finding logic errors by examining variable values.
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024Sinan KOZAK
Sinan from the Delivery Hero mobile infrastructure engineering team shares a deep dive into performance acceleration with Gradle build cache optimizations. Sinan shares their journey into solving complex build-cache problems that affect Gradle builds. By understanding the challenges and solutions found in our journey, we aim to demonstrate the possibilities for faster builds. The case study reveals how overlapping outputs and cache misconfigurations led to significant increases in build times, especially as the project scaled up with numerous modules using Paparazzi tests. The journey from diagnosing to defeating cache issues offers invaluable lessons on maintaining cache integrity without sacrificing functionality.
Digital Twins Computer Networking Paper Presentation.pptxaryanpankaj78
A Digital Twin in computer networking is a virtual representation of a physical network, used to simulate, analyze, and optimize network performance and reliability. It leverages real-time data to enhance network management, predict issues, and improve decision-making processes.
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...shadow0702a
This document serves as a comprehensive step-by-step guide on how to effectively use PyCharm for remote debugging of the Windows Subsystem for Linux (WSL) on a local Windows machine. It meticulously outlines several critical steps in the process, starting with the crucial task of enabling permissions, followed by the installation and configuration of WSL.
The guide then proceeds to explain how to set up the SSH service within the WSL environment, an integral part of the process. Alongside this, it also provides detailed instructions on how to modify the inbound rules of the Windows firewall to facilitate the process, ensuring that there are no connectivity issues that could potentially hinder the debugging process.
The document further emphasizes on the importance of checking the connection between the Windows and WSL environments, providing instructions on how to ensure that the connection is optimal and ready for remote debugging.
It also offers an in-depth guide on how to configure the WSL interpreter and files within the PyCharm environment. This is essential for ensuring that the debugging process is set up correctly and that the program can be run effectively within the WSL terminal.
Additionally, the document provides guidance on how to set up breakpoints for debugging, a fundamental aspect of the debugging process which allows the developer to stop the execution of their code at certain points and inspect their program at those stages.
Finally, the document concludes by providing a link to a reference blog. This blog offers additional information and guidance on configuring the remote Python interpreter in PyCharm, providing the reader with a well-rounded understanding of the process.
Gas agency management system project report.pdfKamal Acharya
The project entitled "Gas Agency" is done to make the manual process easier by making it a computerized system for billing and maintaining stock. The Gas Agencies get the order request through phone calls or by personal from their customers and deliver the gas cylinders to their address based on their demand and previous delivery date. This process is made computerized and the customer's name, address and stock details are stored in a database. Based on this the billing for a customer is made simple and easier, since a customer order for gas can be accepted only after completing a certain period from the previous delivery. This can be calculated and billed easily through this. There are two types of delivery like domestic purpose use delivery and commercial purpose use delivery. The bill rate and capacity differs for both. This can be easily maintained and charged accordingly.
Introduction- e - waste – definition - sources of e-waste– hazardous substances in e-waste - effects of e-waste on environment and human health- need for e-waste management– e-waste handling rules - waste minimization techniques for managing e-waste – recycling of e-waste - disposal treatment methods of e- waste – mechanism of extraction of precious metal from leaching solution-global Scenario of E-waste – E-waste in India- case studies.
Comparative analysis between traditional aquaponics and reconstructed aquapon...bijceesjournal
The aquaponic system of planting is a method that does not require soil usage. It is a method that only needs water, fish, lava rocks (a substitute for soil), and plants. Aquaponic systems are sustainable and environmentally friendly. Its use not only helps to plant in small spaces but also helps reduce artificial chemical use and minimizes excess water use, as aquaponics consumes 90% less water than soil-based gardening. The study applied a descriptive and experimental design to assess and compare conventional and reconstructed aquaponic methods for reproducing tomatoes. The researchers created an observation checklist to determine the significant factors of the study. The study aims to determine the significant difference between traditional aquaponics and reconstructed aquaponics systems propagating tomatoes in terms of height, weight, girth, and number of fruits. The reconstructed aquaponics system’s higher growth yield results in a much more nourished crop than the traditional aquaponics system. It is superior in its number of fruits, height, weight, and girth measurement. Moreover, the reconstructed aquaponics system is proven to eliminate all the hindrances present in the traditional aquaponics system, which are overcrowding of fish, algae growth, pest problems, contaminated water, and dead fish.
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...IJECEIAES
Medical image analysis has witnessed significant advancements with deep learning techniques. In the domain of brain tumor segmentation, the ability to
precisely delineate tumor boundaries from magnetic resonance imaging (MRI)
scans holds profound implications for diagnosis. This study presents an ensemble convolutional neural network (CNN) with transfer learning, integrating
the state-of-the-art Deeplabv3+ architecture with the ResNet18 backbone. The
model is rigorously trained and evaluated, exhibiting remarkable performance
metrics, including an impressive global accuracy of 99.286%, a high-class accuracy of 82.191%, a mean intersection over union (IoU) of 79.900%, a weighted
IoU of 98.620%, and a Boundary F1 (BF) score of 83.303%. Notably, a detailed comparative analysis with existing methods showcases the superiority of
our proposed model. These findings underscore the model’s competence in precise brain tumor localization, underscoring its potential to revolutionize medical
image analysis and enhance healthcare outcomes. This research paves the way
for future exploration and optimization of advanced CNN models in medical
imaging, emphasizing addressing false positives and resource efficiency.
Generative AI Use cases applications solutions and implementation.pdfmahaffeycheryld
Generative AI solutions encompass a range of capabilities from content creation to complex problem-solving across industries. Implementing generative AI involves identifying specific business needs, developing tailored AI models using techniques like GANs and VAEs, and integrating these models into existing workflows. Data quality and continuous model refinement are crucial for effective implementation. Businesses must also consider ethical implications and ensure transparency in AI decision-making. Generative AI's implementation aims to enhance efficiency, creativity, and innovation by leveraging autonomous generation and sophisticated learning algorithms to meet diverse business challenges.
https://www.leewayhertz.com/generative-ai-use-cases-and-applications/
Rainfall intensity duration frequency curve statistical analysis and modeling...bijceesjournal
Using data from 41 years in Patna’ India’ the study’s goal is to analyze the trends of how often it rains on a weekly, seasonal, and annual basis (1981−2020). First, utilizing the intensity-duration-frequency (IDF) curve and the relationship by statistically analyzing rainfall’ the historical rainfall data set for Patna’ India’ during a 41 year period (1981−2020), was evaluated for its quality. Changes in the hydrologic cycle as a result of increased greenhouse gas emissions are expected to induce variations in the intensity, length, and frequency of precipitation events. One strategy to lessen vulnerability is to quantify probable changes and adapt to them. Techniques such as log-normal, normal, and Gumbel are used (EV-I). Distributions were created with durations of 1, 2, 3, 6, and 24 h and return times of 2, 5, 10, 25, and 100 years. There were also mathematical correlations discovered between rainfall and recurrence interval.
Findings: Based on findings, the Gumbel approach produced the highest intensity values, whereas the other approaches produced values that were close to each other. The data indicates that 461.9 mm of rain fell during the monsoon season’s 301st week. However, it was found that the 29th week had the greatest average rainfall, 92.6 mm. With 952.6 mm on average, the monsoon season saw the highest rainfall. Calculations revealed that the yearly rainfall averaged 1171.1 mm. Using Weibull’s method, the study was subsequently expanded to examine rainfall distribution at different recurrence intervals of 2, 5, 10, and 25 years. Rainfall and recurrence interval mathematical correlations were also developed. Further regression analysis revealed that short wave irrigation, wind direction, wind speed, pressure, relative humidity, and temperature all had a substantial influence on rainfall.
Originality and value: The results of the rainfall IDF curves can provide useful information to policymakers in making appropriate decisions in managing and minimizing floods in the study area.
2. Working with Composite Datatype
• Are of two types:
o PL/SQL RECORDS
o PL/SQL Collections
index by Table
Nested Table
VARRAY
• Contain internal components
• Are reusable
4. The %rowtype Attribute
• Declare a variable according to a collection of columns in a database
table or view.
• Prefix %rowtype with the database table.
• Fields in the record take their names and data types from the columns
of the table or view.
DECLARE
identifier reference%ROWTYPE;
…
emp_record employees%ROWTYPE;
5. Index by Tables
• An associative array (also called an index-by table)
o A set of key-value pairs.
o Each key is unique, and is used to locate the corresponding value.
o The key can be either an integer or a string.
• Using a key-value pair for the first time adds that pair to the
associative array.
• Using the same key with a different value changes the value.
7. Example
SQL> DECLARE
2 -- Associative array indexed by string:
3
4 TYPE population IS TABLE OF NUMBER -- Associative array type
5 INDEX BY VARCHAR2(64);
6
7 city_population population; -- Associative array variable
8 i VARCHAR2(64);
9
10 BEGIN
11 -- Add new elements to associative array:
12
13 city_population('Smallville') := 2000;
14 city_population('Midland') := 750000;
15 city_population('Megalopolis') := 1000000;
16
17 -- Change value associated with key 'Smallville':
18
19 city_population('Smallville') := 2001;
20
21 -- Print associative array:
22
23 i := city_population.FIRST;
24
25 WHILE i IS NOT NULL LOOP
26 DBMS_Output.PUT_LINE
27 ('Population of ' || i || ' is ' || TO_CHAR(city_population(i)));
28 i := city_population.NEXT(i);
29 END LOOP;
30 END;
31 /
9. Index by Table of Records
• Define a table variable with a permitted PL/SQL data type.
• Declare a PL/SQL variable to hold department information.
10. Example
DECLARE
TYPE stud_table_type is table of
student%ROWTYPE INDEX BY BINARY_INTEGER;
my_stud_table stud_table_type;
v_count NUMBER(9):= 550156548;
BEGIN
FOR i IN 550156548..v_count LOOP
SELECT * INTO my_stud_table(i) FROM student
WHERE snum = i;
END LOOP;
FOR i IN my_stud_table.FIRST..my_stud_table.LAST LOOP
DBMS_OUTPUT.PUT_LINE(my_stud_table(i).sname);
END LOOP;
END;
11. Cursors
• Every SQL statement executed by the Oracle Server has an individual
cursor associated with it:
o Implicit cursors: Declared for all DML and PL/SQL select
statements
o Explicit cursors: Declared and named by the programmer
12. Implicit Cursor
• Oracle Engine explicitly opens a cursor
PL/SQL Code
Block on Client
Machine
Server
Oracle
Engine HDD
• Cursor Opened on the Server
• Rows retrieved
Cursor Attributes: %ISOPEN, %FOUND, %NOTFOUND, %ROWCOUNT
Usage: SQL%ROWCOUNT
13. Explicit Cursor
Declare
• Create a
named
SQL area
Open
• Identify
the Active
Set
Fetch
• Load the
current
row into
variables
Verify
• Check
whether
empty or
not
Close
• Release
the active
set if
empty
Use explicit cursors to individually process each row returned by a
multiple-row SELECT statement.
14. Explicit Cursor Working Principle
Client
Machine
Server
Open <CursorName>
Oracle
Engine HDD
C1 C2 C3 C4
Server RAM
Active Data Set
Fetch <CursorName> INTO …
Client RAM
V1
V2
V3
V4
Fetch One row
at a time
Advance the
cursor
15. Declaring the Cursor
• Do not include the into clause in the
cursor declaration.
• If processing rows in a specific
sequence is required use the order
by clause in the query.
DECLARE
CURSOR emp_cursor IS
SELECT employee_id, FROM employees;
CURSOR dept_cursor IS
SELECT * FROM departments WHERE location_id = 170;
BEGIN
…
16. Opening the Cursor
• Open the cursor to execute the query and identify the active set.
• If the query returns no rows, no exception is raised.
• Use cursor attributes to test the outcome after a fetch.
1. Dynamically allocates memory for a context area that eventually contains
crucial processing information.
2. Parses the SELECT statement.
3. Binds the input variables—sets the value for the input variables by
obtaining their memory addresses.
4. Identifies the active set—the set of rows that satisfy the search criteria.
Rows in the active set are not retrieved into variables when the OPEN
statement is executed. Rather, the FETCH statement retrieves the rows.
5. Positions the pointer just before the first row in the active set.
17. Fetching Data from the Cursor
• Retrieve the current row values into variables.
• Include the same number of variables.
• Match each variable to correspond to the columns positionally.
• Test to see whether the cursor contains rows.
18. Example
SET SERVEROUTPUT ON
DECLARE
v_empno employees.employee_id%TYPE;
v_ename employees.last_name%TYPE;
CURSOR emp_cursor IS
SELECT employee_id, last_name FROM employees;
BEGIN
OPEN emp_cursor;
FOR i IN 1..10 LOOP
FETCH emp_cursor INTO v_empno, v_ename;
DBMS_OUTPUT.PUT_LINE (TO_CHAR(v_empno) II' 'II
v_ename);
END LOOP;
END ;
19. Closing the Cursor
• Close the cursor after completing the processing of the rows.
• Reopen the cursor, if required.
• Do not attempt to fetch data from a cursor after it has been closed.
21. Example
DECLARE
CURSOR emp_cursor IS
SELECT employee_id, last_name FROM employees;
emp_record emp_cursor%ROWTYPE;
BEGIN
OPEN emp_cursor;
LOOP
FETCH emp_cursor INTO emp_record;
EXIT WHEN emp_cursor%NOTFOUND;
INSERT INTO temp_list (empid, empname) VALUES
(emp_record.employee_id, emp_record.last_name);
END LOOP;
COMMIT;
CLOSE emp_cursor;
END;
22. Another Way
• DECLARE
• TYPE emp_record IS RECORD ( eid NUMBER, ename VARCHAR2(30) );
• employee EMP_RECORD;
• CURSOR cur IS SELECT empid, empname FROM employee ;
• BEGIN
• OPEN cur ;
• LOOP
• FETCH cur INTO employee;
• EXIT WHEN cur%NOTFOUND;
• dbms_output.put_line( 'NAME' || employee.ename );
• END LOOP;
• CLOSE cur ;
• END;
• /
23. Cursor with If statement
• DECLARE
• TYPE emp_record IS RECORD ( eid NUMBER, ename VARCHAR2(30) );
• employee EMP_RECORD;
• CURSOR cur IS SELECT empid, empname FROM employee where empid = -1 ;
• BEGIN
• OPEN cur ;
• LOOP
• FETCH cur INTO employee;
• IF cur%NOTFOUND THEN
• IF cur%ROWCOUNT = 0 THEN
• dbms_output.put_line( 'No Data Found' );
• END IF;
• EXIT;
• ELSE
• dbms_output.put_line( 'NAME' || employee.ename );
• END IF;
• END LOOP;
• CLOSE cur ;
• END;
• /
24. Cursor for Loops
• The cursor for loop is a shortcut to process explicit cursors.
• Implicit open, fetch, exit, and close occur.
• The record is implicitly declared.
25. Example
DECLARE
CURSOR emp_cursor IS
SELECT last_name, department_id
FROM employees;
BEGIN
FOR emp_record IN emp_cursor LOOP
—implicit open and implicit fetch occur
IF emp_record.department_id = 80 THEN
DBMS_OUTPUT.PUT_LINE ('Employee ' ||
emp_record.last_name
|| ' works in the Sales Dept. ');
END IF;
END LOOP; --implicit close and implicit loop exit
END ;
26. DECLARE
v_employee_id employees.employee_id%TYPE;
v_job_id employees.job_id%TYPE;
v_start_date DATE;
v_end_date DATE;
CURSOR emp_cursor IS
SELECT employee_id, job_id, start_date, end_date
FROM job_history
ORDER BY employee_id;
BEGIN
OPEN emp_cursor;
LOOP
FETCH emp_cursor
INTO v_employee_id, v_job_id, v_start_date, v_end_date;
DBMS_OUTPUT.PUT_LINE ('Employee #: ' || v_employee_id ||
' held the job of ' || v_job_id || ' FROM ' || v_start_date | | ' TO ' I I
v_end_date);
EXIT WHEN emp_cursor%ROWCOUNT > 4 OR
emp_cursor%NOTFOUND;
END LOOP;
CLOSE emp_cursor;
END;
27. Handling Exceptions with PL/SQL
• An Exception is an identifier in PL/SQL that is raised during execution.
• How is it raised?
o An Oracle error occurs.
o You raise it explicitly.
• How do you handle it?
o Trap it with a handler.
oPropagate it to the calling environment.
32. Block Structure for PL/SQL Subprograms
- The PL/SQL subprogram type, that is, either a procedure or a function
- The name of the subprogram
- The parameter list, if one exists
- The RETURN clause, which applies only to functions
The IS or AS
keyword is
mandatory.
The keyword
DECLARE is not
used
33. Procedure
• The replace option indicates that if the procedure exists, it will be dropped
and replaced with the new version created by the statement.
• PL/SQL block starts with either begin or the declaration of local variables
and ends with either end or end procedure_name.
• Type of argument: IN (default) , OUT , IN OUT
34. Formal Versus Actual Parameters
CREATE PROCEDURE raise_sal (p_id NUMBER, p_amount NUMBER)
…
END raise_sal;
raise_sal(v_id, 2000)
36. Creating Procedures with Parameters
IN OUT IN OUT
Default mode Must be specified Must be specified
Value is passed into
subprogram
Returned to calling
environment
Passed into subprogram;
returned to calling
environment
Formal parameter acts
as a constant
Uninitialized variable Initialized variable
Actual parameter can be
a literal, expression,
constant, or initialized
variable
Must be a variable Must be a variable
Can be assigned a
default value
Cannot be assigned
a default value
Cannot be assigned a default
value
37. In, Out Parameters: Example
CREATE OR REPLACE PROCEDURE getDBUSERByUserId
( p_userid IN DBUSER.USER_ID%TYPE,
o_username OUT DBUSER.USERNAME%TYPE,
o_createdby OUT DBUSER.CREATED_BY%TYPE,
o_date OUT DBUSER.CREATED_DATE%TYPE)
IS
BEGIN
SELECT USERNAME , CREATED_BY, CREATED_DATE INTO o_username,
o_createdby, o_date from DBUSER WHERE USER_ID = p_userid;
END;
/
39. Insert through Procedure
CREATE OR REPLACE PROCEDURE insertDBUSER
( p_userid IN DBUSER.USER_ID%TYPE,
p_username IN DBUSER.USERNAME%TYPE,
p_createdby IN DBUSER.CREATED_BY%TYPE,
p_date IN DBUSER.CREATED_DATE%TYPE)
IS
BEGIN
INSERT INTO DBUSER ("USER_ID", "USERNAME", "CREATED_BY",
"CREATED_DATE") VALUES (p_userid, p_username,p_createdby,
p_date);
COMMIT;
END;
/
BEGIN
insertDBUSER(1001,'mkyong','system',SYSDATE);
END;
40. Update through procedure
CREATE OR REPLACE PROCEDURE updateDBUSER
( p_userid IN DBUSER.USER_ID%TYPE,
p_username IN DBUSER.USERNAME%TYPE)
IS
BEGIN
UPDATE DBUSER SET USERNAME = p_username where USER_ID
= p_userid;
COMMIT;
END;
/
BEGIN
updateDBUSER(1001,'new_mkyong');
END;
41. Functions
The RETURN data type must not
include a size specification.
There must be at least one RETURN (expression)
42. CREATE OR REPLACE Function IncomeLevel
( name_in IN varchar2 )
RETURN varchar2
IS
monthly_value number(6);
ILevel varchar2(20);
cursor c1 is SELECT SAL FROM scott.EMP WHERE ename = name_in;
BEGIN
open c1;
fetch c1 into monthly_value;
close c1;
IF monthly_value <= 1000 THEN
ILevel := 'Low Income';
ELSIF monthly_value > 1000 and monthly_value <= 2000 THEN
ILevel := 'Avg Income';
ELSIF monthly_value > 2000 and monthly_value <= 3000 THEN
ILevel := 'Moderate Income';
ELSE ILevel := 'High Income';
END IF;
RETURN ILevel;
END;
43. Locations to Call User-Defined Functions
• Select list of a select command
• Condition of the where and having clauses
• CONNECT BY, START WITH, ORDER BY, and GROUP by clauses
• values clause of the insert command
• set clause of the update command
o E.g. select empno, IncomeLevel(ename) as Income from
scott.EMP where ename='KING'
44. Restrictions
• To be callable from SQL expressions, a user-defined function must:
o Be a stored function
o Accept only in parameters
o Accept only valid SQL data types, not PL/SQL specific types, as
parameters
o Return data types that are valid SQL data types, not PL/SQL
specific types
o Functions called from SQL expressions cannot contain DML
statements.
45. Restrictions
• To be callable from SQL expressions, a user-defined function must:
oFunctions called from update/delete statements on a table T
cannot contain DML on the same table T.
oFunctions called from a DML statement on a table T cannot query
the same table.
oFunctions called from SQL statements cannot contain statements
that end the transactions.
oCalls to subprograms that break the previous restriction are not
allowed in the function.
46. Comparing Procedures and Functions
Procedure Function
Execute as a PL/SQL statement Invoke as part of an expression
No return clause in the header Must contain a return clause in the
header
Can return none, one, or many
values
Must return a single value
Can contain a return statement Must contain at least one return
statement