elctnabbrs va_election_ids; elctndates va_election_dates; partyabbrs va_party_abbrs; votemethods va_vote_methods; precincts va_precinct_ids;

Size: px
Start display at page:

Download "elctnabbrs va_election_ids; elctndates va_election_dates; partyabbrs va_party_abbrs; votemethods va_vote_methods; precincts va_precinct_ids;"

Transcription

1 CREATE OR REPLACE PACKAGE vevo.pkg_load_generator Package: VEVO.PKG_LOAD_GENERATOR Version: Description: Generates various different loads on the target database for evaluation of various Oracle features. Author: Jim Czuprynski PROCEDURE RandomDML; END pkg_load_generator; / CREATE OR REPLACE PACKAGE BODY vevo.pkg_load_generator Package Body: VEVO.PKG_LOAD_GENERATOR Version: Description: Generates various different loads on the target database for evaluation of various Oracle features. Author: Jim Czuprynski -- Local VARRAY variables for storage and retrieval of random -- values for Customer, Product, and Vendor IDs TYPE va_election_ids VARRAY(19) OF CHAR(07 TYPE va_election_dates VARRAY(19) OF DATE; TYPE va_party_abbrs VARRAY(10) OF CHAR(03 TYPE va_vote_methods VARRAY(10) OF CHAR(08 TYPE va_precinct_ids VARRAY(60) OF CHAR(06 elctnabbrs va_election_ids; elctndates va_election_dates; partyabbrs va_party_abbrs; votemethods va_vote_methods; precincts va_precinct_ids; TYPE va_cnv_locations VARRAY(07) OF CHAR(01 TYPE va_candidate_affinities VARRAY(10) OF CHAR(01 TYPE va_cnv_enthusiasmratings VARRAY(10) OF CHAR(01 TYPE va_cnv_volunteerismratings VARRAY(10) OF CHAR(01 TYPE va_cnv_contributionratings VARRAY(10) OF CHAR(01 TYPE va_cnv_followupratings VARRAY(10) OF CHAR(01 TYPE va_cnv_dontcontactflags VARRAY(10) OF CHAR(01 cnvlocations candidateaffinity enthusiasmratings volunteerismratings contributionratings followupratings dontcontactflags va_cnv_locations; va_candidate_affinities; va_cnv_enthusiasmratings; va_cnv_volunteerismratings; va_cnv_contributionratings; va_cnv_followupratings; va_cnv_dontcontactflags; Private Functions and Procedures FUNCTION Randomizer (seed NUMBER) RETURN NUMBER

2 Function: Randomizer Purpose: Returns a randomized number from 1 to SEEDed value supplied Scope: Private Arguments: seed - Input from calling routine Returns: Iteration - Randomized number Iteration NUMBER := 0; Iteration := ROUND(SYS.DBMS_RANDOM.VALUE(1,seed) RETURN Iteration; EXCEPTION WHEN OTHERS THEN RETURN 0; END Randomizer; FUNCTION Randomizer ( acolumnid VARCHAR2,Iteration NUMBER ) RETURN NUMBER Function: Randomizer Purpose: Returns a randomized value from one of several dimension tables Scope: Private Arguments: acolumnid VARCHAR2 Column Identifier Iteration NUMBER Iteration Number Returns: RandomValue NUMBER RandomValue NUMBER := 0; CASE acolumnid WHEN 'elctnabbrs' THEN RandomValue := MOD(Iteration, 19) + 1; WHEN 'elctndates' THEN RandomValue := MOD(Iteration, 19) + 1; WHEN 'partyabbrs' THEN RandomValue := DBMS_RANDOM.VALUE(1,10 WHEN 'votemethods' THEN RandomValue := MOD(Iteration, 7)+ 1; WHEN 'precincts' THEN RandomValue := MOD(Iteration, 60) + 1; WHEN 'cnvlocations' THEN RandomValue := MOD(Iteration, 7) + 1; WHEN 'candidateaffinities' THEN WHEN 'enthusiasmratings' THEN WHEN 'volunteerismratings' THEN WHEN 'contributionratings' THEN WHEN 'followupratings' THEN WHEN 'dontcontactflags' THEN ELSE RandomValue := 0; END CASE; RETURN RandomValue; EXCEPTION WHEN OTHERS THEN RETURN 0; END Randomizer;

3 Public Functions and Procedures PROCEDURE RandomDML Procedure: RandomDML Purpose: Loads a random number of entries into VEVO schema tablesinvoices and Invoice Details Scope: Public CURSOR curvoters SELECT v_unique_sk,v_county_abbr FROM vevo.t_voters -- WHERE ROWNUM <= 11 ; CURSOR curstaff SELECT st_sk FROM vevo.t_staff; nvoterid NUMBER(9) := 0; nstfsk NUMBER(9) := 0; VtgLoopEnd NUMBER(9) := 0; CnvLoopEnd NUMBER(9) := 0; nindex NUMBER(9) := 0; vcelectionabbr VARCHAR2(07) := NULL; dtvotedon DATE := NULL; vcvotingprecinct VARCHAR2(06) := NULL; vcpartyabbr VARCHAR2(03) := NULL; vrvotingmethod VARCHAR2(08) := NULL; dtcnvon DATE := NULL; vccnvlocation CHAR(1) := NULL; ccandidateafnt CHAR(1) := NULL; centhusiasmrtg CHAR(1) := NULL; cvolunteerismrtg CHAR(1) := NULL; ccontributionrtg CHAR(1) := NULL; cfollowuprtg CHAR(1) := NULL; cdnrflg CHAR(1) := NULL; vccnvcomments VARCHAR2(4000) := NULL; FOR v IN curvoters LOOP -- Accept current Voter's Unique ID: nvoterid := v.v_unique_sk; VtgLoopEnd := DBMS_RANDOM.VALUE(2,19 CnvLoopEnd := DBMS_RANDOM.VALUE(2,4 -- Generate Voting Results entries FOR idx1 IN 1..VtgLoopEnd LOOP DBMS_APPLICATION_INFO.SET_MODULE( module_name => 'DMLGenerator',action_name => 'BuildVotingResults' nindex := Randomizer(idx1 vcelectionabbr := elctnabbrs(idx1 dtvotedon := elctndates(idx1 vcpartyabbr := partyabbrs(randomizer('partyabbrs', idx1 ) vrvotingmethod := votemethods(randomizer('votemethods', idx1 ) vcvotingprecinct := precincts(randomizer('precincts', nvoterid)

4 -- Add new Voting Results entry INSERT INTO vevo.t_voting_results ( vr_unique_sk,vr_election_abbr,vr_voted_dt,vr_voting_precinct,vr_party_abbr,vr_voting_method ) VALUES( nvoterid,vcelectionabbr,dtvotedon,vcvotingprecinct,vcpartyabbr,vrvotingmethod END LOOP; -- Generate Canvassing entries FOR idx2 IN 1..CnvLoopEnd LOOP -- Determine randomized value of number of invoice items DBMS_APPLICATION_INFO.SET_MODULE( module_name => 'DMLGenerator',action_name => 'BuildCanvassingResults' -- Assign a Canvasser nstfsk := (MOD(nVoterID, 25) + 2 dtcnvon := SYSDATE - (MOD(idx2, 5) + 1 vccnvlocation := cnvlocations(randomizer('cnvlocations', idx2) ccandidateafnt := candidateaffinity(randomizer('candidateaffinities', idx2) centhusiasmrtg := enthusiasmratings(randomizer('enthusiasmratings', idx2) cvolunteerismrtg := volunteerismratings(randomizer('volunteerismratings', idx2) ccontributionrtg := contributionratings(randomizer('contributionratings', idx2) cfollowuprtg := followupratings(randomizer('followupratings', idx2) cdnrflg := dontcontactflags(randomizer('dontcontactflags', idx2) vccnvcomments := 'Nothing significant'; -- Add new Canvassing entries INSERT INTO vevo.t_canvassing ( cv_unique_sk,cv_st_sk,cv_date,cv_location,cv_candidate_afnt,cv_enthusiasm_rtg,cv_volunteerism_rtg,cv_contribution_rtg,cv_follow_up_rtg,cv_dnr_flg,cv_comments ) VALUES( nvoterid,nstfsk,dtcnvon,vccnvlocation,ccandidateafnt,centhusiasmrtg,cvolunteerismrtg,ccontributionrtg,cfollowuprtg,cdnrflg,vccnvcomments

5 END LOOP; COMMIT; END LOOP; End of Voters loop EXCEPTION WHEN OTHERS THEN DBMS_OUTPUT.PUT_LINE('Fatal error during processing of Voter #' nvoterid ': ' SQLCODE ' - ' SQLERRM ROLLBACK; END RandomDML; -- Initialize VARRAY values for Randomizer function elctnabbrs := va_election_ids('pri2018', 'NAT2016', 'PRI2016', 'CON2014', 'PRI2014', 'NAT2012', 'PRI2012', 'CON2010', 'PRI2010', 'NAT2008', 'PRI2008', 'CON2006', 'PRI2006', 'NAT2004', 'PRI2004', 'CON2002', 'PRI2002', 'NAT2000', 'PRI2000' elctndates := va_election_dates( TO_DATE(' ','YYYY-MM-DD'), TO_DATE(' ','YYYY-MM-DD'), TO_DATE(' ','YYYY-MM-DD'), TO_DATE(' ','YYYY-MM-DD'), TO_DATE(' ','YYYY-MM-DD'), TO_DATE(' ','YYYY-MM-DD'), TO_DATE(' ','YYYY-MM-DD'), TO_DATE(' ','YYYY-MM-DD'), TO_DATE(' ','YYYY-MM-DD'), TO_DATE(' ','YYYY-MM-DD'), TO_DATE(' ','YYYY-MM-DD'), TO_DATE(' ','YYYY-MM-DD'), TO_DATE(' ','YYYY-MM-DD'), TO_DATE(' ','YYYY-MM-DD'), TO_DATE(' ','YYYY-MM-DD'), TO_DATE(' ','YYYY-MM-DD'), TO_DATE(' ','YYYY-MM-DD'), TO_DATE(' ','YYYY-MM-DD'), TO_DATE(' ','YYYY-MM-DD') partyabbrs := va_party_abbrs ('DEM','REP','REP','DEM','IND', 'DEM','REP','IND','REP','DEM' votemethods := va_vote_methods('precinct','precinct','precinct','precinct','absentee', 'Precinct','Precinct','Absentee','Mail','Precinct'

6 precincts := va_precinct_ids('du0001','el0001','ge0001','ha0001','ka0001', 'PL0001','RU0001','SC0001','SG0001','VI0001', 'BA0002','BB0002','BR0002','CA0002','DU0002', 'EL0002','GE0002','HA0002','PL0002','RU0002', 'SC0002','SG0002','VI0002','BA0003','BB0003', 'CA0003','DU0003','EL0003','GE0003','HA0003', 'PL0003','RU0003','SC0003','SG0003','BA0004', 'BB0004','CA0004','DU0004','EL0004','GE0004', 'RU0004','SC0004','SG0004','BA0005','BB0005', 'CA0005','DU0005','EL0005','GE0005','RU0005', 'SC0005','SG0005','BA0006','BB0006','CA0006', 'SC0007','SG0007','BA0007','BB0007','CA0007' cnvlocations := va_cnv_locations('h','s','w','t','c','x','u' candidateaffinity := va_candidate_affinities('1','3','5','5','4','5','4','2','1','3' enthusiasmratings := va_cnv_enthusiasmratings('5','4','4','3','1','5','5','4','2','1' volunteerismratings := va_cnv_volunteerismratings('y','y','n','n','n','y','n','n','n','y' contributionratings := va_cnv_contributionratings('y','y','y','n','y','y','n','y','y','y' followupratings := va_cnv_followupratings('y','y','y','n','n','y','y','n','y','n' dontcontactflags := va_cnv_dontcontactflags('n','n','n','n','y','n','n','y','n','n' END pkg_load_generator; /

ORACLE: PL/SQL Programming

ORACLE: PL/SQL Programming %ROWTYPE Attribute... 4:23 %ROWTYPE... 2:6 %TYPE... 2:6 %TYPE Attribute... 4:22 A Actual Parameters... 9:7 Actual versus Formal Parameters... 9:7 Aliases... 8:10 Anonymous Blocks... 3:1 Assigning Collection

More information

Database Programming with PL/SQL

Database Programming with PL/SQL Database Programming with PL/SQL Trapping Oracle Server Exceptions 1 Copyright 2013, Oracle and/or its affiliates. All rights Objectives This lesson covers the following objectives: Describe and provide

More information

Fname A variable character field up to 15 characters in length. Must have a value Lname A variable character field up to 15

Fname A variable character field up to 15 characters in length. Must have a value Lname A variable character field up to 15 Customer Table CUSTOMER (CustomerNo, fname, lname, phone) CustomerNo Primary key, numeric, 4 digits Fname A variable character field up to 15 characters in length. Must have a value Lname A variable character

More information

Oracle Database 11g & PL/SQL

Oracle Database 11g & PL/SQL Oracle Database 11g & PL/SQL Tips and Tricks Marcelo Vinícius Cysneiros Aragão marcelovca90@inatel.br Data Manipulation DB Link Insert as Select Cursor Associative Array Exception Handling The usual way

More information

Database Programming with PL/SQL

Database Programming with PL/SQL Database Programming with PL/SQL 2-2 Objectives This lesson covers the following objectives: List and define the different types of lexical units available in PL/SQL Describe identifiers and identify valid

More information

COSC Assignment 2

COSC Assignment 2 COSC 344 Overview In this assignment, you will turn your miniworld into a set of Oracle tables, normalize your design, and populate your database. Due date for assignment 2 Friday, 25 August 2017 at 4

More information

Question Bank PL/SQL Fundamentals-I

Question Bank PL/SQL Fundamentals-I Question Bank PL/SQL Fundamentals-I UNIT-I Fundamentals of PL SQL Introduction to SQL Developer, Introduction to PL/SQL, PL/SQL Overview, Benefits of PL/SQL, Subprograms, Overview of the Types of PL/SQL

More information

Introduction to Computer Science and Business

Introduction to Computer Science and Business Introduction to Computer Science and Business This is the second portion of the Database Design and Programming with SQL course. In this portion, students implement their database design by creating a

More information

Manipulating Data. Copyright 2004, Oracle. All rights reserved.

Manipulating Data. Copyright 2004, Oracle. All rights reserved. Manipulating Data Copyright 2004, Oracle. All rights reserved. Objectives After completing this lesson, you should be able to do the following: Describe each data manipulation language (DML) statement

More information

Course Outline and Objectives: Database Programming with SQL

Course Outline and Objectives: Database Programming with SQL Introduction to Computer Science and Business Course Outline and Objectives: Database Programming with SQL This is the second portion of the Database Design and Programming with SQL course. In this portion,

More information

Overview of PL/SQL. About PL/SQL. PL/SQL Environment. Benefits of PL/SQL. Integration

Overview of PL/SQL. About PL/SQL. PL/SQL Environment. Benefits of PL/SQL. Integration About PL/ Overview of PL/ PL/ is an extension to with design features of programming languages. Data manipulation and query statements of are included within procedural units of code. PL/ Environment Benefits

More information

Full file at

Full file at SQL for SQL Server 1 True/False Questions Chapter 2 Creating Tables and Indexes 1. In order to create a table, three pieces of information must be determined: (1) the table name, (2) the column names,

More information

PASS4TEST. IT Certification Guaranteed, The Easy Way! We offer free update service for one year

PASS4TEST. IT Certification Guaranteed, The Easy Way!  We offer free update service for one year PASS4TEST \ http://www.pass4test.com We offer free update service for one year Exam : 1z1-051 Title : Oracle Database: SQL Fundamentals I Vendor : Oracle Version : DEMO Get Latest & Valid 1Z1-051 Exam's

More information

IBM DB2 9.7 SQL Procedure Developer.

IBM DB2 9.7 SQL Procedure Developer. IBM 000-545 DB2 9.7 SQL Procedure Developer http://killexams.com/exam-detail/000-545 QUESTION: 105 Click the Exhibit button. Referring to the exhibit, which two statements are correct? (Choose two.) A.

More information

Table of Contents. Oracle SQL PL/SQL Training Courses

Table of Contents. Oracle SQL PL/SQL Training Courses Table of Contents Overview... 7 About DBA University, Inc.... 7 Eligibility... 8 Pricing... 8 Course Topics... 8 Relational database design... 8 1.1. Computer Database Concepts... 9 1.2. Relational Database

More information

CREATE INVOICE (WITHOUT A PO)

CREATE INVOICE (WITHOUT A PO) CREATE INVOICE (WITHOUT A PO) DESCRIPTION This process is used to submit a Non PO invoice. If you still have questions, please email NobleInvoiceOnly@nblenergy.com. PROCEDURE STEP 1: Login to Oracle (https://oracledmzpnob1i.nobleenergyinc.com/oa_html/appslogin).

More information

Oracle. SQL(Structured Query Language) Introduction of DBMS. Build In Function. Introduction of RDBMS. Grouping the Result of a Query

Oracle. SQL(Structured Query Language) Introduction of DBMS. Build In Function. Introduction of RDBMS. Grouping the Result of a Query Oracle SQL(Structured Query Language) Introduction of DBMS Approach to Data Management Introduction to prerequisites File and File system Disadvantages of file system Introduction to TOAD and oracle 11g/12c

More information

Subject: ORA-01002: Fetch Out of Sequence Posted by Keshav Tripathy on Thu, 25 Jul :44:53 GMT View Forum Message <> Reply to Message

Subject: ORA-01002: Fetch Out of Sequence Posted by Keshav Tripathy on Thu, 25 Jul :44:53 GMT View Forum Message <> Reply to Message Subject: ORA-01002: Fetch Out of Sequence Posted by Keshav Tripathy on Thu, 25 Jul 2002 03:44:53 GMT View Forum Message Reply to Message Dear All I have the following scenerio. There is a Table named

More information

EDUVITZ TECHNOLOGIES

EDUVITZ TECHNOLOGIES EDUVITZ TECHNOLOGIES Oracle Course Overview Oracle Training Course Prerequisites Computer Fundamentals, Windows Operating System Basic knowledge of database can be much more useful Oracle Training Course

More information

Contents I Introduction 1 Introduction to PL/SQL iii

Contents I Introduction 1 Introduction to PL/SQL iii Contents I Introduction Lesson Objectives I-2 Course Objectives I-3 Human Resources (HR) Schema for This Course I-4 Course Agenda I-5 Class Account Information I-6 Appendixes Used in This Course I-7 PL/SQL

More information

First lecture of this chapter is in slides (PPT file)

First lecture of this chapter is in slides (PPT file) First lecture of this chapter is in slides (PPT file) Review of referential integrity CREATE TABLE other_table ( b1 INTEGER, c1 INTEGER, PRIMARY KEY (b1, c1) ) CREATE TABLE t ( a integer PRIMARY KEY, b2

More information

Programming Languages

Programming Languages Programming Languages Chapter 19 - Continuations Dr. Philip Cannata 1 Exceptions (define (f n) (let/cc esc (/ 1 (if (zero? n) (esc 1) n)))) > (f 0) 1 > (f 2) 1/2 > (f 1) 1 > Dr. Philip Cannata 2 Exceptions

More information

MANAGING DATA(BASES) USING SQL (NON-PROCEDURAL SQL, X401.9)

MANAGING DATA(BASES) USING SQL (NON-PROCEDURAL SQL, X401.9) Technology & Information Management Instructor: Michael Kremer, Ph.D. Class 3 Professional Program: Data Administration and Management MANAGING DATA(BASES) USING SQL (NON-PROCEDURAL SQL, X401.9) AGENDA

More information

Oracle 1Z Oracle Database SQL Expert. Download Full Version :

Oracle 1Z Oracle Database SQL Expert. Download Full Version : Oracle 1Z0-047 Oracle Database SQL Expert Download Full Version : http://killexams.com/pass4sure/exam-detail/1z0-047 QUESTION: 270 View the Exhibit and examine the structure for the ORDERS and ORDER_ITEMS

More information

PL / SQL Basics. Chapter 3

PL / SQL Basics. Chapter 3 PL / SQL Basics Chapter 3 PL / SQL Basics PL / SQL block Lexical units Variable declarations PL / SQL types Expressions and operators PL / SQL control structures PL / SQL style guide 2 PL / SQL Block Basic

More information

Banner Oracle PL/SQL and Database Objects Training Workbook

Banner Oracle PL/SQL and Database Objects Training Workbook Banner Oracle PL/SQL and Database Objects Training Workbook January 2007 Using Oracle for Banner 7 HIGHER EDUCATION What can we help you achieve? Confidential Business Information -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

More information

2 PL/SQL - fundamentals Variables and Constants Operators SQL in PL/SQL Control structures... 7

2 PL/SQL - fundamentals Variables and Constants Operators SQL in PL/SQL Control structures... 7 Table of Contents Spis treści 1 Introduction 1 2 PLSQL - fundamentals 1 2.1 Variables and Constants............................ 2 2.2 Operators.................................... 5 2.3 SQL in PLSQL.................................

More information

Table of Contents. PDF created with FinePrint pdffactory Pro trial version

Table of Contents. PDF created with FinePrint pdffactory Pro trial version Table of Contents Course Description The SQL Course covers relational database principles and Oracle concepts, writing basic SQL statements, restricting and sorting data, and using single-row functions.

More information

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe Chapter 10 Outline Database Programming: Techniques and Issues Embedded SQL, Dynamic SQL, and SQLJ Database Programming with Function Calls: SQL/CLI and JDBC Database Stored Procedures and SQL/PSM Comparing

More information

Configuring Databases

Configuring Databases CHAPTER 6 Configuring Databases Revised: August 21, 2012, Introduction This chapter describes how to configure the Cisco Service Control Management Suite (SCMS) Collection Manager (CM) to work with your

More information

SQL STORED ROUTINES. CS121: Relational Databases Fall 2017 Lecture 9

SQL STORED ROUTINES. CS121: Relational Databases Fall 2017 Lecture 9 SQL STORED ROUTINES CS121: Relational Databases Fall 2017 Lecture 9 SQL Functions 2 SQL queries can use sophisticated math operations and functions Can compute simple functions, aggregates Can compute

More information

Configuring Databases

Configuring Databases CHAPTER 6 Configuring Databases Introduction This chapter describes how to configure the Collection Manager to work with your database. The chapter also describes how to use the database infrastructure

More information

What are temporary tables? When are they useful?

What are temporary tables? When are they useful? What are temporary tables? When are they useful? Temporary tables exists solely for a particular session, or whose data persists for the duration of the transaction. The temporary tables are generally

More information

Lab # 4. Data Definition Language (DDL)

Lab # 4. Data Definition Language (DDL) Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM 4113: Lab # 4 Data Definition Language (DDL) Eng. Haneen El-Masry November, 2014 2 Objective To be familiar with

More information

When a database trigger routine does not have to take place before the triggering event, which timing should you assign to the trigger?

When a database trigger routine does not have to take place before the triggering event, which timing should you assign to the trigger? Page 1 of 80 Item: 1 (Ref:1z0-147e.9.2.4) When a database trigger routine does not have to take place before the triggering event, which timing should you assign to the trigger? nmlkj ON nmlkj OFF nmlkj

More information

Configuring Databases

Configuring Databases CHAPTER 6 This module describes how to configure the Cisco Service Control Management Suite (SCMS) Collection Manager (CM) to work with your database, and how to use the database infrastructure of the

More information

Introduction to Programming Using Java (98-388)

Introduction to Programming Using Java (98-388) Introduction to Programming Using Java (98-388) Understand Java fundamentals Describe the use of main in a Java application Signature of main, why it is static; how to consume an instance of your own class;

More information

Laboratory Handout Introduction to Oracle

Laboratory Handout Introduction to Oracle Laboratory Handout Introduction to Oracle SQL*Plus schemata data types DML & DDL examples editing commands using external files the dual pseudo-table introduction to transactions optional exercise references.

More information

Topics Fundamentals of PL/SQL, Integration with PROIV SuperLayer and use within Glovia

Topics Fundamentals of PL/SQL, Integration with PROIV SuperLayer and use within Glovia Topics Fundamentals of PL/SQL, Integration with PROIV SuperLayer and use within Glovia 1. Creating a Database Alias 2. Introduction to SQL Relational Database Concept Definition of Relational Database

More information

Oracle Database 12c SQL Fundamentals

Oracle Database 12c SQL Fundamentals Course Overview This course takes a unique approach to SQL training in that it incorporates data modeling theory, relational database theory, graphical depictions of theoretical concepts and numerous examples

More information

Business Analytics. SQL PL SQL [Oracle 10 g] P r i n c e S e t h i w w w. x l m a c r o. w e b s. c o m

Business Analytics. SQL PL SQL [Oracle 10 g] P r i n c e S e t h i w w w. x l m a c r o. w e b s. c o m Business Analytics Let s Learn SQL-PL SQL (Oracle 10g) SQL PL SQL [Oracle 10 g] RDBMS, DDL, DML, DCL, Clause, Join, Function, Queries, Views, Constraints, Blocks, Cursors, Exception Handling, Trapping,

More information

Oracle Database 11g: SQL and PL/SQL Fundamentals

Oracle Database 11g: SQL and PL/SQL Fundamentals Oracle University Contact Us: +33 (0) 1 57 60 20 81 Oracle Database 11g: SQL and PL/SQL Fundamentals Duration: 5 Days What you will learn In this course, students learn the fundamentals of SQL and PL/SQL

More information

REXX/SQL for VM. User s Guide. Software Product Research

REXX/SQL for VM. User s Guide. Software Product Research REXX/SQL for VM User s Guide Software Product Research REXX/SQL for VM Version 1 Copyright Software Product Research 2000 SQL/Monitoring Facility is a product name owned by Software Product Research All

More information

DB Programming. Database Systems

DB Programming. Database Systems DB Programming Database Systems 1 Agenda MySQL data types Altering the Schema More Advanced MySQL JDBC DB Coding Tips 2 MySQL Data Types There are 3 main groups of types: Numeric Date String http://dev.mysql.com/doc/refman/5.6/en/data-types.html

More information

Index. Boolean expression, , Business rules enforcement. see Declarative constraints table with Oracle constraints and,

Index. Boolean expression, , Business rules enforcement. see Declarative constraints table with Oracle constraints and, Index ABS numeric function, 355 Active State Perl, SQL*Plus with, 61 ADD_MONTHS, 360 AFTER DELETE ROW trigger, 202 AFTER DELETE STATEMENT trigger, 202 AFTER-INSERT-ROW (AIR) trigger, 172 174, 177, 179

More information

ADVANTAGES. Via PL/SQL, all sorts of calculations can be done quickly and efficiently without use of Oracle engine.

ADVANTAGES. Via PL/SQL, all sorts of calculations can be done quickly and efficiently without use of Oracle engine. 1 PL/SQL INTRODUCTION SQL does not have procedural capabilities. SQL does not provide the programming techniques of condition checking, looping and branching that is required for data before permanent

More information

Data Manipulation Language

Data Manipulation Language Manipulating Data Objectives After completing this lesson, you should be able to do the following: Describe each data manipulation language (DML) statement Insert rows into a table Update rows in a table

More information

PLSQL 9i Index. Section Title Page

PLSQL 9i Index. Section Title Page One PLSQL Introduction 2 Procedural Language for SQL 3 Two PLSQL Structure 5 Basic Structure of PLSQL 6 The Declaration Section in PLSQL 7 Local Variables in PLSQL 8 Naming Local Variables in PLSQL 10

More information

Imagination To Realization

Imagination To Realization Imagination To Realization Trigger Writing for Fun and Profit Presented by: Larry Holder Database Administrator The University of Tennessee at Martin April 4, 2006 10:30 11:30 am April 2-5 Orlando, Florida

More information

ITCS Implementation. Jing Yang 2010 Fall. Class 14: Introduction to SQL Programming Techniques (Ch13) Outline

ITCS Implementation. Jing Yang 2010 Fall. Class 14: Introduction to SQL Programming Techniques (Ch13) Outline ITCS 3160 Data Base Design and Implementation Jing Yang 2010 Fall Class 14: Introduction to SQL Programming Techniques (Ch13) Outline Database Programming: Techniques and Issues Three approaches: Embedded

More information

School of Information and Computer Technology Sirindhorn International Institute of Technology Thammasat University

School of Information and Computer Technology Sirindhorn International Institute of Technology Thammasat University School of Information and Computer Technology Sirindhorn International Institute of Technology Thammasat University ITS351 Database Programming Laboratory Laboratory #4: Database Design & Administration

More information

Oracle Database: SQL and PL/SQL Fundamentals NEW

Oracle Database: SQL and PL/SQL Fundamentals NEW Oracle Database: SQL and PL/SQL Fundamentals NEW Duration: 5 Days What you will learn This Oracle Database: SQL and PL/SQL Fundamentals training delivers the fundamentals of SQL and PL/SQL along with the

More information

Built-in SQL Functions. Chapter 5

Built-in SQL Functions. Chapter 5 Built-in SQL Functions Chapter 5 Type of Functions Character Functions returning character values returning numeric values Numeric Functions Date Functions Conversion Functions Group Functions Error Reporting

More information

Oracle Database: SQL and PL/SQL Fundamentals Ed 2

Oracle Database: SQL and PL/SQL Fundamentals Ed 2 Oracle University Contact Us: Local: 1800 103 4775 Intl: +91 80 67863102 Oracle Database: SQL and PL/SQL Fundamentals Ed 2 Duration: 5 Days What you will learn This Oracle Database: SQL and PL/SQL Fundamentals

More information

Táblák tartalmának módosítása. Copyright 2004, Oracle. All rights reserved.

Táblák tartalmának módosítása. Copyright 2004, Oracle. All rights reserved. Táblák tartalmának módosítása Copyright 2004, Oracle. All rights reserved. Objectives After completing this lesson, you should be able to do the following: Describe each data manipulation language (DML)

More information

Principles of Data Management

Principles of Data Management Principles of Data Management Alvin Lin August 2018 - December 2018 Structured Query Language Structured Query Language (SQL) was created at IBM in the 80s: SQL-86 (first standard) SQL-89 SQL-92 (what

More information

Conversion Functions

Conversion Functions Conversion Functions Data type conversion Implicit data type conversion Explicit data type conversion 3-1 Implicit Data Type Conversion For assignments, the Oracle server can automatically convert the

More information

A Unit of SequelGate Innovative Technologies Pvt. Ltd. All Training Sessions are Completely Practical & Real-time

A Unit of SequelGate Innovative Technologies Pvt. Ltd. All Training Sessions are Completely Practical & Real-time SQL Basics & PL-SQL Complete Practical & Real-time Training Sessions A Unit of SequelGate Innovative Technologies Pvt. Ltd. ISO Certified Training Institute Microsoft Certified Partner Training Highlights

More information

LECTURE11: TRANSACTION CONTROL LANGUAGE DATA CONTROL LANGUAGE

LECTURE11: TRANSACTION CONTROL LANGUAGE DATA CONTROL LANGUAGE LECTURE11: TRANSACTION CONTROL LANGUAGE DATA CONTROL LANGUAGE Ref. Chapter6 From Database Systems: A Practical Approach to Design, Implementation and Management. Thomas Connolly, Carolyn Begg. 1 IS220

More information

Lab # 2. Data Definition Language (DDL) Eng. Alaa O Shama

Lab # 2. Data Definition Language (DDL) Eng. Alaa O Shama The Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM 4113: Database Lab Lab # 2 Data Definition Language (DDL) Eng. Alaa O Shama October, 2015 Objective To be familiar

More information

Crystal Reports. Overview. Contents. Oracle Stored Procedures and Crystal Reports

Crystal Reports. Overview. Contents. Oracle Stored Procedures and Crystal Reports Overview This article provides information for Oracle stored procedures and Crystal Reports (CR). You will find detailed information on the following: Contents CR versions that support Oracle stored procedures.

More information

SQL: DML and Advanced Constructs Insert, Update, Delete, View, Index, Procedure, Transaction, Trigger

SQL: DML and Advanced Constructs Insert, Update, Delete, View, Index, Procedure, Transaction, Trigger Courses B0B36DBS, A7B36DBS: Database Systems Practical Class 08: SQL: DML and Advanced Constructs Insert, Update, Delete, View, Index, Procedure, Transaction, Trigger Martin Svoboda 11. 4. 2017 Faculty

More information

Adding Stored Functions to an idashboards Oracle Data Source

Adding Stored Functions to an idashboards Oracle Data Source Adding Stored Functions to an idashboards Oracle Data Source Introduction: idashboards only supports Oracle Functions when it comes to Oracle data sources. It is required for a function to result in at

More information

Things to remember when working with Oracle... (for UDB specialists)

Things to remember when working with Oracle... (for UDB specialists) TRAINING & CONSULTING Things to remember when working with Oracle... (for UDB specialists) Kris Van Thillo, ABIS ABIS Training & Consulting www.abis.be training@abis.be 2013 Document number: DB2LUWUserMeeting2013Front.fm

More information

Safe Harbor Statement

Safe Harbor Statement Safe Harbor Statement The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment

More information

Chapter 13 Introduction to SQL Programming Techniques

Chapter 13 Introduction to SQL Programming Techniques Chapter 13 Introduction to SQL Programming Techniques Copyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 13 Outline Database Programming: Techniques and Issues Embedded

More information

Oracle PLSQL Study Material ORACLE & PL/SQL STUDY MATERIAL

Oracle PLSQL Study Material ORACLE & PL/SQL STUDY MATERIAL ORACLE & PL/SQL STUDY MATERIAL Table of Contents 1 OVERVIEW OF ORACLE... 5 1.1 THE DATABASE... 5 1.2 THE ORACLE INSTANCE... 8 2 BASIC ORACLE OBJECTS... 12 3 TRANSACTIONS IN ORACLE... 14 4 OVERVIEW OF PL/SQL...

More information

Chapter # 7 Introduction to Structured Query Language (SQL) Part I

Chapter # 7 Introduction to Structured Query Language (SQL) Part I Chapter # 7 Introduction to Structured Query Language (SQL) Part I Introduction to SQL SQL functions fit into two broad categories: Data definition language Data manipulation language Basic command set

More information

Upgrade Developer Forms 4.5 to Oracle Forms 6. An Oracle Technical White Paper March 2000

Upgrade Developer Forms 4.5 to Oracle Forms 6. An Oracle Technical White Paper March 2000 Upgrade Developer Forms 4.5 to Oracle Forms 6 An Oracle Technical White Paper WHY UPGRADE? Upgrade Developer Forms 4.5 to Oracle Forms 6 ORACLE APPLICATIONS MANUFACTURING AND FINANCIALS FORMS UPGRADE 2

More information

Oracle Database: Introduction to SQL/PLSQL Accelerated

Oracle Database: Introduction to SQL/PLSQL Accelerated Oracle University Contact Us: Landline: +91 80 67863899 Toll Free: 0008004401672 Oracle Database: Introduction to SQL/PLSQL Accelerated Duration: 5 Days What you will learn This Introduction to SQL/PLSQL

More information

Creating Oracle Tables ( Lesson 2 )

Creating Oracle Tables ( Lesson 2 ) Creating Oracle Tables ( Lesson 2 ) 2.1 Demo Application During this course we will be using Application Express and Oracle 10g Express Edition to create an application. The application will be used to

More information

EMBEDDED SQL Part 1: Static Statements

EMBEDDED SQL Part 1: Static Statements EMBEDDED SQL Part 1: Static Statements 1-1 List of Slides 1 2 Database Applications 3 How does client/server work? 4 Embedded SQL 5 Embedded SQL (cont.) 6 Application Structure 7 Declarations 8 Host Variables

More information

Oracle PL/SQL. DUMmIES. by Michael Rosenblum and Dr. Paul Dorsey FOR

Oracle PL/SQL. DUMmIES. by Michael Rosenblum and Dr. Paul Dorsey FOR Oracle PL/SQL FOR DUMmIES by Michael Rosenblum and Dr. Paul Dorsey Oracle PL/SQL For Dummies Published by Wiley Publishing, Inc. 111 River Street Hoboken, NJ 07030-5774 www.wiley.com Copyright 2006 by

More information

Oracle BPEL Process Manager Demonstration

Oracle BPEL Process Manager Demonstration January, 2007 1 Oracle BPEL Process Manager Demonstration How to create a time scheduler for a BPEL process using the Oracle Database Job scheduler by Dr. Constantine Steriadis (constantine.steriadis@oracle.com)

More information

Creating and Managing Tables Schedule: Timing Topic

Creating and Managing Tables Schedule: Timing Topic 9 Creating and Managing Tables Schedule: Timing Topic 30 minutes Lecture 20 minutes Practice 50 minutes Total Objectives After completing this lesson, you should be able to do the following: Describe the

More information

Lecture 7 Stored procedure

Lecture 7 Stored procedure ITM-661 ระบบฐานข อม ล (Database system) Walailak - 2013 Lecture 7 Stored procedure Walailak University T. Connolly, and C. Begg, Database Systems: A Practical Approach to Design, Implementation, and Management,

More information

Oracle Autonomous Data Warehouse: These Are the Droids You re Looking For

Oracle Autonomous Data Warehouse: These Are the Droids You re Looking For Oracle Autonomous Data Warehouse: These Are the Droids You re Looking For November 1, 2018 Jim Czuprynski President Zero Defect Computing, Inc. @JimTheWhyGuy Jim Czuprynski: Credentials 35+ years of database-centric

More information

SQL Functionality SQL. Creating Relation Schemas. Creating Relation Schemas

SQL Functionality SQL. Creating Relation Schemas. Creating Relation Schemas SQL SQL Functionality stands for Structured Query Language sometimes pronounced sequel a very-high-level (declarative) language user specifies what is wanted, not how to find it number of standards original

More information

COSC344 Database Theory and Applications. Lecture 5 SQL - Data Definition Language. COSC344 Lecture 5 1

COSC344 Database Theory and Applications. Lecture 5 SQL - Data Definition Language. COSC344 Lecture 5 1 COSC344 Database Theory and Applications Lecture 5 SQL - Data Definition Language COSC344 Lecture 5 1 Overview Last Lecture Relational algebra This Lecture Relational algebra (continued) SQL - DDL CREATE

More information

XQ: An XML Query Language Language Reference Manual

XQ: An XML Query Language Language Reference Manual XQ: An XML Query Language Language Reference Manual Kin Ng kn2006@columbia.edu 1. Introduction XQ is a query language for XML documents. This language enables programmers to express queries in a few simple

More information

PL/SQL. Exception. When the PL/SQL engine cannot execute the PLSQL block it raise an error. Every Oracle error has an error number

PL/SQL. Exception. When the PL/SQL engine cannot execute the PLSQL block it raise an error. Every Oracle error has an error number PL/SQL Exception When the PL/SQL engine cannot execute the PLSQL block it raise an error. Every Oracle error has an error number Exceptions must be handled by name. PL/SQL predefines some common Oracle

More information

Oracle. PL/SQL Procedural Language

Oracle. PL/SQL Procedural Language PL/SQL Procedural Language based on Günther Stürner: 7 - A User s and Developer s Guide Michael R. Ault: 7.0 Administration & Management 8.16.. 10 R2 manuals Feuerstein et al: PL/SQL Language Application

More information

Db2 User-Defined Functions

Db2 User-Defined Functions Db2 User-Defined Functions David Simpson Themis Education dsimpson@themisinc.com www.themisinc.com @ThemisDave @ThemisTraining Themis Education Most complete DB2 Curriculum in the industry Offerings include

More information

Oracle SQL & PL SQL Course

Oracle SQL & PL SQL Course Oracle SQL & PL SQL Course Complete Practical & Real-time Training Job Support Complete Practical Real-Time Scenarios Resume Preparation Lab Access Training Highlights Placement Support Support Certification

More information

ORACLE TRAINING CURRICULUM. Relational Databases and Relational Database Management Systems

ORACLE TRAINING CURRICULUM. Relational Databases and Relational Database Management Systems ORACLE TRAINING CURRICULUM Relational Database Fundamentals Overview of Relational Database Concepts Relational Databases and Relational Database Management Systems Normalization Oracle Introduction to

More information

4 Application Programming

4 Application Programming 4 Application Programming 4.1 PL/SQL 4.1.1 Introduction The development of database applications typically requires language constructs similar to those that can be found in programming languages such

More information

DB2 9.7 Vendor Enablement Preview. Bob Harbus WW DB2 Evangelist IBM Toronto Lab. IBM Software Group

DB2 9.7 Vendor Enablement Preview. Bob Harbus WW DB2 Evangelist IBM Toronto Lab. IBM Software Group IBM Software Group DB2 9.7 Vendor Enablement Preview Bob Harbus WW DB2 Evangelist IBM Toronto Lab June 2009 Disclaimer: It is IBM's current intent to make these technologies available in the next release.

More information

Introduction to SQL/PLSQL Accelerated Ed 2

Introduction to SQL/PLSQL Accelerated Ed 2 Oracle University Contact Us: Local: 1800 103 4775 Intl: +91 80 67863102 Introduction to SQL/PLSQL Accelerated Ed 2 Duration: 5 Days What you will learn This Introduction to SQL/PLSQL Accelerated course

More information

Discuss setting up JDBC connectivity. Demonstrate a JDBC program Discuss and demonstrate methods associated with JDBC connectivity

Discuss setting up JDBC connectivity. Demonstrate a JDBC program Discuss and demonstrate methods associated with JDBC connectivity Objectives Discuss setting up JDBC connectivity. Demonstrate a JDBC program Discuss and demonstrate methods associated with JDBC connectivity Setting Up JDBC Before you can begin to utilize JDBC, you must

More information

SQL: Concepts. Todd Bacastow IST 210: Organization of Data 2/17/ IST 210

SQL: Concepts. Todd Bacastow IST 210: Organization of Data 2/17/ IST 210 SQL: Concepts Todd Bacastow IST 210: Organization of Data 2/17/2004 1 Design questions How many entities are there? What are the major entities? What are the attributes of each entity? Is there a unique

More information

Key Data Warehousing Features in Oracle10g: A Comparative Performance Analysis. An Oracle White Paper April 2005

Key Data Warehousing Features in Oracle10g: A Comparative Performance Analysis. An Oracle White Paper April 2005 Key Data Warehousing Features in Oracle10g: A Comparative Performance Analysis An Oracle White Paper April 2005 Key Data Warehousing Features in Oracle10g: A Comparative Performance Analysis Executive

More information

PBarel@Qualogy.com http://blog.bar-solutions.com About me Patrick Barel Working with Oracle since 1997 Working with PL/SQL since 1999 Playing with APEX since 2003 (mod_plsql) ACE since 2011 OCA since December

More information

4 Application Programming

4 Application Programming 4 Application Programming 4.1 PL/SQL 4.1.1 Introduction The development of database applications typically requires language constructs similar to those that can be found in programming languages such

More information

SQL DATA DEFINITION LANGUAGE

SQL DATA DEFINITION LANGUAGE SQL DATA DEFINITION LANGUAGE DATABASE SCHEMAS IN SQL SQL is primarily a query language, for getting information from a database. DML: Data Manipulation Language SFWR ENG 3DB3 FALL 2016 MICHAEL LIUT (LIUTM@MCMASTER.CA)

More information

Oracle PL/SQL Best Practices Part 1. John Mullins

Oracle PL/SQL Best Practices Part 1. John Mullins Oracle PLSQL Best Practices Part 1 John Mullins jmullins@themisinc.com www.themisinc.com www.themisinc.comwebinars Presenter John Mullins Themis Inc. (jmullins@themisinc.com) 30+ years of Oracle experience

More information

Database Systems CSE 303. Lecture 02

Database Systems CSE 303. Lecture 02 Database Systems CSE 303 Lecture 02 2016 Structure Query Language (SQL) 1 Today s Outline (mainly from chapter 2) SQL introduction & Brief History Relational Model Data in SQL Basic Schema definition Keys

More information

Database Systems CSE 303. Lecture 02

Database Systems CSE 303. Lecture 02 Database Systems CSE 303 Lecture 02 2016 Structure Query Language (SQL) Today s Outline (mainly from chapter 2) SQL introduction & Brief History Relational Model Data in SQL Basic Schema definition Keys

More information

Meet MariaDB Vicențiu Ciorbaru Software MariaDB Foundation * * 2017 MariaDB Foundation

Meet MariaDB Vicențiu Ciorbaru Software MariaDB Foundation * * 2017 MariaDB Foundation Meet MariaDB 10.3 Vicențiu Ciorbaru Software Engineer @ MariaDB Foundation vicentiu@mariadb.org * * What is MariaDB? MariaDB 5.1 (Feb 2010) - Making builds free MariaDB 5.2 (Nov 2010) - Community features

More information

The Calculator CS571. Abstract syntax of correct button push sequences. The Button Layout. Notes 16 Denotational Semantics of a Simple Calculator

The Calculator CS571. Abstract syntax of correct button push sequences. The Button Layout. Notes 16 Denotational Semantics of a Simple Calculator CS571 Notes 16 Denotational Semantics of a Simple Calculator The Calculator Two functions: + and * Unbounded natural numbers (no negatives Conditional: if-then-else Parentheses One memory register 1of

More information

Vendor: Oracle. Exam Code: 1Z Exam Name: Oracle Database: SQL Fundamentals I. Q&As: 292

Vendor: Oracle. Exam Code: 1Z Exam Name: Oracle Database: SQL Fundamentals I. Q&As: 292 Vendor: Oracle Exam Code: 1Z1-051 Exam Name: Oracle Database: SQL Fundamentals I Q&As: 292 QUESTION 1 Evaluate the SQL statement: TRUNCATE TABLE DEPT; Which three are true about the SQL statement? (Choose

More information