The document discusses cursors in Oracle databases. It defines cursors as temporary work areas for processing query results row by row. There are two main types of cursors - implicit and explicit. Explicit cursors provide more control and involve declaring, opening, fetching from, and closing the cursor. Examples demonstrate using explicit cursors to retrieve and process multiple rows in a PL/SQL block. The document also covers cursor attributes, cursor for loops, parameterized cursors, and comparisons of implicit and explicit cursors.
The document discusses exception handling in PL/SQL. It defines exceptions as abnormal conditions that can occur during program execution. There are two types of exceptions: system-defined exceptions which are predefined by Oracle and user-defined exceptions which are declared by the user. The document provides examples of how to handle different system-defined exceptions like NO_DATA_FOUND, INVALID_CURSOR, CURSOR_ALREADY_OPENED, INVALID_NUMBER, and ZERO_DIVIDE. It also demonstrates how to declare and raise user-defined exceptions. The RAISE_APPLICATION_ERROR technique to specify custom error numbers and messages without an exception block is also covered.
The document provides an overview of exceptions in Java. It defines errors and exceptions, describes different types of exceptions including checked and unchecked exceptions, and explains key exception handling keywords like try, catch, throw, throws, and finally. The document aims to help programmers better understand exceptions and how to properly handle errors in their Java code.
The document discusses control structures in C programming, including conditional statements and loops.
It describes the if statement and if-else statement, which allow conditional execution of code based on boolean expressions. It also covers the switch statement for selecting between multiple code blocks based on an integral expression.
The document also discusses three loop structures in C - while, for, and do-while loops. The while and for loops repeat code while/for a given condition is true. The do-while loop executes code once before checking the condition. Increment/decrement operators are commonly used to update loop counters in for loops.
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.
This document discusses exception handling in Java. It covers the key concepts of exceptions and errors, stack traces, checked and unchecked exceptions, try-catch-finally blocks, try with resources, multiple exceptions in a single catch, and advantages of exception handling like maintaining normal program flow. It also discusses custom exceptions by subclassing the Exception class.
This document discusses various control flow statements in Java including branching statements, looping statements, and jump statements. It provides examples of if, if-else, if-else-if statements, switch statements, for loops, while loops, do-while loops, break, continue, and return statements. Key points include:
- Branching statements like if, if-else, if-else-if are used to control program flow based on boolean conditions. Switch statements provide an alternative for multiple if-else statements.
- Looping statements like for, while, do-while repeat a block of code while/until a condition is met.
- Jump statements like break and continue control flow within loops, while
The document discusses cursors in Oracle databases. It defines cursors as temporary work areas for processing query results row by row. There are two main types of cursors - implicit and explicit. Explicit cursors provide more control and involve declaring, opening, fetching from, and closing the cursor. Examples demonstrate using explicit cursors to retrieve and process multiple rows in a PL/SQL block. The document also covers cursor attributes, cursor for loops, parameterized cursors, and comparisons of implicit and explicit cursors.
The document discusses exception handling in PL/SQL. It defines exceptions as abnormal conditions that can occur during program execution. There are two types of exceptions: system-defined exceptions which are predefined by Oracle and user-defined exceptions which are declared by the user. The document provides examples of how to handle different system-defined exceptions like NO_DATA_FOUND, INVALID_CURSOR, CURSOR_ALREADY_OPENED, INVALID_NUMBER, and ZERO_DIVIDE. It also demonstrates how to declare and raise user-defined exceptions. The RAISE_APPLICATION_ERROR technique to specify custom error numbers and messages without an exception block is also covered.
The document provides an overview of exceptions in Java. It defines errors and exceptions, describes different types of exceptions including checked and unchecked exceptions, and explains key exception handling keywords like try, catch, throw, throws, and finally. The document aims to help programmers better understand exceptions and how to properly handle errors in their Java code.
The document discusses control structures in C programming, including conditional statements and loops.
It describes the if statement and if-else statement, which allow conditional execution of code based on boolean expressions. It also covers the switch statement for selecting between multiple code blocks based on an integral expression.
The document also discusses three loop structures in C - while, for, and do-while loops. The while and for loops repeat code while/for a given condition is true. The do-while loop executes code once before checking the condition. Increment/decrement operators are commonly used to update loop counters in for loops.
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.
This document discusses exception handling in Java. It covers the key concepts of exceptions and errors, stack traces, checked and unchecked exceptions, try-catch-finally blocks, try with resources, multiple exceptions in a single catch, and advantages of exception handling like maintaining normal program flow. It also discusses custom exceptions by subclassing the Exception class.
This document discusses various control flow statements in Java including branching statements, looping statements, and jump statements. It provides examples of if, if-else, if-else-if statements, switch statements, for loops, while loops, do-while loops, break, continue, and return statements. Key points include:
- Branching statements like if, if-else, if-else-if are used to control program flow based on boolean conditions. Switch statements provide an alternative for multiple if-else statements.
- Looping statements like for, while, do-while repeat a block of code while/until a condition is met.
- Jump statements like break and continue control flow within loops, while
This document discusses exception handling in C++ and Java. It defines what exceptions are and explains that exception handling separates error handling code from normal code to make programs more readable and robust. It covers try/catch blocks, throwing and catching exceptions, and exception hierarchies. Finally, it provides an example of implementing exception handling in a C++ program to handle divide-by-zero errors.
PACKAGES, Package Specification and Scope, Create Package Syntax, Declaring Procedures and Functions within a Package, Package Body, Create Package Body Syntax,Example –Package, Example– Package Body, Example – Calling Package Procedure, mResults of Calling Package Procedure, Cursors in Packages , cursor Example – Package Body, Example – Use Cursor Variable
The document discusses exception handling in programming. It defines different types of errors like syntax errors, semantic errors, and logical errors. Runtime errors can occur due to issues like division by zero. Exception handling involves finding and throwing exceptions using try, catch, and throw keywords. The catch block handles the exception. Common Java exceptions include NullPointerException, FileNotFoundException, and ArrayIndexOutOfBoundsException.
The document discusses pointers in C++. It begins with basic introductions about pointers, dynamic memory allocation, and memory leaks. It then covers declaring pointer variables, initializing pointers, and assigning the address of an existing variable to a pointer. The document demonstrates allocating memory dynamically using new and deleting memory using delete. It provides an example of printing the value at a pointer's address, defining a null pointer, and explains that reassigning a pointer without deleting can cause memory leaks.
Dynamic memory allocation allows programs to request memory from the operating system at runtime. This memory is allocated on the heap. Functions like malloc(), calloc(), and realloc() are used to allocate and reallocate dynamic memory, while free() releases it. Malloc allocates a single block of uninitialized memory. Calloc allocates multiple blocks of initialized (zeroed) memory. Realloc changes the size of previously allocated memory. Proper use of these functions avoids memory leaks.
Cursors in PL/SQL allow programmers to control context areas that contain information about SQL statements. There are two types of cursors: implicit cursors that are automatically created for SQL statements, and explicit cursors that are programmer-defined. Explicit cursors must be declared, opened to allocate memory, have rows fetched from them one by one, and then closed to release memory. Cursors point to context areas containing information like the number of rows processed by a SQL statement.
The document discusses exception handling in C++. It defines exceptions as conditions that occur during execution and prevent normal program continuation. Exception handling involves trying blocks of code that may throw exceptions, throwing exceptions when errors occur, and catching exceptions in handler blocks to deal with the errors. The key aspects of exception handling are try blocks for code that can throw, throw statements to indicate exceptions, and catch blocks that match exception types to handle them.
This document discusses various control structures and loops in Oracle including simple loops, while loops, for loops, nested loops, and selective statements like if, if/else, if/elsif/else, and case. Loops allow iterating through a block of code until a condition is met. Control structures alter program flow. Nested loops allow looping within other loops. Selective statements perform actions conditionally based on evaluated conditions.
This document discusses exception handling in Java. It defines exceptions as abnormal conditions that disrupt normal program flow. Exception handling allows programs to gracefully handle runtime errors. The key aspects covered include the exception hierarchy, try-catch-finally syntax, checked and unchecked exceptions, and creating user-defined exceptions.
This document assigns a group project on data types in C++ to seven students. It discusses the three main data types in C++ - character, integer, and float. Character data can store single characters, integer data stores whole numbers, and float data stores numeric values with decimals. It also covers variable declaration and initialization in C++, noting that variables must be declared before use and can be initialized with a value upon declaration. The document assigns different aspects of the data types topic to the seven students listed at the top for further explanation in the project.
There are three main types of control structures in computer programming: sequential logic, selection logic, and iteration logic. Sequential logic executes code line-by-line. Selection logic (e.g. if/else statements) allows executing code conditionally. Iteration logic (e.g. for loops) repeats code execution in loops. The document provides examples of if/else, nested if, switch statements, and the conditional operator for implementing various control structures in C programming.
1. The document discusses different types of exceptions in PL/SQL including predefined/system-defined exceptions and user-defined exceptions.
2. Some examples of common predefined exceptions are zero_divide, value_error, and no_data_found. These are defined by Oracle and have predefined error codes and messages.
3. User-defined exceptions are declared explicitly and can be raised using the RAISE statement. They allow developers to build custom exceptions.
The document discusses exception handling in C++. It defines an exception as an error that occurs during runtime. C++ includes a built-in exception handling mechanism using try, catch, and throw keywords. Code that can generate exceptions is placed in a try block. If an exception occurs, it is thrown using throw and caught using catch, where it can be processed. Exceptions are objects belonging to a specific class. Multiple catch blocks can handle different exception types in order. A catch-all block using ellipses (...) can handle any exception.
This document discusses handling exceptions in PL/SQL. It explains that exceptions can be raised implicitly by the Oracle server or explicitly in a program. Exceptions can be handled by trapping them with an exception handler or propagating them to the calling environment. It provides details and examples of trapping predefined Oracle exceptions, user-defined exceptions, and non-predefined Oracle exceptions. It also discusses exception handling in calling environments like procedures.
Decision making and branching in c programmingPriyansh Thakar
The document discusses different types of decision making and branching statements in C programming including if, if-else, nested if-else, else-if ladder, switch case, and goto statements. It provides examples of using each statement type to check conditions and execute different blocks of code based on whether the conditions are true or false. Key points covered include the syntax, flow, and use of each statement type to evaluate conditions and direct program flow.
Operators in Java include assignment, arithmetic, relational, logical, and other specialized operators. Assignment operators assign values to variables, arithmetic operators perform math operations, relational operators compare values, and logical operators combine conditional statements. There are unary, binary, and ternary operators that take one, two, or three operands respectively. Common operators include +, -, *, /, %, ++, --, =, ==, !=, <, >, <=, >=, &&, ||, and instanceof.
This document provides an introduction to exception handling in programming. It discusses that exceptions are unusual runtime conditions, like division by zero, that a program may encounter during execution. It explains that code that could cause exceptions is placed in a try block. When an exception occurs in the try block, it is thrown using a throw statement. The catch block then handles the exception by generating user-friendly error messages. The document provides the syntax for try, throw, and catch blocks and includes an example program that catches a division by zero exception.
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 constructors and destructors in C++. It describes constructor functions as special member functions that initialize object values when an object is created. It covers default constructors, parameterized constructors, copy constructors, and constructor overloading. Destructors are described as special functions that destroy objects and perform cleanup when objects go out of scope. The key characteristics and uses of constructors and destructors are summarized with examples.
PL/SQL is Oracle's procedural language extension to SQL that allows developers to write programs that combine SQL statements to manipulate data with procedural programming constructs like variables, conditions, and loops. PL/SQL code can be executed on the Oracle server for improved performance compared to executing multiple SQL statements individually. PL/SQL blocks contain a declaration section, executable section, and optional exception handling section. Named blocks can be stored in the database as procedures, functions, or packages while anonymous blocks are executed once.
Oracle - Program with PL/SQL - Lession 08Thuan Nguyen
This document discusses handling exceptions in PL/SQL. It defines exceptions as identifiers raised during execution due to Oracle errors or being explicitly raised. Exceptions can be trapped with handlers or propagated. There are predefined Oracle exceptions as well as user-defined exceptions. Handlers use an EXCEPTION WHEN clause and can trap specific or all exceptions. Functions like SQLCODE and SQLERRM provide error details. The RAISE_APPLICATION_ERROR procedure issues user errors. Exceptions propagate to calling environments if unhandled.
This document discusses exception handling in C++ and Java. It defines what exceptions are and explains that exception handling separates error handling code from normal code to make programs more readable and robust. It covers try/catch blocks, throwing and catching exceptions, and exception hierarchies. Finally, it provides an example of implementing exception handling in a C++ program to handle divide-by-zero errors.
PACKAGES, Package Specification and Scope, Create Package Syntax, Declaring Procedures and Functions within a Package, Package Body, Create Package Body Syntax,Example –Package, Example– Package Body, Example – Calling Package Procedure, mResults of Calling Package Procedure, Cursors in Packages , cursor Example – Package Body, Example – Use Cursor Variable
The document discusses exception handling in programming. It defines different types of errors like syntax errors, semantic errors, and logical errors. Runtime errors can occur due to issues like division by zero. Exception handling involves finding and throwing exceptions using try, catch, and throw keywords. The catch block handles the exception. Common Java exceptions include NullPointerException, FileNotFoundException, and ArrayIndexOutOfBoundsException.
The document discusses pointers in C++. It begins with basic introductions about pointers, dynamic memory allocation, and memory leaks. It then covers declaring pointer variables, initializing pointers, and assigning the address of an existing variable to a pointer. The document demonstrates allocating memory dynamically using new and deleting memory using delete. It provides an example of printing the value at a pointer's address, defining a null pointer, and explains that reassigning a pointer without deleting can cause memory leaks.
Dynamic memory allocation allows programs to request memory from the operating system at runtime. This memory is allocated on the heap. Functions like malloc(), calloc(), and realloc() are used to allocate and reallocate dynamic memory, while free() releases it. Malloc allocates a single block of uninitialized memory. Calloc allocates multiple blocks of initialized (zeroed) memory. Realloc changes the size of previously allocated memory. Proper use of these functions avoids memory leaks.
Cursors in PL/SQL allow programmers to control context areas that contain information about SQL statements. There are two types of cursors: implicit cursors that are automatically created for SQL statements, and explicit cursors that are programmer-defined. Explicit cursors must be declared, opened to allocate memory, have rows fetched from them one by one, and then closed to release memory. Cursors point to context areas containing information like the number of rows processed by a SQL statement.
The document discusses exception handling in C++. It defines exceptions as conditions that occur during execution and prevent normal program continuation. Exception handling involves trying blocks of code that may throw exceptions, throwing exceptions when errors occur, and catching exceptions in handler blocks to deal with the errors. The key aspects of exception handling are try blocks for code that can throw, throw statements to indicate exceptions, and catch blocks that match exception types to handle them.
This document discusses various control structures and loops in Oracle including simple loops, while loops, for loops, nested loops, and selective statements like if, if/else, if/elsif/else, and case. Loops allow iterating through a block of code until a condition is met. Control structures alter program flow. Nested loops allow looping within other loops. Selective statements perform actions conditionally based on evaluated conditions.
This document discusses exception handling in Java. It defines exceptions as abnormal conditions that disrupt normal program flow. Exception handling allows programs to gracefully handle runtime errors. The key aspects covered include the exception hierarchy, try-catch-finally syntax, checked and unchecked exceptions, and creating user-defined exceptions.
This document assigns a group project on data types in C++ to seven students. It discusses the three main data types in C++ - character, integer, and float. Character data can store single characters, integer data stores whole numbers, and float data stores numeric values with decimals. It also covers variable declaration and initialization in C++, noting that variables must be declared before use and can be initialized with a value upon declaration. The document assigns different aspects of the data types topic to the seven students listed at the top for further explanation in the project.
There are three main types of control structures in computer programming: sequential logic, selection logic, and iteration logic. Sequential logic executes code line-by-line. Selection logic (e.g. if/else statements) allows executing code conditionally. Iteration logic (e.g. for loops) repeats code execution in loops. The document provides examples of if/else, nested if, switch statements, and the conditional operator for implementing various control structures in C programming.
1. The document discusses different types of exceptions in PL/SQL including predefined/system-defined exceptions and user-defined exceptions.
2. Some examples of common predefined exceptions are zero_divide, value_error, and no_data_found. These are defined by Oracle and have predefined error codes and messages.
3. User-defined exceptions are declared explicitly and can be raised using the RAISE statement. They allow developers to build custom exceptions.
The document discusses exception handling in C++. It defines an exception as an error that occurs during runtime. C++ includes a built-in exception handling mechanism using try, catch, and throw keywords. Code that can generate exceptions is placed in a try block. If an exception occurs, it is thrown using throw and caught using catch, where it can be processed. Exceptions are objects belonging to a specific class. Multiple catch blocks can handle different exception types in order. A catch-all block using ellipses (...) can handle any exception.
This document discusses handling exceptions in PL/SQL. It explains that exceptions can be raised implicitly by the Oracle server or explicitly in a program. Exceptions can be handled by trapping them with an exception handler or propagating them to the calling environment. It provides details and examples of trapping predefined Oracle exceptions, user-defined exceptions, and non-predefined Oracle exceptions. It also discusses exception handling in calling environments like procedures.
Decision making and branching in c programmingPriyansh Thakar
The document discusses different types of decision making and branching statements in C programming including if, if-else, nested if-else, else-if ladder, switch case, and goto statements. It provides examples of using each statement type to check conditions and execute different blocks of code based on whether the conditions are true or false. Key points covered include the syntax, flow, and use of each statement type to evaluate conditions and direct program flow.
Operators in Java include assignment, arithmetic, relational, logical, and other specialized operators. Assignment operators assign values to variables, arithmetic operators perform math operations, relational operators compare values, and logical operators combine conditional statements. There are unary, binary, and ternary operators that take one, two, or three operands respectively. Common operators include +, -, *, /, %, ++, --, =, ==, !=, <, >, <=, >=, &&, ||, and instanceof.
This document provides an introduction to exception handling in programming. It discusses that exceptions are unusual runtime conditions, like division by zero, that a program may encounter during execution. It explains that code that could cause exceptions is placed in a try block. When an exception occurs in the try block, it is thrown using a throw statement. The catch block then handles the exception by generating user-friendly error messages. The document provides the syntax for try, throw, and catch blocks and includes an example program that catches a division by zero exception.
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 constructors and destructors in C++. It describes constructor functions as special member functions that initialize object values when an object is created. It covers default constructors, parameterized constructors, copy constructors, and constructor overloading. Destructors are described as special functions that destroy objects and perform cleanup when objects go out of scope. The key characteristics and uses of constructors and destructors are summarized with examples.
PL/SQL is Oracle's procedural language extension to SQL that allows developers to write programs that combine SQL statements to manipulate data with procedural programming constructs like variables, conditions, and loops. PL/SQL code can be executed on the Oracle server for improved performance compared to executing multiple SQL statements individually. PL/SQL blocks contain a declaration section, executable section, and optional exception handling section. Named blocks can be stored in the database as procedures, functions, or packages while anonymous blocks are executed once.
Oracle - Program with PL/SQL - Lession 08Thuan Nguyen
This document discusses handling exceptions in PL/SQL. It defines exceptions as identifiers raised during execution due to Oracle errors or being explicitly raised. Exceptions can be trapped with handlers or propagated. There are predefined Oracle exceptions as well as user-defined exceptions. Handlers use an EXCEPTION WHEN clause and can trap specific or all exceptions. Functions like SQLCODE and SQLERRM provide error details. The RAISE_APPLICATION_ERROR procedure issues user errors. Exceptions propagate to calling environments if unhandled.
The document discusses various PL/SQL programming concepts including PL/SQL block structure, procedures, functions, packages, cursors, exceptions, and dependencies. It provides guidelines for proper naming conventions, restrictions on calling functions from SQL expressions, and best practices for cursor and package design. The document also covers object types, subtypes, and working with collections in PL/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.
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.
This document provides an introduction to Java programming. It discusses what Java is, its key characteristics like being object-oriented and portable, and how to get started with Java programming. It also covers Java concepts like classes, methods, variables, data types, operators, and how to compile and run a simple Java application.
The document discusses several SQL concepts:
[1] Subqueries, which can be noncorrelated (independent of the outer query) or correlated (contains references to the outer query). Correlated subqueries cannot be run independently.
[2] Views, which provide security, simplify queries, and insulate from changes, but can reduce performance and manageability. Views restrict access and update capabilities.
[3] Stored procedures, which increase performance but require specialized skills. Stored procedures accept parameters, contain multiple statements, and perform modifications, while views are limited to single SELECTs.
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.
An exception is a runtime error or warning condition. There are two types of exceptions: predefined exceptions raised implicitly by the runtime system, and user-defined exceptions raised explicitly using RAISE statements. Exceptions are handled using exception handlers within blocks of code. Predefined exceptions correspond to common Oracle errors, while user-defined exceptions must be declared and implemented by the user. RAISE statements are used to explicitly raise user-defined exceptions.
An exception is a runtime error or warning condition. There are two types of exceptions: predefined exceptions raised implicitly by the runtime system, and user-defined exceptions raised explicitly with RAISE statements. Exceptions are handled with exception handlers. Predefined exceptions correspond to common Oracle errors like division by zero. User-defined exceptions must be declared. The RAISE_APPLICATION_ERROR procedure can be used to raise user-defined exceptions within PL/SQL blocks.
This document provides an overview of Java programming concepts. It introduces Java, discusses its key characteristics like being object-oriented and portable, and covers basic Java concepts such as variables, data types, operators, and methods. It also demonstrates how to compile and run a simple Java application and includes examples of code snippets.
This document provides an overview of Java programming concepts. It introduces Java, discusses its key characteristics like being object-oriented and portable, and covers basic Java concepts such as variables, data types, operators, and methods. It includes examples of simple Java programs and explains how to compile and run a Java application. The document is intended to teach beginners how to get started with Java programming.
This document provides an overview of Java programming concepts. It introduces Java, discusses its key characteristics like being object-oriented and portable, and covers basic Java concepts such as variables, data types, operators, and methods. It includes examples of simple Java programs and explains how to compile and run a Java application. The document is intended to teach beginners how to get started with Java programming.
This document provides an overview of Java programming concepts. It introduces Java, discusses its key characteristics like being object-oriented and portable, and covers basic Java concepts such as variables, data types, operators, and methods. It includes examples of simple Java programs and explains how to compile and run a Java application. The document is intended to teach beginners how to get started with Java programming.
Charles WilliamsCS362Unit 3 Discussion BoardStructured Query Langu.docxchristinemaritza
Charles WilliamsCS362Unit 3 Discussion Board
Structured Query Language for Data Management 1
Structured Query Language for Data Management 36-04-17
Table of Contents
Phase 1- Database Design and DDL 3
Business Rules & Entity Tables 3
Entity Tables: 4
SQL CODE: 4
Screenshots: 8
Phase 2 – Security and DML 13
Task 1 14
Task 2 15
Task 3 16
Task 4 17
Task 5 18
Phase 3 - DML (Select) and Procedures 19
Task 1 19
Task 2 20
Task 3 21
Task 4 22
Task 5 23
Phase 4 – Architecture, Indexes 27
Step 1: CREATE TABLE [Degrees] 27
Step 2: Re-create ‘Classes’ TABLE to add ‘DegreeID’ column and INSERT 6 classes 29
Step 3: ALTER TABLE [Students] 31
Step 5: DML script to INSERT INTO the ‘Students’ table ‘DegreeID’ data 33
Step 6: Display ERD 36
Phase 5 – Views, Transactions, Testing and Performance 37
References 38
Phase 1- Database Design and DDL
I contracted to design and develop a database for CTU that will store individual and confidential university data. This database is required to give the back-end engineering to a front-end web application with an instinctive User/Interface (U/I) to be utilized by the college HR office. We've chosen to utilize Microsoft SQL Server 2012 given the way of information to be put away because it will be more secure, and it additionally gives a suite of server upkeep apparatuses to be deserted with the IT Department once the database and web application have been tried and acknowledged by college partners.
Amid our preparatory gatherings, CTU's necessities were characterized and enough perused to start making of the database. The accompanying areas contain the business tenets and element tables created amid the preparatory gatherings, and additionally duplicates of all the SQL code used to manufacture the database and make the Entity Relationship Diagram (ERD).
Business Rules & Entity Tables
Business Rules:
· A student has a name, a birth date, and gender.
· You must track the date the student started at the university and his or her current GPA, as well as be able to inactivate him or her without deleting information.
· For advising purposes, store the student's background/bio information. This is like a little story.
· An advisor has a name and an e-mail address.
· Students are assigned to one advisor, but one advisor may service multiple students.
· A class has a class code, name, and description.
· You need to indicate the specific classes a student is taking/has taken at the university. Track the date the student started a specific class and the grade earned in that class.
· Each class that a student takes has 4 assignments. Each assignment is worth 100 points.Entity Tables:
SQL CODE:
Create Database:
CREATE DATABASE [Cameron_CTU]
CONTAINMENT = NONE
ON PRIMARY
( NAME = N'Cameron_CTU', FILENAME = N'c:\Program Files\Microsoft SQL Server\MSSQL11.SCAMERON_CTU\MSSQL\DATA\Cameron_CTU.mdf' , SIZE = 3072KB , FILEGROWTH = 1024KB )
LOG ON
( NAME = N'Cameron_CTU_log', FILENAME = N'c:\Progra ...
London SF Developers: Custom Lightning Component Error HandlingRichard Clark
aka Essential Eight Lessons for Error Handling in Lightning Custom Component Development.
Covering some of the common pitfalls of handling errors when developing Lightning Components and my own modest recommendations for how you can avoid them, plus some best practices. As part of my role at Provar I get asked to investigate when our customer's tests are seen to be failing in order to diagnose whether the fault is in Salesforce or a missing feature of Provar. I've learned the astonishing ways in which people are publishing code for Lightning Components without basic error handling to a point I'd argue is irresponsible! This led me down a deeper and deeper rabbit hole which, like Alice, I'd like to share so you can all safely reach the Lightning Wonderland!
PL/SQL is a combination of SQL and procedural languages that enhances SQL's capabilities. It allows processing of SQL statements as a block. A PL/SQL block consists of optional declaration, mandatory execution, and optional exception sections. Variables, constants, records can be declared in the declaration section and used in the execution section. The execution section contains the main program logic. Exceptions are handled in the exception section. PL/SQL supports programming constructs like conditional statements and loops.
PL/SQL is Oracle's procedural language extension to SQL that allows developers to define stored procedures and functions. Stored procedures are PL/SQL blocks that are stored in the database and can be called by name from applications. Packages are groups of related procedures and functions that provide better organization, encapsulation, and performance. Embedded SQL allows SQL statements to be placed within host programs written in languages like C/C++ to access and manipulate an Oracle database.
In this lab you will learn how to use the Java Software Development Kit (SDK) with the Eclipse programming tool. In addition, you will create three simple Java programs.
This document provides instructions for completing a lab assignment involving the creation of three Java programs using Eclipse. The programs are: 1) ShowEscapeSequences, which displays text on separate lines using escape sequences; 2) Circle, which calculates and displays the diameter, circumference, and area of a circle given the radius; and 3) PracticeArithmeticOperators, which performs arithmetic operations on two user-input numbers and displays the results in a table. Students are instructed to include specific comments and output in their programs and submit source code files in a zip folder.
Similar to Different Kinds of Exception in DBMS (20)
Revolutionizing Visual Effects Mastering AI Face Swaps.pdfUndress Baby
The quest for the best AI face swap solution is marked by an amalgamation of technological prowess and artistic finesse, where cutting-edge algorithms seamlessly replace faces in images or videos with striking realism. Leveraging advanced deep learning techniques, the best AI face swap tools meticulously analyze facial features, lighting conditions, and expressions to execute flawless transformations, ensuring natural-looking results that blur the line between reality and illusion, captivating users with their ingenuity and sophistication.
Web:- https://undressbaby.com/
Artificia Intellicence and XPath Extension FunctionsOctavian Nadolu
The purpose of this presentation is to provide an overview of how you can use AI from XSLT, XQuery, Schematron, or XML Refactoring operations, the potential benefits of using AI, and some of the challenges we face.
SOCRadar's Aviation Industry Q1 Incident Report is out now!
The aviation industry has always been a prime target for cybercriminals due to its critical infrastructure and high stakes. In the first quarter of 2024, the sector faced an alarming surge in cybersecurity threats, revealing its vulnerabilities and the relentless sophistication of cyber attackers.
SOCRadar’s Aviation Industry, Quarterly Incident Report, provides an in-depth analysis of these threats, detected and examined through our extensive monitoring of hacker forums, Telegram channels, and dark web platforms.
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Crescat
Crescat is industry-trusted event management software, built by event professionals for event professionals. Founded in 2017, we have three key products tailored for the live event industry.
Crescat Event for concert promoters and event agencies. Crescat Venue for music venues, conference centers, wedding venues, concert halls and more. And Crescat Festival for festivals, conferences and complex events.
With a wide range of popular features such as event scheduling, shift management, volunteer and crew coordination, artist booking and much more, Crescat is designed for customisation and ease-of-use.
Over 125,000 events have been planned in Crescat and with hundreds of customers of all shapes and sizes, from boutique event agencies through to international concert promoters, Crescat is rigged for success. What's more, we highly value feedback from our users and we are constantly improving our software with updates, new features and improvements.
If you plan events, run a venue or produce festivals and you're looking for ways to make your life easier, then we have a solution for you. Try our software for free or schedule a no-obligation demo with one of our product specialists today at crescat.io
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Łukasz Chruściel
No one wants their application to drag like a car stuck in the slow lane! Yet it’s all too common to encounter bumpy, pothole-filled solutions that slow the speed of any application. Symfony apps are not an exception.
In this talk, I will take you for a spin around the performance racetrack. We’ll explore common pitfalls - those hidden potholes on your application that can cause unexpected slowdowns. Learn how to spot these performance bumps early, and more importantly, how to navigate around them to keep your application running at top speed.
We will focus in particular on tuning your engine at the application level, making the right adjustments to ensure that your system responds like a well-oiled, high-performance race car.
E-commerce Application Development Company.pdfHornet Dynamics
Your business can reach new heights with our assistance as we design solutions that are specifically appropriate for your goals and vision. Our eCommerce application solutions can digitally coordinate all retail operations processes to meet the demands of the marketplace while maintaining business continuity.
Hand Rolled Applicative User ValidationCode KataPhilip Schwarz
Could you use a simple piece of Scala validation code (granted, a very simplistic one too!) that you can rewrite, now and again, to refresh your basic understanding of Applicative operators <*>, <*, *>?
The goal is not to write perfect code showcasing validation, but rather, to provide a small, rough-and ready exercise to reinforce your muscle-memory.
Despite its grandiose-sounding title, this deck consists of just three slides showing the Scala 3 code to be rewritten whenever the details of the operators begin to fade away.
The code is my rough and ready translation of a Haskell user-validation program found in a book called Finding Success (and Failure) in Haskell - Fall in love with applicative functors.
Atelier - Innover avec l’IA Générative et les graphes de connaissancesNeo4j
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Allez au-delà du battage médiatique autour de l’IA et découvrez des techniques pratiques pour utiliser l’IA de manière responsable à travers les données de votre organisation. Explorez comment utiliser les graphes de connaissances pour augmenter la précision, la transparence et la capacité d’explication dans les systèmes d’IA générative. Vous partirez avec une expérience pratique combinant les relations entre les données et les LLM pour apporter du contexte spécifique à votre domaine et améliorer votre raisonnement.
Amenez votre ordinateur portable et nous vous guiderons sur la mise en place de votre propre pile d’IA générative, en vous fournissant des exemples pratiques et codés pour démarrer en quelques minutes.
Software Engineering, Software Consulting, Tech Lead, Spring Boot, Spring Cloud, Spring Core, Spring JDBC, Spring Transaction, Spring MVC, OpenShift Cloud Platform, Kafka, REST, SOAP, LLD & HLD.
Enterprise Resource Planning System includes various modules that reduce any business's workload. Additionally, it organizes the workflows, which drives towards enhancing productivity. Here are a detailed explanation of the ERP modules. Going through the points will help you understand how the software is changing the work dynamics.
To know more details here: https://blogs.nyggs.com/nyggs/enterprise-resource-planning-erp-system-modules/
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j
Dr. Jesús Barrasa, Head of Solutions Architecture for EMEA, Neo4j
Découvrez les dernières innovations de Neo4j, et notamment les dernières intégrations cloud et les améliorations produits qui font de Neo4j un choix essentiel pour les développeurs qui créent des applications avec des données interconnectées et de l’IA générative.
Takashi Kobayashi and Hironori Washizaki, "SWEBOK Guide and Future of SE Education," First International Symposium on the Future of Software Engineering (FUSE), June 3-6, 2024, Okinawa, Japan
May Marketo Masterclass, London MUG May 22 2024.pdfAdele Miller
Can't make Adobe Summit in Vegas? No sweat because the EMEA Marketo Engage Champions are coming to London to share their Summit sessions, insights and more!
This is a MUG with a twist you don't want to miss.
2. Errors
• Two types of errors can be found in a program:
compilation errors and runtime errors.
• There is a special section in a PL/SQL block that
handles the runtime errors.
• This section is called the exception-handling section,
and in it, runtime errors are referred to as
exceptions.
• The exception-handling section allows programmers
to specify what actions should be taken when a
specific exception occurs.
3. How to handle Exception
• In order to handle run time errors in the
program, an exception handler must be
added.
• The exception-handling section has the
following structure:
EXCEPTION
WHEN EXCEPTION_NAME
THEN
ERROR-PROCESSING STATEMENTS;
• The exception-handling section is placed
after the executable section of the block.
4. How exception can be classified???
Build-in exception
Userdefined exception
5. BUILT-IN EXCEPTIONS
When a built-in exception occurs, it is said to
be raised implicitly.
In other words, if a program breaks an Oracle
rule, the control is passed to the exception-
handling section of the block.
At this point, the error processing statements
are executed.
It is important for you to realize that after the
exception-handling section of the block has
executed, the block terminates.
Control will not return to the executable section
of this block.
6. This example produces the
following output:
There is no such student
PL/SQL procedure
successfully completed.
Why???
Because there is no record
in the STUDENT table with
student ID 101, the SELECT
INTO statement does not
return any rows.
As a result, control passes
to the exception-handling
section of the block, and
the error message “There is
no such student” is
displayed on the screen.
Even though there is a
DBMS_OUTPUT.PUT_LINE
statement right after the
SELECT statement, it will
not be executed because
control has been
transferred to the
exception-handling section.
Example
DECLARE
v_student_name
VARCHAR2(50);
BEGIN
SELECT first_name||‘
’||last_name
INTO v_student_name
FROM student
WHERE student_id = 101;
DBMS_OUTPUT.PUT_LINE
(‘Student name
is’||v_student_name);
EXCEPTION
WHEN NO_DATA_FOUND
THEN
DBMS_OUTPUT.PUT_LINE
(‘There is no such student’);
END;
7. What are predefined exception??
The list shown below explains some commonly used predefined
exceptions and how they are raised:
NO_DATA_FOUND This exception is raised when a SELECT
INTO statement, which makes no calls to group functions, such
as SUM or COUNT, does not return any rows.
For example, you issue a SELECT INTO statement against
STUDENT table where student ID equals 101.
If there is no record in the STUDENT table passing this criteria
(student ID equals 101), the NO_DATA_FOUND exception is
raised.
8. TOO_MANY_ROWS
This exception is raised when a SELECT INTO
statement returns more than one row.
By definition, a SELECT INTO can return only single
row.
If a SELECT INTO statement returns more than one
row, the definition of the SELECT INTO statement
is violated.
This causes the TOO_MANY_ROWS exception to be
raised.
For example, you issue a SELECT INTO statement
against the STUDENT table for a specific zip code.
There is a big chance that this SELECT statement
will return more than one row because many
students can live in the same zip code area.
9. ZERO_DIVIDE
This exception is raised when a division operation is
performed in the program and a divisor is equal to zero.
Previous example in the illustrates how this exception is
raised.
LOGIN_DENIED
This exception is raised when a user is trying to login on
to Oracle with invalid username or password.
10. PROGRAM_ERROR
This exception is raised when a PL/SQL program
has an internal problem
VALUE_ERROR
This exception is raised when conversion or size
mismatch error occurs.
For example, you select student’s last name into a
variable that has been defined as VARCHAR2(5).
If student’s last name contains more than five
characters, VALUE_ERROR exception is raised.
11. DUP_VALUE_ON_INDEX
This exception is raised when a program tries to
store a duplicate value in the column or columns
that have a unique index defined on them.
For example, you are trying to insert a record into
the SECTION table for the course number “25,”
section 1.
If a record for the given course and section
numbers already exists in the SECTION table,
DUP_VAL_ON_INDEX exception is raised because
these columns have a unique index defined on
them.
12. Example
FROM enrollment
WHERE student_id = v_student_id;
DBMS_OUTPUT.PUT_LINE
('Student is registered for '||v_total||' course(s)');
*/inner block*/EXCEPTION
WHEN VALUE_ERROR OR INVALID_NUMBER
THEN
DBMS_OUTPUT.PUT_LINE('An error has
occurred');
END;
*/outer block */
EXCEPTION
WHEN NO_DATA_FOUND
THEN
DBMS_OUTPUT.PUT_LINE('There is no such student');
END;
13. • The inner block has structure similar to the outer block.
• It has a SELECT INTO statement and an exception
section to handle errors.
• When VALUE_ERROR or INVALID_NUMBER error occurs
in the inner block, the exception is raised.
• It is important that you realize that exceptions
VALUE_ERROR and INVALID_NUMBER have been
defined for the inner block only.
• Therefore, they can be raised in the inner block only.
• If one of these errors occurs in the outer block, this
program will be unable to terminate successfully.
14. User Defined Exceptions
• Often in programs you may need to handle
problems that are specific to the program you
write.
• For example, your program asks a user to enter
a value for student_id. This value is then
assigned to the variable v_student_id that is
used later in the program.
• Generally, you want a positive number for an id.
By mistake, the user enters a negative number.
• However, no error has occurred because
student_id has been defined as a number, and
the user has supplied a legitimate numeric
value.
• Therefore, you may want to implement your
own exception to handle this situation.
15. How to declare user-defined exception
• A user-defined exception is declared in
the declarative part of a PL/SQL block as
shown below:
DECLARE
exception_name EXCEPTION;
• Once an exception has been declared,
the executable statements associated
with this exception are specified in the
exception-handling section of the block.
• The format of the exception-handling
section is the same as for built-in
exceptions
16. Raising Exception
• user-defined
exception must be
raised explicitly.
• In other words, you
need to specify in
your program under
which
circumstances an
exception must be
raised as shown :
DECLARE
exception_name
EXCEPTION;
BEGIN
…
IF CONDITION
THEN
RAISE exception_name;
ELSE
…
END IF;
EXCEPTION
WHEN exception_name
THEN
ERROR-PROCESSING
STATEMENTS;
END;
17. example
declare
e exception;
vamt number(10);
begin
select amt into vamt from
ac_det where acno=124;
vamt:=vamt-77000;
if(vamt<2000) then
raise e;
end if;
exception
when e then
dbms_output.put_line('Minimum
balance amount conflict');
* end;
SQL> /
Declare exception if the particular data
is not found
Raise exception ‘E’
If ‘E’ is exception the it will be
displayed as
‘minimum amount conflict’