It consists of important different concepts related to PL/SQL that are covered like the Basic structure of PL/SQL block, Variables and Constants in PL/SQL, Control Structures i.e., Conditional, Iterative, and Sequential Control, Procedure and Function, Cursors and its Types, Applications of implicit and explicit cursors, Triggers and its Types and Exception Handling.
The document provides an overview of basic concepts related to SQL server databases including database objects, file systems, storage structures, and query processing. It discusses topics like SQL server databases, storage files and file groups, data pages and extents, data organization in heaps vs indexed tables, and how queries are processed through either full table scans or using indexes.
This document discusses DML and DDL in SQL. DML is used to manipulate data in databases through statements like SELECT, UPDATE, DELETE, and INSERT. It allows users to specify and modify data. DDL is used to define and modify database structures through statements like CREATE, ALTER, DROP, TRUNCATE, and RENAME. DDL manages database schemas and DML manages the data. Both have advantages like shared data, integrity, security and efficiency.
PL/SQL is a combination of SQL along with the procedural features of programming languages.
It provides specific syntax for this purpose and supports exactly the same datatypes as SQL.
SQL language includes four primary statement types: DML, DDL, DCL, and TCL. DML statements manipulate data within tables using operations like SELECT, INSERT, UPDATE, and DELETE. DDL statements define and modify database schema using commands like CREATE, ALTER, and DROP. DCL statements control user access privileges with GRANT and REVOKE. TCL statements manage transactions with COMMIT, ROLLBACK, and SAVEPOINT to maintain data integrity.
Triggers are stored procedures that are automatically executed in response to data modification events like insert, update or delete on a table. There are two types of triggers - DML triggers which respond to data manipulation statements, and DDL triggers which respond to data definition language statements like create, alter or drop. Triggers can be used to perform validation, auditing or other actions in response to data changes. They can be disabled, enabled or modified as needed using SQL statements.
Structured Query Language
SQL Commands:
• The standard SQL commands to interact with relational databases are CREATE, SELECT, INSERT, UPDATE, DELETE and DROP
The document provides an overview of basic concepts related to SQL server databases including database objects, file systems, storage structures, and query processing. It discusses topics like SQL server databases, storage files and file groups, data pages and extents, data organization in heaps vs indexed tables, and how queries are processed through either full table scans or using indexes.
This document discusses DML and DDL in SQL. DML is used to manipulate data in databases through statements like SELECT, UPDATE, DELETE, and INSERT. It allows users to specify and modify data. DDL is used to define and modify database structures through statements like CREATE, ALTER, DROP, TRUNCATE, and RENAME. DDL manages database schemas and DML manages the data. Both have advantages like shared data, integrity, security and efficiency.
PL/SQL is a combination of SQL along with the procedural features of programming languages.
It provides specific syntax for this purpose and supports exactly the same datatypes as SQL.
SQL language includes four primary statement types: DML, DDL, DCL, and TCL. DML statements manipulate data within tables using operations like SELECT, INSERT, UPDATE, and DELETE. DDL statements define and modify database schema using commands like CREATE, ALTER, and DROP. DCL statements control user access privileges with GRANT and REVOKE. TCL statements manage transactions with COMMIT, ROLLBACK, and SAVEPOINT to maintain data integrity.
Triggers are stored procedures that are automatically executed in response to data modification events like insert, update or delete on a table. There are two types of triggers - DML triggers which respond to data manipulation statements, and DDL triggers which respond to data definition language statements like create, alter or drop. Triggers can be used to perform validation, auditing or other actions in response to data changes. They can be disabled, enabled or modified as needed using SQL statements.
Structured Query Language
SQL Commands:
• The standard SQL commands to interact with relational databases are CREATE, SELECT, INSERT, UPDATE, DELETE and DROP
Consists of the explanations of the basics of SQL and commands of SQL.Helpful for II PU NCERT students and also degree studeents to understand some basic things.
PL/SQL is Oracle's standard language for accessing and manipulating data in Oracle databases. It allows developers to integrate SQL statements with procedural constructs like variables, conditions, and loops. PL/SQL code is organized into blocks that define a declarative section for variable declarations and an executable section containing SQL and PL/SQL statements. Variables can be scalar, composite, reference, or LOB types and are declared in the declarative section before being used in the executable section.
in this presentation the commands let you help to understand the basic of the database system software. how to retrieve data, how to feed data and manipulate it very efficiently by using this commands.
The document discusses SQL and its functions. SQL is a language used to store, manipulate, and retrieve data in relational databases. It includes data definition language (DDL) commands like CREATE, ALTER, TRUNCATE, DROP, and RENAME to define and modify database structures. It also includes data manipulation language (DML) commands like INSERT, UPDATE, DELETE, and MERGE to manage data within databases. Examples of each command are provided.
This document discusses leftist heaps, which are a type of priority queue implemented as a variant of a binary heap. Leftist heaps maintain the property that the right descendant of each node has a lower rank, or distance to the nearest leaf node, than the left descendant. This property helps keep the tree balanced during operations like insertion and merging of heaps that have a time complexity of O(log n). Deletion of the minimum element involves disconnecting and merging the left and right subtrees.
The document discusses relational databases and relational database management systems (RDBMS). It defines key concepts like relations, entities, attributes, and relationships between tables. It explains how data is stored in rows and columns. It also discusses relational database languages including data definition language (DDL) for specifying database schema, data manipulation language (DML) for accessing and manipulating data, data control language (DCL) for user access control, and transaction control language (TCL) for transaction management.
This document summarizes a seminar presentation on database triggers. It defines a database trigger as procedural code that is automatically executed in response to certain events on a table or view. It discusses the types of events that can fire a trigger, including DML, DDL, system, and user events. It also outlines the need for triggers to enforce business rules, audit changes, and enhance performance. The document provides details on the major features of triggers, including the different types of triggers based on timing (before and after), scope (row and statement), and triggering event (DML, DDL, system, user). It concludes with an example of the syntax for creating a database trigger.
Stored procedures and functions are named PL/SQL blocks that are stored in a database. They improve performance by reducing network traffic and allowing shared memory usage. Stored procedures are created using the CREATE PROCEDURE statement and can accept parameters using modes like IN, OUT, and IN OUT. Stored functions are similar but return a value. Packages group related database objects like procedures, functions, types and provide modularity and information hiding.
This document discusses different types of SQL functions including string, numeric, conversion, group, date/time, and user-defined functions. It provides examples of common string functions like UPPER, LENGTH, SUBSTR. Numeric functions covered include ABS, ROUND, POWER. Group functions include AVG, COUNT, MAX, MIN, SUM. Date functions allow conversion and calculation involving dates. The document demonstrates how to create scalar and table-valued user-defined functions in SQL.
This presentation gives a clear and concise description of joins in sql and several types of sql joins.
These slides also contains the pictorial representation as well as syntax for each type of joins.
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 topics related to database management systems including database users, architecture, data definition language, data manipulation language, entity relationship modeling, and SQL commands. It provides examples of using SQL commands like CREATE TABLE, INSERT, UPDATE, DELETE, SELECT, ALTER TABLE, DROP TABLE, RENAME, COMMIT, ROLLBACK, GRANT and REVOKE. It also explains concepts of entity sets, relationship sets, attributes, and ER diagram notations and provides examples of ER diagrams.
Normalization is the process of removing redundant data from your tables to improve storage efficiency, data integrity, and scalability.
Normalization generally involves splitting existing tables into multiple ones, which must be re-joined or linked each time a query is issued.
Why normalization?
The relation derived from the user view or data store will most likely be unnormalized.
The problem usually happens when an existing system uses unstructured file, e.g. in MS Excel.
This document discusses database languages used in database management systems (DBMS). It describes three types of database languages: data definition language (DDL) used to define and modify the database schema; data manipulation language (DML) used to insert, update, delete and retrieve data; and data control language (DCL) used to control access privileges. Examples are provided for common statements in each language type like CREATE, ALTER, DROP for DDL and INSERT, UPDATE, DELETE, SELECT for DML. Case sensitivity and data types are also briefly covered.
The document discusses stored procedures in databases. It defines stored procedures as procedures that are stored in a database with a name, parameter list, and SQL statements. The key points covered include:
- Stored procedures are created using the CREATE PROCEDURE statement and can contain SQL statements and control flow statements like IF/THEN.
- Parameters can be used to pass data into and out of stored procedures.
- Variables can be declared and used within stored procedures.
- Cursors allow stored procedures to iterate through result sets row by row to perform complex logic.
- Error handling and exceptions can be managed within stored procedures using DECLARE HANDLER.
Stored procedures offer benefits
This document provides an overview of the key clauses in a SQL SELECT statement:
1. The SELECT, FROM, WHERE, GROUP BY, HAVING, and ORDER BY clauses must be written in a specific order. The SELECT clause chooses the columns and FROM clause specifies the table.
2. The WHERE clause filters rows based on conditions and HAVING filters groups. GROUP BY divides rows into groups and ORDER BY sorts the results.
3. Examples demonstrate how each clause works, such as a SELECT statement that filters rows from a student table where the student ID equals 2.
This document provides an introduction to SQL and database systems. It begins with example tables to demonstrate SQL concepts. It then covers the objectives of SQL, including allowing users to create database structures, manipulate data, and perform queries. Various SQL concepts are introduced such as data types, comparison operators, logical operators, and arithmetic operators. The document also discusses SQL statements for schema and catalog definitions, data definition, data manipulation, and other operators. Example SQL queries are provided to illustrate concepts around selecting columns, rows, sorting, aggregation, grouping, and more.
SQL injection is a common web application security vulnerability that allows attackers to control an application's database by tricking the application into sending unexpected SQL commands to the database. It works by submitting malicious SQL code as input, which gets executed by the database since the application concatenates user input directly into SQL queries. The key to preventing SQL injection is using prepared statements with bound parameters instead of building SQL queries through string concatenation. This separates the SQL statement from any user-supplied input that could contain malicious code.
Need for PL/SQL,Benefits of Using PL/SQL,PL/SQL Block Types and Constructs,PL/SQL Block Structure,Operators and SQL Functions in PL/SQL,Variables,Nested Blocks.
Consists of the explanations of the basics of SQL and commands of SQL.Helpful for II PU NCERT students and also degree studeents to understand some basic things.
PL/SQL is Oracle's standard language for accessing and manipulating data in Oracle databases. It allows developers to integrate SQL statements with procedural constructs like variables, conditions, and loops. PL/SQL code is organized into blocks that define a declarative section for variable declarations and an executable section containing SQL and PL/SQL statements. Variables can be scalar, composite, reference, or LOB types and are declared in the declarative section before being used in the executable section.
in this presentation the commands let you help to understand the basic of the database system software. how to retrieve data, how to feed data and manipulate it very efficiently by using this commands.
The document discusses SQL and its functions. SQL is a language used to store, manipulate, and retrieve data in relational databases. It includes data definition language (DDL) commands like CREATE, ALTER, TRUNCATE, DROP, and RENAME to define and modify database structures. It also includes data manipulation language (DML) commands like INSERT, UPDATE, DELETE, and MERGE to manage data within databases. Examples of each command are provided.
This document discusses leftist heaps, which are a type of priority queue implemented as a variant of a binary heap. Leftist heaps maintain the property that the right descendant of each node has a lower rank, or distance to the nearest leaf node, than the left descendant. This property helps keep the tree balanced during operations like insertion and merging of heaps that have a time complexity of O(log n). Deletion of the minimum element involves disconnecting and merging the left and right subtrees.
The document discusses relational databases and relational database management systems (RDBMS). It defines key concepts like relations, entities, attributes, and relationships between tables. It explains how data is stored in rows and columns. It also discusses relational database languages including data definition language (DDL) for specifying database schema, data manipulation language (DML) for accessing and manipulating data, data control language (DCL) for user access control, and transaction control language (TCL) for transaction management.
This document summarizes a seminar presentation on database triggers. It defines a database trigger as procedural code that is automatically executed in response to certain events on a table or view. It discusses the types of events that can fire a trigger, including DML, DDL, system, and user events. It also outlines the need for triggers to enforce business rules, audit changes, and enhance performance. The document provides details on the major features of triggers, including the different types of triggers based on timing (before and after), scope (row and statement), and triggering event (DML, DDL, system, user). It concludes with an example of the syntax for creating a database trigger.
Stored procedures and functions are named PL/SQL blocks that are stored in a database. They improve performance by reducing network traffic and allowing shared memory usage. Stored procedures are created using the CREATE PROCEDURE statement and can accept parameters using modes like IN, OUT, and IN OUT. Stored functions are similar but return a value. Packages group related database objects like procedures, functions, types and provide modularity and information hiding.
This document discusses different types of SQL functions including string, numeric, conversion, group, date/time, and user-defined functions. It provides examples of common string functions like UPPER, LENGTH, SUBSTR. Numeric functions covered include ABS, ROUND, POWER. Group functions include AVG, COUNT, MAX, MIN, SUM. Date functions allow conversion and calculation involving dates. The document demonstrates how to create scalar and table-valued user-defined functions in SQL.
This presentation gives a clear and concise description of joins in sql and several types of sql joins.
These slides also contains the pictorial representation as well as syntax for each type of joins.
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 topics related to database management systems including database users, architecture, data definition language, data manipulation language, entity relationship modeling, and SQL commands. It provides examples of using SQL commands like CREATE TABLE, INSERT, UPDATE, DELETE, SELECT, ALTER TABLE, DROP TABLE, RENAME, COMMIT, ROLLBACK, GRANT and REVOKE. It also explains concepts of entity sets, relationship sets, attributes, and ER diagram notations and provides examples of ER diagrams.
Normalization is the process of removing redundant data from your tables to improve storage efficiency, data integrity, and scalability.
Normalization generally involves splitting existing tables into multiple ones, which must be re-joined or linked each time a query is issued.
Why normalization?
The relation derived from the user view or data store will most likely be unnormalized.
The problem usually happens when an existing system uses unstructured file, e.g. in MS Excel.
This document discusses database languages used in database management systems (DBMS). It describes three types of database languages: data definition language (DDL) used to define and modify the database schema; data manipulation language (DML) used to insert, update, delete and retrieve data; and data control language (DCL) used to control access privileges. Examples are provided for common statements in each language type like CREATE, ALTER, DROP for DDL and INSERT, UPDATE, DELETE, SELECT for DML. Case sensitivity and data types are also briefly covered.
The document discusses stored procedures in databases. It defines stored procedures as procedures that are stored in a database with a name, parameter list, and SQL statements. The key points covered include:
- Stored procedures are created using the CREATE PROCEDURE statement and can contain SQL statements and control flow statements like IF/THEN.
- Parameters can be used to pass data into and out of stored procedures.
- Variables can be declared and used within stored procedures.
- Cursors allow stored procedures to iterate through result sets row by row to perform complex logic.
- Error handling and exceptions can be managed within stored procedures using DECLARE HANDLER.
Stored procedures offer benefits
This document provides an overview of the key clauses in a SQL SELECT statement:
1. The SELECT, FROM, WHERE, GROUP BY, HAVING, and ORDER BY clauses must be written in a specific order. The SELECT clause chooses the columns and FROM clause specifies the table.
2. The WHERE clause filters rows based on conditions and HAVING filters groups. GROUP BY divides rows into groups and ORDER BY sorts the results.
3. Examples demonstrate how each clause works, such as a SELECT statement that filters rows from a student table where the student ID equals 2.
This document provides an introduction to SQL and database systems. It begins with example tables to demonstrate SQL concepts. It then covers the objectives of SQL, including allowing users to create database structures, manipulate data, and perform queries. Various SQL concepts are introduced such as data types, comparison operators, logical operators, and arithmetic operators. The document also discusses SQL statements for schema and catalog definitions, data definition, data manipulation, and other operators. Example SQL queries are provided to illustrate concepts around selecting columns, rows, sorting, aggregation, grouping, and more.
SQL injection is a common web application security vulnerability that allows attackers to control an application's database by tricking the application into sending unexpected SQL commands to the database. It works by submitting malicious SQL code as input, which gets executed by the database since the application concatenates user input directly into SQL queries. The key to preventing SQL injection is using prepared statements with bound parameters instead of building SQL queries through string concatenation. This separates the SQL statement from any user-supplied input that could contain malicious code.
Need for PL/SQL,Benefits of Using PL/SQL,PL/SQL Block Types and Constructs,PL/SQL Block Structure,Operators and SQL Functions in PL/SQL,Variables,Nested Blocks.
PL/SQL is a procedural language extension for SQL and the Oracle relational database. It allows developers to perform transactions in an Oracle database, define and control cursors, handle exceptions, and provide a host language for SQL. PL/SQL code is organized into logical blocks with optional declaration, mandatory executable, and optional exception handling sections. It provides benefits like improved performance, portability, and integration with SQL.
PL/SQL is Oracle's procedural language extension to SQL that allows users to manipulate and process Oracle data. PL/SQL code can reside on both the client-side and server-side. When executed on the server-side, the entire PL/SQL block is passed to the Oracle server for processing. When on the client-side, only SQL statements are sent to the server for processing while the rest of the block runs on the client. PL/SQL blocks contain a declare, executable, and exception handling section and can be either named or anonymous. Named blocks can be stored procedures and functions while anonymous cannot be stored.
This document provides an introduction to PL/SQL, including:
- What PL/SQL is and advantages over SQL such as programming capabilities and error handling
- Generic structure of a PL/SQL block with declare, begin, exception sections
- PL/SQL execution environment and how SQL statements are passed to Oracle engine
- Data types in PL/SQL including numbers, characters, dates, collections and LOB types
- Control structures like conditional (IF/THEN) and iterative (LOOP) statements
PL/SQL is Oracle's procedural language extension to SQL that allows users to use SQL statements to manipulate Oracle data and use control flow statements to process the data. PL/SQL code can be executed on the Oracle server or Oracle client. The code is made up of a declare, executable, and exception handling section. Variables, constants, cursors and other objects are declared in the declare section. Code to manipulate the declared objects is written in the executable section. Exception handling code is written in the exception handling section.
PL/SQL is a programming language developed by Oracle Corporation to extend SQL and program the Oracle database. Key facts about PL/SQL include that it is portable, provides an interpreted programming environment, can be called from SQL*Plus or external programs, and has syntax based on Ada and Pascal. PL/SQL offers features like tight integration with SQL, error checking, data types, programming structures, and support for functions, procedures, object-oriented programming, and web applications.
What does PL_SQL stand for and what is the functioning of PL_SQL.docxshivanikaale214
PL/SQL, Oracle's procedural extension to SQL, facilitates the creation of modular, efficient, and error-resilient code for database-centric applications. Mastering PL/SQL unlocks lucrative career prospects in database management and programming, offering essential skills for navigating the dynamic landscape of data management.
This chapter on PL/SQL programming introduces PL/SQL language fundamentals and basics with brief knowledge about its evolution and advantages.Practitioners Guide contains examples on the PL/SQL concepts explained in the slides.
This document contains lecture material on Relational Database Management Systems (RDBMS) and PL/SQL prepared by D.GAYA, an Assistant Professor of Computer Science at Pondicherry University Community College. The document covers PL/SQL concepts such as blocks, variables, data manipulation using DML statements, triggers, procedures, functions, packages, and exception handling. It provides examples and explanations of PL/SQL blocks, variable declaration and assignment, data types, and manipulating data through insertion, updating, deletion, and selection using SQL statements within PL/SQL blocks. The document is intended to teach second year B.Voc students in the Software Development program about PL/SQL and RDBMS.
PL/SQL is a procedural language extension for SQL that allows for the processing of SQL and procedural language elements. It was developed by Oracle Corporation to enhance the capabilities of SQL. PL/SQL code is organized into blocks that contain a declarative section, executable section, and exception section. It is an embedded language executed by the Oracle database server and is used for developing stored procedures and triggers.
Oracle PL/SQL online training | PL/SQL online Trainingsuresh
PL/SQL is Oracle's procedural language extension to SQL that allows mixing of SQL statements and procedural logic like conditionals and loops. It uses SQL for data manipulation and its own control structures for processing. PL/SQL program units include anonymous blocks and stored procedures. Stored procedures are reusable blocks of code stored in the database under a name that can be executed. PL/SQL provides features like variables, control structures, exception handling, and modular programming with functions and procedures.
This document provides an introduction to PL/SQL and its benefits and uses. It discusses PL/SQL's integration of procedural constructs with SQL, its block structure for code organization, and its advantages like improved performance and modularity. It also describes different PL/SQL block types, programming environments like iSQL*Plus, and how to output messages from PL/SQL blocks. The overall purpose is to explain the fundamentals of PL/SQL to readers.
The document discusses Oracle, a relational database management system. It describes Oracle's universal server, workgroup server, and personal versions. It also outlines Oracle's product line, including SQL, SQL*Plus, PL/SQL, and tools for development, manufacturing, financial, and customer relationship management applications. Client-server architecture with Oracle is reviewed, including two-tier and three-tier approaches connected via SQL*Net networking software.
1. In a 200 words or less explain the differences between SQL and .docxSONU61709
1. In a 200 words or less explain the differences between SQL and PL/SQL? Why do we need SQL in a procedural language?
2. Respond to the following in 100 words—APA Format and Cite work
SA
SQL is a structured query language that is used to retrieve and manipulate data as well as create and modify objects in a database. There are some capabilities for logic in SQL statements such as case and decode statements, but it is very limited. PL/SQL is a procedural language that has many more logic options available such as if-else statements and for loops. However, PL/SQL isn’t very useful without SQL to retrieve and manipulate the data. For instance, you can use SQL to retrieve a value from a table and based on the value; use an if-else statement to choose to update a value in another table or not. PL/SQL also has a few other features that make it more efficient than just SQL alone. One being that PL/SQL transmits multiple SQL statements at one time in a block whereas SQL sends each statement separately thus saving bandwidth. Another is that PL/SQL that is stored in the database as a program unit is stored in executable form and is cached in memory making it more efficient to run (Casteel, 2013, pp. 3-4).
Reference:
Casteel, J. (2013). Oracle 11g: PL/SQL programming. Boston, MA: Course Technology, Cengage Learning.
---------------------------------------------------------------------------------------------------------------------
3. Respond to the following in 100 words—APA Format and Cite work
Structured Query Language (SQL) is used primarily to conduct various actions within a database. These actions are typically categorized as data manipulation (DML), data definition (DDL), querying, and transaction control. DML includes actions like insertion, update, deletion. DDL includes, alteration, creation, and dropping. Queries are performed via select statements, and transaction control can be conducted via commit and rollback statements (Casteel, 2013, p. 15).
PL/SQL is Oracle's procedural language extension of SQL. Procedural languages are used to design logic statements which control decision making and the flow of information which makes a system conduct tasks. By extending procedural language to SQL, programmers gain the ability to perform traditional programming logic alongside SQL statements. The textbook example points out the use of PL/SQL to validate a customer input by checking database details after a customer has conducted a certain action. Using PL/SQL can improve performance by packaging multiple statements, increase productivity through enhanced integration, increased portability, and better security (Casteel, 2013, p. 4).
Reference
Casteel, J. (2013). Oracle 11g: PL/SQL Programming (2nd ed.). Boston, MA: Course Technology.
1.
In a 2
00 words or less explain the
differences between SQL and PL/SQL? Why do we need SQL in
a procedural language?
2.
Respond
to the following
in 100 words
—
APA
Format and Cite
work
SA
SQ ...
This document provides notes on SQL (Structured Query Language) for placement preparation. It covers topics like what SQL and a database are, the differences between SQL and PL/SQL, SQL operators like BETWEEN, IN, and LIKE, clauses like WHERE and HAVING, SQL commands categorized into DDL, DQL, DML, DCL, and TCL. It also discusses normalization and denormalization in databases and nested queries in SQL. The notes are intended to help students prepare for job interviews by reviewing essential SQL concepts.
Oracle ADF Architecture TV - Design - Architecting for PLSQL IntegrationChris Muir
Slides from Oracle's ADF Architecture TV series covering the Design phase of ADF projects, considering integrating PLSQL into your ADF applications.
Like to know more? Check out:
- Subscribe to the YouTube channel - http://bit.ly/adftvsub
- Design Playlist - http://www.youtube.com/playlist?list=PLJz3HAsCPVaSemIjFk4lfokNynzp5Euet
- Read the episode index on the ADF Architecture Square - http://bit.ly/adfarchsquare
final Year Projects, Final Year Projects in Chennai, Software Projects, Embedded Projects, Microcontrollers Projects, DSP Projects, VLSI Projects, Matlab Projects, Java Projects, .NET Projects, IEEE Projects, IEEE 2009 Projects, IEEE 2009 Projects, Software, IEEE 2009 Projects, Embedded, Software IEEE 2009 Projects, Embedded IEEE 2009 Projects, Final Year Project Titles, Final Year Project Reports, Final Year Project Review, Robotics Projects, Mechanical Projects, Electrical Projects, Power Electronics Projects, Power System Projects, Model Projects, Java Projects, J2EE Projects, Engineering Projects, Student Projects, Engineering College Projects, MCA Projects, BE Projects, BTech Projects, ME Projects, MTech Projects, Wireless Networks Projects, Network Security Projects, Networking Projects, final year projects, ieee projects, student projects, college projects, ieee projects in chennai, java projects, software ieee projects, embedded ieee projects, "ieee2009projects", "final year projects", "ieee projects", "Engineering Projects", "Final Year Projects in Chennai", "Final year Projects at Chennai", Java Projects, ASP.NET Projects, VB.NET Projects, C# Projects, Visual C++ Projects, Matlab Projects, NS2 Projects, C Projects, Microcontroller Projects, ATMEL Projects, PIC Projects, ARM Projects, DSP Projects, VLSI Projects, FPGA Projects, CPLD Projects, Power Electronics Projects, Electrical Projects, Robotics Projects, Solor Projects, MEMS Projects, J2EE Projects, J2ME Projects, AJAX Projects, Structs Projects, EJB Projects, Real Time Projects, Live Projects, Student Projects, Engineering Projects, MCA Projects, MBA Projects, College Projects, BE Projects, BTech Projects, ME Projects, MTech Projects, M.Sc Projects, Final Year Java Projects, Final Year ASP.NET Projects, Final Year VB.NET Projects, Final Year C# Projects, Final Year Visual C++ Projects, Final Year Matlab Projects, Final Year NS2 Projects, Final Year C Projects, Final Year Microcontroller Projects, Final Year ATMEL Projects, Final Year PIC Projects, Final Year ARM Projects, Final Year DSP Projects, Final Year VLSI Projects, Final Year FPGA Projects, Final Year CPLD Projects, Final Year Power Electronics Projects, Final Year Electrical Projects, Final Year Robotics Projects, Final Year Solor Projects, Final Year MEMS Projects, Final Year J2EE Projects, Final Year J2ME Projects, Final Year AJAX Projects, Final Year Structs Projects, Final Year EJB Projects, Final Year Real Time Projects, Final Year Live Projects, Final Year Student Projects, Final Year Engineering Projects, Final Year MCA Projects, Final Year MBA Projects, Final Year College Projects, Final Year BE Projects, Final Year BTech Projects, Final Year ME Projects, Final Year MTech Projects, Final Year M.Sc Projects, IEEE Java Projects, ASP.NET Projects, VB.NET Projects, C# Projects, Visual C++ Projects, Matlab Projects, NS2 Projects, C Projects, Microcontroller Projects, ATMEL Projects, PIC Projects, ARM Projects, DSP Projects, VLSI Projects, FPGA Projects, CPLD Projects, Power Electronics Projects, Electrical Projects, Robotics Projects, Solor Projects, MEMS Projects, J2EE Projects, J2ME Projects, AJAX Projects, Structs Projects, EJB Projects, Real Time Projects, Live Projects, Student Projects, Engineering Projects, MCA Projects, MBA Projects, College Projects, BE Projects, BTech Projects, ME Projects, MTech Projects, M.Sc Projects, IEEE 2009 Java Projects, IEEE 2009 ASP.NET Projects, IEEE 2009 VB.NET Projects, IEEE 2009 C# Projects, IEEE 2009 Visual C++ Projects, IEEE 2009 Matlab Projects, IEEE 2009 NS2 Projects, IEEE 2009 C Projects, IEEE 2009 Microcontroller Projects, IEEE 2009 ATMEL Projects, IEEE 2009 PIC Projects, IEEE 2009 ARM Projects, IEEE 2009 DSP Projects, IEEE 2009 VLSI Projects, IEEE 2009 FPGA Projects, IEEE 2009 CPLD Projects, IEEE 2009 Power Electronics Projects, IEEE 2009 Electrical Projects, IEEE 2009 Robotics Projects, IEEE 2009 Solor Projects, IEEE 2009 MEMS Projects, IEEE 2009 J2EE P
This document summarizes an email service that can meet the email needs of companies without requiring an IT department, allows instant communication between employees through Cliq messaging groups, and connects and enables teams through a bundle of apps including email, documents, presentations, and chat on a single platform. It offers various plans including Lite with email, Standard with additional docs and office apps, and Professional with meeting, project management, and other collaboration tools.
C Pointers & File Handling covered various topics that are important w.r.t exam point of view and has basic concept of Pointers, Functions, Recursion, Structures, Union, Conditional Compilations, C Preprocessor, Stack, Queue and Linked List data structure plus various important theory based questions.
It has important MCQ's and programs that are asked in almost every company placement test repeatedly. It also has various different c programs like Fibonacci, Prime, Armstrong and other programs related to Strings.
It is very helpful in learning all the basics concepts of DBMS starting from Introduction: An Overview of Database Management System to Data Modeling using the Entity-Relationship Model, PL/SQL, Transaction Processing Concept, and Concurrency Control Techniques plus important numerals in exam point of view can be learned.
The document appears to be a scanned collection of pages from a book or manual. It contains images of many pages with text and diagrams but no clear overall narrative or topic. As it is a scan of pages from another source, it is difficult to provide an informative high-level summary in 3 sentences or less.
It consists of full operating system notes which cover Introduction, Processes, CPU Scheduling, Process Synchronization, Classical Problem in Concurrency, Deadlock, Memory Management, Virtual memory concepts, I/O Management and Disk Scheduling, File System.
It includes all notes of the Computer Network for CSE students and consists of Introduction Concepts, Medium Access sublayer, Data Link Layer, Network Layer, Transport Layer, Session Layer, Presentation Layer, Application Layer.
To learn important concept of Collection and its handling plus its advantages and different class & child class of Collection and their implementations. Important interview questions of the collection.
To learn about the basic concepts of Object Oriented Programming and Inheritance plus different Inheritance Models and interview questions will be covered.
Learn about the basic fundamentals of java and important for the different company's interview. Topics like JRE, JDK, Java Keywords, Primitive DataTypes, Types of Variables, Logical, Shift and Bitwise Operator working, Command Line Argument, Handling Arrays, Array Copy, and different programs and output based programs.
Important & Basics Notes for Unified Modeling Language, Object-Oriented Concepts, UML Building Blocks & its Component, Use Cases, State Transition Diagram Examples, Structural Diagrams like Class Diagram/ Object Diagram/ Component Diagram/ Deployment Diagram, Behavioural Diagrams like Use Case Diagram/ Sequence Diagram/ State Chart Diagram/ Collaboration Diagram/ Activity Diagrams with Examples, Models & its Types, Hospital Management System, Book Store class Diagram & Sequence Diagram.
Abstract Window Toolkit, Swings & its Hierarchy, Applets & its Life Cycle, Servlets & its Life Cycle, Steps to connect Java Application to Database, Servlet Application Working, Steps to create Servlet, HTTP Session & its Working, Remote Method Invocation, Steps to create RMI, Marshaling & Unmarshaling, Enterprise Java Beans, Java Beans & its Use,Elements of Java Beans,Bean Development Kit,Steps to Develop User-defined Java Beans,Web Services its Types and features,Restful Web Service, Java Cryptography & Security & its Services, Architecture of Cryptography.
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.
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.
Null Bangalore | Pentesters Approach to AWS IAMDivyanshu
#Abstract:
- Learn more about the real-world methods for auditing AWS IAM (Identity and Access Management) as a pentester. So let us proceed with a brief discussion of IAM as well as some typical misconfigurations and their potential exploits in order to reinforce the understanding of IAM security best practices.
- Gain actionable insights into AWS IAM policies and roles, using hands on approach.
#Prerequisites:
- Basic understanding of AWS services and architecture
- Familiarity with cloud security concepts
- Experience using the AWS Management Console or AWS CLI.
- For hands on lab create account on [killercoda.com](https://killercoda.com/cloudsecurity-scenario/)
# Scenario Covered:
- Basics of IAM in AWS
- Implementing IAM Policies with Least Privilege to Manage S3 Bucket
- Objective: Create an S3 bucket with least privilege IAM policy and validate access.
- Steps:
- Create S3 bucket.
- Attach least privilege policy to IAM user.
- Validate access.
- Exploiting IAM PassRole Misconfiguration
-Allows a user to pass a specific IAM role to an AWS service (ec2), typically used for service access delegation. Then exploit PassRole Misconfiguration granting unauthorized access to sensitive resources.
- Objective: Demonstrate how a PassRole misconfiguration can grant unauthorized access.
- Steps:
- Allow user to pass IAM role to EC2.
- Exploit misconfiguration for unauthorized access.
- Access sensitive resources.
- Exploiting IAM AssumeRole Misconfiguration with Overly Permissive Role
- An overly permissive IAM role configuration can lead to privilege escalation by creating a role with administrative privileges and allow a user to assume this role.
- Objective: Show how overly permissive IAM roles can lead to privilege escalation.
- Steps:
- Create role with administrative privileges.
- Allow user to assume the role.
- Perform administrative actions.
- Differentiation between PassRole vs AssumeRole
Try at [killercoda.com](https://killercoda.com/cloudsecurity-scenario/)
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...IJECEIAES
Climate change's impact on the planet forced the United Nations and governments to promote green energies and electric transportation. The deployments of photovoltaic (PV) and electric vehicle (EV) systems gained stronger momentum due to their numerous advantages over fossil fuel types. The advantages go beyond sustainability to reach financial support and stability. The work in this paper introduces the hybrid system between PV and EV to support industrial and commercial plants. This paper covers the theoretical framework of the proposed hybrid system including the required equation to complete the cost analysis when PV and EV are present. In addition, the proposed design diagram which sets the priorities and requirements of the system is presented. The proposed approach allows setup to advance their power stability, especially during power outages. The presented information supports researchers and plant owners to complete the necessary analysis while promoting the deployment of clean energy. The result of a case study that represents a dairy milk farmer supports the theoretical works and highlights its advanced benefits to existing plants. The short return on investment of the proposed approach supports the paper's novelty approach for the sustainable electrical system. In addition, the proposed system allows for an isolated power setup without the need for a transmission line which enhances the safety of the electrical network
Embedded machine learning-based road conditions and driving behavior monitoringIJECEIAES
Car accident rates have increased in recent years, resulting in losses in human lives, properties, and other financial costs. An embedded machine learning-based system is developed to address this critical issue. The system can monitor road conditions, detect driving patterns, and identify aggressive driving behaviors. The system is based on neural networks trained on a comprehensive dataset of driving events, driving styles, and road conditions. The system effectively detects potential risks and helps mitigate the frequency and impact of accidents. The primary goal is to ensure the safety of drivers and vehicles. Collecting data involved gathering information on three key road events: normal street and normal drive, speed bumps, circular yellow speed bumps, and three aggressive driving actions: sudden start, sudden stop, and sudden entry. The gathered data is processed and analyzed using a machine learning system designed for limited power and memory devices. The developed system resulted in 91.9% accuracy, 93.6% precision, and 92% recall. The achieved inference time on an Arduino Nano 33 BLE Sense with a 32-bit CPU running at 64 MHz is 34 ms and requires 2.6 kB peak RAM and 139.9 kB program flash memory, making it suitable for resource-constrained embedded systems.
1. 12/10/2016 OneNote Online
1/11
PL/SQL
It stands for Procedural Language extension of SQL.
It is a combination of SQL along with the procedural features of programming languages.
The PL/SQL Engine :
• Oracle uses a PL/SQL engine to processes the PL/SQL statements.
• PL/SQL code can be stored in the client system (clientside) or in the database (serverside).
Advantages of PL/SQL ‐>
PL/SQL is a completely portable, high‐performance transac�on processing language that offers
the following advantages:
• Block Structures PL SQL consists of blocks of code, which can be nested within each other.
Each block forms a unit of a task or a logical module.
PL/SQL Blocks can be stored in the database and reused.
• Procedural Language Capability PL SQL consists of procedural language constructs such as
conditional statements (if else statements) and loops like (FOR loops).
• Better Performance PL SQL engine processes multiple SQL statements simultaneously as a single
block, thereby reducing network traffic.
• Error Handling PL/SQL handles errors or exceptions effectively during the execution of a PL/SQL
program.
Once an exception is caught, specific actions can be taken depending upon the type of
the exception or it can be displayed to the user with a message.
OTHER ADVANTAGES ‐
1. Support for OOP's.
2. Higher produc�vity.
3. Full portability.
4. Tight integra�on with Oracle.
5. Security.
Block Structure ‐>
• PL/SQL is a block‐structured language i.e., (procedures, func�ons, and anonymous blocks ).
• PL/SQL supports the divide‐and‐conquer approach to problem solving called stepwise refinement.
A PL/SQL block has three parts :
1. Declara�ve part ‐ Items will be declared.
2. Executable part ‐ Once declared, Manipula�on of items can only be done in executable part.
3. Excep�on‐Handling part ‐ PL/SQL makes it easy to detect and process predefined and
user‐ defined error condi�ons or Warnings called excep�ons.
‐ When an error (excep�on raised ) occurs normal execu�on stops and
control transfers to the excep�on‐handling part of PL/SQL block or subprogram.
To handle raised excep�ons, you write separate rou�nes called excep�on handlers.
• Nes�ng of sub‐blocks can be done in executable and excep�on handling part of PL/SQL program
BUT not in Declara�ve part.
• Calling of local subprogram can be done only from block in which they are defined.
PL/SQL
Monday, November 14, 2016 10:01 AM
2. 2/11
PL/SQL Placeholders
• Placeholders are temporary storage area.
• Placeholders can be any of Variables, Constants and Records.
• Oracle defines placeholders to store data temporarily, which are used to manipulate data during the execution of a PL SQL
block.
• Datatypes used to define placeholders are >
Number (n , m) , Char (n) , Varchar2 (n) , Date , Long , Long raw, Raw, Blob, Clob, Nclob, Bfile .
PLS_INTEGER Datatype
• Used to declare an integer variable
• It is the most efficient numeric type.
• PLS_INTEGER values require less storage than INTEGER or NUMBER values
• represented internally as 22‐byte Oracle numbers.
• PLS_INTEGER opera�ons use machine arithme�c, so they are faster than BINARY_INTEGER, INTEGER, or NUMBER
COMMIT
The COMMIT statement ends the current transac�on and makes permanent any changes made during that transac�on. Un�l you commit the changes, other
users cannot access the changed data; they see the data as it was before you made the changes.
ROLLBACK
• The ROLLBACK statement ends the current transac�on and undoes any changes made during that transac�on.
• Rolling back is useful for two reasons.
First, if you make a mistake like dele�ng the wrong row from a table, a rollback restores the original data.
Second, if you start a transac�on that you cannot finish because an excep�on is raised or a SQL statement fails
• a rollback lets you return to the star�ng point to take correc�ve ac�on and perhaps try again
Variables and Constants ‐>
• Forward references are not allowed. So, you must declare a constant or variable before referencing it in other statements,
including other declara�ve statements.
Declaring Variables ‐
• Variables can have any SQL datatype, such as CHAR, DATE, NUMBER or any PL/SQL datatype, such as BOOLEAN or
BINARY_INTEGER.
• Syntax 1:
variable_name datatype();
• Syntax 2: [Assigning value to var ]
variable_name:= value; [Assignment operator (:=) ‐> a colon followed by an equal sign. ]
REM: Place the variable to the le燝� of the operator and an expression to the right.
• Declaration of two variables, one of which is a not null.
Syntax :
DECLARE
salary number(4);
dept varchar2(10) NOT NULL := “HR Dept”;
• Another way to assign values to a variable is to select or fetch database values into it.
Syntax :
SELECT column_name INTO variable_name
FROM table_name [WHERE condition];
Eg. SELECT sal * 0.10 INTO bonus
Variable declaration
Program Execution
Exception handling
END;
DECLARE
How a Sample PL/SQL Block Looks•
FROM emp WHERE empno = emp_id;
3. 12/10/2016 OneNote Online
3/11
Scope of PL/SQL Variables
The variable which is accessible to an outer Block is also accessible to all nested inner
Blocks. The variables declared in the inner blocks are not accessible to outer blocks.
Based on their declaration we can classify variables into two types.
• Local variables These are declared in a inner block and cannot be referenced by outside Blocks.
• Global variables These are declared in a outer block and can be referenced by its itself and by its inner blocks.
Declaring Constants ‐
The word CONSTANT is a reserved word and ensures that the value does not change.
Assign a value in the execution section will produce an error ,therefore do assigning during declaring.
Syntax :
const_name CONSTANT datatype := VALUE;
Eg. credit_limit CONSTANT REAL := 5000.00; { Here, Const_name ‐ credit_limit}
NOTE: You can use also %type to declare variables and constants.
NOTE: The backward slash '/' in end of the program indicates to execute the PL/SQL Block.
Control Structures ‐>
{ IF‐THEN‐ELSE, FOR‐LOOP , WHILE‐LOOP , EXIT‐WHEN, and GOTO. }
1. Condi�onal Control ‐ [ IF‐THEN‐ELSE ]
IF clause checks a condi�on;
THEN clause defines what to do if condi�on is true;
ELSE clause defines what to do if the condi�on is false or null.
Syntax :
IF condition THEN
statement 1;
ELSE
statement 2;
END IF;
2. Itera�ve Control ‐ [ FOR‐LOOP , WHILE‐LOOP , EXIT‐WHEN]
‐ LOOP statements let you execute a sequence of statements mul�ple �mes
#. A FOR LOOP is used to execute a set of statements for a predetermined number of times.
Iteration occurs between the start and end integer values given.
The counter is always incremented by 1.
The loop exits when the counter reaches the value of the end integer.
=> Syntax :
FOR counter IN value(1)...value(last)
LOOP statements;
END LOOP;
** Important steps to follow when execu�ng a FOR loop:
1) The counter variable is implicitly declared in the declara�on sec�on, so it's not necessary to declare
it explicitly.
2) The counter variable is incremented by 1 and does not need to be incremented explicitly.
3) EXIT WHEN statement and EXIT statements can be used in FOR loops but it's not done o燝�enly.
#. The WHILE‐LOOP statement associates a condi�on with a sequence of statements.
Before each itera�on of the loop, the condi�on is evaluated.
If the condi�on is true, the sequence of statements is executed, then control resumes at the top
of the loop.
If the condi�on is false or null, the loop is bypassed and control passes to the next statement
=> Syntax :
WHILE <condition>
5. 5/11
1) You do not need to explicitly declare variables for all the columns in a table.
2. If you alter the column specification in the database table, you do not need to update the code.
The disadvantage of declaring the record as a ROWTYPE is:
1) When u create a record as a ROWTYPE, fields will be created for all the columns in the table and
memory will be used to create the datatype for all the fields. So use ROWTYPE only when you are
using all the columns of the table in the program.
Assign values to and from a Record >
Syntax Usage
record_name.col_name := value; To directly assign a value to a specific column of a record.
record_name.column_name := value; To directly assign a value to a specific column of a record, if the
record is declared using %ROWTYPE.
SELECT col1, col2 INTO record_name.col_name1,
record_name.col_name2 FROM table_name [WHERE clause];
To assign values to each field of a record from the database table.
SELECT * INTO record_name FROM table_name [WHERE clause]; To assign a value to all fields in the record from a database table.
variable_name := record_name.col_name; To get a value from a record column and assigning it to a variable.
Packages ‐
A package is a collec�on of PL/SQL objects , grouped together under one package name.
Packages provide a means , to collect related procedures, func�ons, cursors, declara�ons, types, and variables into a single, named
database object that is more flexible than the related database objects.
Packages usually have two parts: Specifica�on and Body.
‐> The specifica�on is the interface to your applica�ons which declares the types, constants, variables,
excep�ons, cursors, and subprograms available for use.
‐> The body defines cursors and subprograms and so implements the specifica�on.
• Syntax for a package is:
CREATE [OR REPLACE PACKAGE[ <package name> {AS|IS}
<variable declara�ons>;
<cursor declara�ons>;
<procedure and func�on declara�ons>;
END <package name>;
Subprograms ‐
PL/SQL has two types of subprograms called procedures and func�ons, which can take parameters and be
invoked (called).
Benefits/Advantages of Subprograms ‐
1. Improved Data Security – controls access to database objects while enabling non‐privileged
applica�on users to access just the data needed.
2. Improved Data Integrity – Related ac�ons on database tables are performed as a unit enforcing
transac�on integrity – all updates are executed or none are executed.
3. Improved App Performance – Avoids reparsing obj used by mul�ple users through shared use of SQL by
Oracle – reduces number of database calls thus reducing network traffic.
4. Improved Maintenance – procedures and func�ons that perform common tasks can be modified
without having to directly work on mul�ple apps – eliminates duplicate tes�ng.
5. Provide Extensibility.
6. Provide Modularity. { Break program into manageable , well defined logic modules }
7. Subprograms promote Reusability and Maintainability.
The advantages of declaring the record as a ROWTYPE are:
8. Subprograms aid Abstractionon. { Mental separation from particulars}
6. 6/11
2. Func�ons
PROCEDURES FUNCTIONS
1. Coded to perform a specific ac�on. 1. Coded to perform some type of
calcula�ons.
2. A Procedure has two parts:
The Specifica�on and The Body.
The procedure spec begins with the keyword
PROCEDURE and ends with the procedure
NAME or Parameter list
2. A Func�on has two parts:
The Specifica�on and The Body.
The Func�on spec begins with the keyword
FUNCTION and ends with the RETURN clause.
3. [OR REPLACE] op�on allows modifying an
exis�ng procedure.
3. [OR REPLACE] op�on allows modifying an
exis�ng func�on
4. Procedure are called with PL/SQL
statement.
4. Func�ons are called as part of an
expression.
5. Procedures are named PL/SQL blocks.
6. Created/Owned by par�cular schema.
SIMILIARITIES IN PROCEDURES & FUNCTIONS ‐>
• Both procedures and func�ons can take mul�ple parameters.
• Can be programmed to perform a data processing task.
• Can be stored as individual database objects.
• Are named PL/SQL blocks, and both can be coded to take parameters to generalize the code.
• Can be wri눚�en with declara�ve, executable, and excep�on sec�ons.
PASSING PARAMETER TO PROCEDURES AND FUNCTIONS ‐>
1. IN – Pass value to a procedure as a read‐only value that cannot be changed within the procedure – this is the default mode.
2. OUT – this parameter type is write‐only, and can only appear on the le燝� side of an assignment statement in the procedure – it
is assigned an ini�al value of NULL.
3. IN OUT – this parameter type combines both IN and OUT; Pass & get value from stored procedures.
CURSORS ‐>
• A cursor is a temporary work area created in the system memory when a SQL statement is executed.
• A cursor contains information on a select statement and the rows of data accessed by it.
• This temporary work area is used to store the data retrieved from the database, and manipulate this data.
• A cursor can hold more than one row, but can process only one row at a time.
• The set of rows the cursor holds is called the active set.
Cursor Variables ‐
Like a cursor, a cursor variable points to the current row in the result set of a mul�‐row query.
1. Cursor var can be opened for any typecompatible query.
2. It is not tied to a specific query.
3. Cursor var are true PL/SQL variables, in which we can pass or assign new values to subprogram of DB.
4. Provide convenient way of data retrieval
1. Procedures and
TYPES OF SUBPROGRAMS ‐>
DIFFERENCES B/W PROCEDURES & FUNCTIONS ‐>
5. It's more flexible.
7. OneNote Online
7/11
TYPES OF CURSOR ‐>
1. Implicit Cursor ‐ PL/SQL implicitly declares a cursor for all SQL data manipula�on statements,
including queries that return only one row.
• These are created by default when DML statements like, INSERT, UPDATE, and DELETE statements are executed.
• They are also created when a SELECT statement that returns just one row is executed.
APPLICATION OF IMPLICIT ‐>
When you execute DML statements like DELETE, INSERT, UPDATE and SELECT
statements, implicit statements are created to process these statements.
Implicit Cursor Attributes to check status of the DML statement
Attributes Return values Example
%FOUND TRUE, if fetch statement returns at least one row. Cursor_name%FOUND
FALSE, if fetch statement doesn’t return a row.
%NOTFOUND TRUE, , if fetch statement doesn’t return a row. Cursor_name%NOTFOUND
FALSE, if fetch statement returns at least one row.
%ROWCOUNT The number of rows affected by INSERT,DELETE, or
UPDTAE statement, or returned by select into
statement.
Cursor_name%ROWCOUNT
If no row is returned / affected, the PL/SQL statement
returns an error.
%ISOPEN TRUE, if the cursor is already open in the program Cursor_name%ISNAME
FALSE, if the cursor is not opened in the program.
2. Explicit Cursor ‐ For queries that return more than one row, you can explicitly declare a cursor to
process the rows individually.
• They must be created when you are executing a SELECT statement that returns more than one row.
• Even though the cursor stores multiple records, only one record can be processed at a time, which is called as current row.
• When you fetch a row the current row position moves to next row.
• Both implicit and explicit cursors have the same functionality, but they differ in the way they accessed.
APPLICATION OF EXPLICIT ‐>
▪ An explicit cursor is defined in the declaration section of the PL/SQL Block.
▪ It is created on a SELECT Statement which returns more than one row.
▪ We can provide a suitable name for the cursor.
Syntax for Crea�ng a Cursor :
CURSOR cursor_name IS select_statement;
// select_statement – A select query which returns multiple rows.
Explicit Cursor Attributes to check status of the DML statement
Attributes Return Value Example
%FOUND The return value is TRUE, if the DML statements like INSERT, DELETE and
UPDATE affect at least one row and if SELECT ….INTO statement return at least
one row.
SQL%FOUND
12/10/2016
8. 12/10/2016 OneNote Online
8/11
The return value is FALSE, if DML statements like INSERT, DELETE and
UPDATE do not affect row and if SELECT….INTO statement do not return a row.
%NOTFOUND The return value is FALSE, if DML statements like INSERT, DELETE and
UPDATE at least one row and if SELECT ….INTO statement return at least one
row.
SQL%NOTFOUND
The return value is TRUE, if a DML statement like INSERT, DELETE and
UPDATE do not affect even one row and if SELECT ….INTO statement does not
return a row.
%ROWCOUNT Return the number of rows affected by the DML operations INSERT, DELETE,
UPDATE, SELECT
SQL%ROWCOUNT
How to use Explicit Cursor?
There are four steps in using an Explicit Cursor.
• DECLARE the cursor in the declara�on sec�on.
• OPEN the cursor in the Execu�on Sec�on. [ OPEN cursor_name;]
• FETCH the record in cursor one at a �me in the Execu�on Sec�on.
FETCH cursor_name INTO record_name;
'OR'
FETCH cursor_name INTO variable_list;
• CLOSE the cursor in the Execu�on Sec�on before you end the PL/SQL Block.
[ CLOSE cursor_name;]
NOTE Last 3 underlined steps of above Q is Ans of how to access Explicit cursor with syntax.
General Form of using an explicit cursor is:
DECLARE
variables;
records;
create a cursor;
BEGIN
OPEN cursor;
FETCH cursor;
process the records;
CLOSE cursor;
END;
Code become simplified by using FOR loop instead of the OPEN, FETCH, and CLOSE statements
Points to remember while fetching a row:
• We can fetch the rows in a cursor to a PL/SQL Record or a list of variables created in the PL/SQL Block.
• If you are fetching a cursor to a PL/SQL Record, the record should have the same structure as the cursor.
• If you are fetching a cursor to a list of variables, the variables should be listed in the same order in the fetch statement as the
columns are present in the cursor.
What are Explicit Cursor A�ributes?
Oracle provides some attributes known as Explicit Cursor Attributes to control the data processing while using cursors. We
use these attributes to avoid errors while accessing cursors through OPEN, FETCH and CLOSE Statements.
When does an error occur while accessing an explicit cursor?
a) When we try to open a cursor which is not closed in the previous operation.
b) When we try to fetch a cursor after the last operation.
Result set ‐ The set of rows returned by a mul�‐row query is called the result set.
‐ Mul�‐row query processing is somewhat like file processing.
‐ Cursor marks the current posi�on in a result set.
9. 12/10/2016 OneNote Online
9/11
Triggers ‐>
A database trigger is a stored subprogram associated with a table.
• A trigger is a PL/SQL block structure is fired (executed) , when a DML statements like Insert, Delete, Update is executed
on a database table.
• A trigger is triggered automatically when an associated DML statement is executed.
• By default, triggers are enabled.
• A disabled trigger does not execute the trigger body even if the triggering statement is issued.
• SYNTAX to Enable & disable triggers :
ALTER TRIGGER trigger_name ENABLE;
ALTER TABLE table_name ENABLE ALL TRIGGERS; // Enable all triggers associated with a table.
ALTER TRIGGER trigger_name DISABLE;
• The WHEN clause only applies to ROW triggers.
Database triggers can be used to perform any of the following tasks:
1. Audit data modification.
2. Log events transparently.
3. Enforce complex business rules.
4. Derive column values automatically.
5. Implement complex security authorizations.
6. Maintain replicate tables.
Types of PL/SQL Triggers
1) Row level trigger An event is triggered for each row updated, inserted or deleted.
2) Statement level trigger An event is triggered for each sql statement executed.
3) Instead of Trigger ‐
Syntax for Creating a Trigger >
CREATE [OR REPLACE ] TRIGGER trigger_name
{BEFORE | AFTER | INSTEAD OF }
{INSERT [OR] | UPDATE [OR] | DELETE}
[OF col_name] ON table_name
[REFERENCING OLD AS o NEW AS n]
[FOR EACH ROW]
WHEN (condition)
BEGIN
sql statements
END;
• CREATE [OR REPLACE ] TRIGGER Creates a trigger with the given name or overwrites an existing
trigger with the same name.
• {BEFORE | AFTER | INSTEAD OF } Indicates at what time should the trigger get fired.
i.e., For Eg. Before or After updating a table.
▪ INSTEAD OF is used to create a trigger on a view.
▪ Before and After cannot be used to create a trigger on view.
• {INSERT [OR] | UPDATE [OR] | DELETE} Determines the triggering event.
More than one triggering events can be used together separated by OR keyword.
The trigger gets fired at all the specified triggering event.
• [OF col_name] This clause is used with update triggers. This clause is used when you want to trigger an
event only when a specific column is updated.
• CREATE [OR REPLACE ] TRIGGER This clause creates a trigger with the given name or overwrites an
existing trigger with the same name.
• [ON table_name] This clause identifies the name of the table or view to which the trigger is associated.
10. 12/10/2016 OneNote Online
10/11
• [REFERENCING OLD AS o NEW AS n] This clause is used to reference the old and new values of the
data being changed.
▪ By default, you reference the values as :old.column_name or :new.column_name.
▪ The reference names can also be changed from old (or new) to any other userdefined name.
▪ You can not reference old values when inserting a record, or new values when deleting a record, because they don't exist.
• [FOR EACH ROW] This clause is used to determine whether a trigger must fire when each row gets
affected ( i.e. a Row Level Trigger) or just once when the entire sql statement is executed (i.e. statement
level Trigger).
• WHEN (condition) This clause is valid only for row level triggers. The trigger is fired only for rows that
satisfy the condition specified.
1) BEFORE statement trigger fires first.
2) Next BEFORE row level trigger fires, once for each row affected.
3) Then AFTER row level trigger fires once for each affected row. This events will alternates between
BEFORE and AFTER row level triggers.
4) Finally the AFTER statement level trigger fires.
How To know Information about Triggers.
We can use the data dictionary view 'USER_TRIGGERS' to obtain information about any trigger.
CYCLIC CASCADING in a TRIGGER >
This is an undesirable situation where more than one trigger enter into an
infinite loop. while creating a trigger we should ensure the such a situation does not exist.
• The below example shows how Trigger's can enter into cyclic cascading.
Let's consider we have two tables 'abc' and 'xyz'. Two triggers are created.
1) The INSERT Trigger, triggerA on table 'abc' issues an UPDATE on table 'xyz'.
2) The UPDATE Trigger, triggerB on table 'xyz' issues an INSERT on table 'abc'.
In such a situa�on, when there is a row inserted in table 'abc', trigger A fires and will update table 'xyz'.
When the table 'xyz' is updated, triggerB fires and will insert a row in table 'abc'.
This cyclic situa�on con�nues and will enter into a infinite loop, which will crash the database
Trigger Limita�ons ‐>
1. Triggers cannot contain the COMMIT, ROLLBACK, and SAVEPOINT statements.
2. Trigger body – cannot exceed 32K in size.
3. No limit on the number of triggers defined for a DML statement for a table. In fact, you can define two triggers of the same
type for a table. When this occurs, the triggers of the same type fire sequen�ally.
Facts About Triggers ‐>
Triggers:
• are named PL/SQL blocks with declara�ve, executable, and excep�on handling sec�ons.
• are stand‐alone database objects – they are not stored as part of a package and cannot be local to a block.
• do not accept arguments.
Excep�on Handling ‐>
PL/SQL provides a feature to handle the Excep�ons which occur in a PL/SQL Block known as excep�on Handling.
Using Excep�on Handling we can test the code and avoid it from exi�ng abruptly.
The following hierarchy is followed when a trigger is fired.
PL/SQL Trigger Execution Hierarchy