This document provides demos, tips and techniques for Oracle Forms 10g. It contains descriptions of several sample dialogs that demonstrate advanced features in Oracle Forms 10g such as different types of canvases, blocks based on views, stored procedures and relational tables with collections. The samples show how to dynamically populate blocks based on collections, handle inserts/updates/deletes to underlying tables, and manage multiple data sources.
Constraints enforce rules at the table level to maintain data integrity. The main types are NOT NULL, UNIQUE, PRIMARY KEY, FOREIGN KEY, and CHECK. Constraints can be created at the column or table level and are defined using SQL's CREATE TABLE and ALTER TABLE statements. User can view existing constraints and their properties in data dictionary views like USER_CONSTRAINTS and USER_CONS_COLUMNS.
MySQL is a database management system where data is stored in tables which consist of columns and rows. The document provides instructions on installing MySQL on Linux using RPM files and setting the root password. It also describes some basic MySQL concepts like queries, creating/modifying tables, and joining tables.
MySQL is an open-source relational database management system that uses SQL and runs a server providing multi-user access to databases. It allows users to perform queries and make changes to data through commands like SELECT, INSERT, UPDATE, DELETE. Stored procedures and functions allow users to write and save blocks of SQL code for repeated execution with consistent results.
This document provides information about partitioning in MySQL 5.1 presented by Sarah Sproehnle and Giuseppe Maxia. It discusses partitioning types (range, hash, list, key), partitioning expressions, partitioning pruning, benchmarking partitions, partitioning with different storage engines, partitioning by dates, and optimizing queries on partitioned tables.
This document provides an overview of key concepts in database management systems including:
1. It defines common database terms like database, data file, record, field, DBMS, database handler, RDBMS, ORDBMS, and OODBMS.
2. It describes different types of database management systems like relational, object-relational, and object-oriented DBMS.
3. It discusses SQL commands and transactions including DDL, DML, DCL, and TCL.
4. It covers database design concepts like constraints, data types, joins, views, and materialized views.
- A table is a logical representation of data stored in a database. It holds data in rows and columns.
- Data Definition Language (DDL) commands like CREATE, ALTER, TRUNCATE, DROP are used to create, modify and delete database objects like tables.
- Data Manipulation Language (DML) commands like INSERT, SELECT, UPDATE, DELETE are used to query and manipulate data in existing tables.
The document discusses data manipulation language (DML) statements in SQL. It describes how to insert rows into a table using INSERT, update rows using UPDATE, and delete rows from a table using DELETE. It also covers transaction control using COMMIT to save changes permanently and ROLLBACK to undo pending changes back to a savepoint.
Oracle - Program with PL/SQL - Lession 03Thuan Nguyen
This document discusses interacting with Oracle Server objects through PL/SQL. It covers:
1. Writing SELECT, DML, and transaction control statements in PL/SQL to extract, modify and manage data.
2. Using implicit cursors and attributes to check outcomes of SQL statements.
3. Best practices for naming conventions to avoid ambiguities between local and database identifiers.
This document discusses data manipulation in Oracle databases. It describes how to insert, update, and delete rows from tables using DML statements like INSERT, UPDATE, and DELETE. It also covers transaction management using COMMIT, ROLLBACK, and SAVEPOINT statements to control when changes are committed to the database or rolled back. Key aspects covered include inserting new rows, updating and deleting specific rows or all rows, and handling integrity constraints and transactions.
This document provides instructions and examples for using the MySQL database system. It discusses MySQL concepts like database, tables, rows, and columns. It also demonstrates common SQL commands like CREATE, SELECT, INSERT, UPDATE, DROP. Examples show how to create databases and tables, insert and query data, use functions, conditions and wildcards. Script files demonstrate populating tables with sample data.
The document discusses different ways to avoid mutating table errors when using triggers in Oracle:
1. Use a compound trigger instead of a row-level trigger to avoid the error. A compound trigger allows initializing variables before and after statements to prevent mutating errors.
2. An example is given of a compound trigger that enforces a business rule limiting salary increases to 10% of the department average without causing a mutating error.
3. The mutating error occurs when a trigger references the table that owns the trigger, preventing the trigger from seeing changes made by its own statement.
Abstract: Developers - If you are not using Bulk Binds you are not writing PL/SQL efficiently!
Bulk binding has been around for a long time, yet there are sites out there that don't utilise this feature to its full extent, if at all. Every release of Oracle improves on this functionality so obviously it's a topic worthy of consistent awareness.
In PL/SQL and SQL, there are a few nifty features related to bulk binding you may not have seen - it's not all about BULK COLLECT. Whether you're on 8i, 11g or anything in between, you'll benefit from the concepts described in this seminar and become a Bulk Binding Baron!
This document provides an overview of the Oracle Data Manipulation Language (DML) and Transaction Control Language (TCL). It describes the basic DML commands - INSERT, UPDATE, and DELETE - which are used to manipulate data in database tables without changing the table structure. Examples are given for each DML command. It also discusses transactions, which group DML statements, and the TCL commands - COMMIT and ROLLBACK - used to control transactions.
The document discusses basic commands in MySQL including CREATE, SELECT, DELETE, INSERT, UPDATE, and DROP commands. It also covers procedures and functions. Finally, it provides examples of how to export a MySQL database using mysqldump and import a database using the mysql command.
This document provides an overview of basic SQL statements and SQL*Plus commands. It covers capabilities of SELECT statements, executing a basic SELECT statement, writing SQL statements, selecting specific columns, using arithmetic expressions and operators, defining aliases and literals, eliminating duplicate rows, and interacting with SQL*Plus through commands like editing, saving, and running SQL statements.
This document discusses various SQL concepts including data types, data definition language (DDL), data manipulation language (DML), constraints, and transactions. It provides examples of creating tables with different data types, inserting, updating, and deleting data, setting constraints, and using transactions like commit and rollback. Key points covered include creating a table with a timestamp column, using case expressions, cursor for loops, and nested procedures and exception handling.
Oracle - Program with PL/SQL - Lession 07Thuan Nguyen
1. Cursors can be declared with parameters to return different active sets each time the cursor is opened. Parameters allow filtering the cursor result set.
2. The FOR UPDATE clause locks rows before updating or deleting them using a cursor. It is required when updating or deleting the current row referenced by the WHERE CURRENT OF clause.
3. The WHERE CURRENT OF clause references the current row of an explicit cursor and is used with the FOR UPDATE clause to update or delete the row currently being processed by the cursor.
The document lists various commands and functions available in FoxPro, including:
- Date, time, and mathematical functions to return values like the current date, square root, natural logarithm, etc.
- String functions to manipulate and retrieve parts of character strings like LEFT, RIGHT, LEN, SUBSTR, etc.
- Financial functions to calculate loan payments, present value, etc.
- System information functions to get the cursor position, disk space, last update date of a table, and more.
3. writing MySql plugins for the information schemaRoland Bouman
The document discusses how to write MySQL 5.1 Information Schema plugins. It covers defining the column layout using ST_FIELD_INFO, implementing a fill function to populate the table, and hooking up the column layout and fill function via the plugin initialization function by assigning them to the appropriate ST_SCHEMA_TABLE members.
1. The document discusses various SQL commands for creating, manipulating, and querying database tables. It covers commands like CREATE TABLE, INSERT, SELECT, UPDATE, DELETE, ALTER TABLE, COMMENT, and more.
2. Mathematical functions like COUNT, MAX, MIN, ROUND, TRUNC are described along with logical and comparison operators.
3. The document provides examples of using operators, functions, joins and grouping with detailed explanations.
Constraints enforce rules at the table level to maintain data integrity. The main types of constraints are NOT NULL, UNIQUE, PRIMARY KEY, FOREIGN KEY, and CHECK. Constraints can be created at table creation or added later using ALTER TABLE. Constraint information is stored in data dictionary views like USER_CONSTRAINTS and USER_CONS_COLUMNS which can be queried.
This document discusses various data manipulation techniques using PL/SQL including commenting code, using functions, operators, and commands like SELECT, INSERT, UPDATE, DELETE, and MERGE. It provides examples of declaring variables, selecting data into variables, inserting, updating, deleting records with the different commands. The last slide thanks the viewer and provides a link for more Oracle and data mining resources.
The document discusses various topics related to PHP files and MySQL databases, including opening, reading, writing, and closing PHP files, as well as inserting, updating, deleting, joining, and aggregating data in MySQL tables. Functions covered include fopen(), fread(), fwrite(), fclose(), INSERT, UPDATE, DELETE, JOIN, GROUP BY, COUNT, MAX, SUM, STDDEV, VARIANCE. File modes, database syntax, and case studies using MySQL are also summarized.
This document discusses database management systems and SQL. It provides examples of creating tables, inserting and retrieving data using commands like SELECT, UPDATE, and DELETE. It also covers SQL sublanguages, data types, logical operators, and pattern matching operators. Key points include that a DBMS manages a database using software, SQL is the standard language used to communicate with databases, and tables are used to store data in rows and columns.
This document discusses using Ruby to create terminal-based applications. It provides an overview of terminal graphics libraries like curses and ncurses that enable creating user interfaces in terminals. It then describes the Ruby gems RbCurse and Canis that provide a widget toolkit for building terminal apps in Ruby. The document demonstrates creating a terminal application skeleton and includes code examples of common widgets.
The document provides an overview of common SQL queries and clauses used for creating and manipulating tables and selecting data. Key queries covered include CREATE TABLE, ALTER TABLE, INSERT, SELECT, WHERE, DISTINCT, UPDATE, DELETE, TRUNCATE, ORDER BY, JOIN, AND/OR, IN, BETWEEN, and DROP TABLE. Aggregate functions like AVG, MIN, MAX and the GROUP BY clause are also summarized.
This document contains the resume of Vivian Qiu. It summarizes her work experience, including positions as a legal secretary at Allbright Law Offices from 2008-2015 where she provided secretarial support to partners, and as secretary to the general manager at Minmetals Land Limited from 2009-2010. It also lists international internship experiences at the US Consulate General in Shanghai and DuPont China Holding Co., Ltd. Her education is included which is a bachelor's degree in social work from East China University of Politics and Law. Voluntary experience is described working with organizations helping autistic children, blood donation, and anti-drug efforts.
The document summarizes the findings of a case study on guidance professionals' awareness and understanding of the National Framework of Qualifications (NFQ) in Ireland. It finds that:
1) Guidance professionals working directly with learners, such as career advisors and school counselors, have the strongest awareness and understanding of the NFQ levels relevant to their work.
2) Adult learners and secondary students have varying awareness depending on their engagement with education, with adult learners seeking to understand where their prior learning fits on the NFQ.
3) National organizations like FETAC, FÁS, and the NCGE have taken steps to implement the NFQ within their programs and guidance. However,
Oracle - Program with PL/SQL - Lession 03Thuan Nguyen
This document discusses interacting with Oracle Server objects through PL/SQL. It covers:
1. Writing SELECT, DML, and transaction control statements in PL/SQL to extract, modify and manage data.
2. Using implicit cursors and attributes to check outcomes of SQL statements.
3. Best practices for naming conventions to avoid ambiguities between local and database identifiers.
This document discusses data manipulation in Oracle databases. It describes how to insert, update, and delete rows from tables using DML statements like INSERT, UPDATE, and DELETE. It also covers transaction management using COMMIT, ROLLBACK, and SAVEPOINT statements to control when changes are committed to the database or rolled back. Key aspects covered include inserting new rows, updating and deleting specific rows or all rows, and handling integrity constraints and transactions.
This document provides instructions and examples for using the MySQL database system. It discusses MySQL concepts like database, tables, rows, and columns. It also demonstrates common SQL commands like CREATE, SELECT, INSERT, UPDATE, DROP. Examples show how to create databases and tables, insert and query data, use functions, conditions and wildcards. Script files demonstrate populating tables with sample data.
The document discusses different ways to avoid mutating table errors when using triggers in Oracle:
1. Use a compound trigger instead of a row-level trigger to avoid the error. A compound trigger allows initializing variables before and after statements to prevent mutating errors.
2. An example is given of a compound trigger that enforces a business rule limiting salary increases to 10% of the department average without causing a mutating error.
3. The mutating error occurs when a trigger references the table that owns the trigger, preventing the trigger from seeing changes made by its own statement.
Abstract: Developers - If you are not using Bulk Binds you are not writing PL/SQL efficiently!
Bulk binding has been around for a long time, yet there are sites out there that don't utilise this feature to its full extent, if at all. Every release of Oracle improves on this functionality so obviously it's a topic worthy of consistent awareness.
In PL/SQL and SQL, there are a few nifty features related to bulk binding you may not have seen - it's not all about BULK COLLECT. Whether you're on 8i, 11g or anything in between, you'll benefit from the concepts described in this seminar and become a Bulk Binding Baron!
This document provides an overview of the Oracle Data Manipulation Language (DML) and Transaction Control Language (TCL). It describes the basic DML commands - INSERT, UPDATE, and DELETE - which are used to manipulate data in database tables without changing the table structure. Examples are given for each DML command. It also discusses transactions, which group DML statements, and the TCL commands - COMMIT and ROLLBACK - used to control transactions.
The document discusses basic commands in MySQL including CREATE, SELECT, DELETE, INSERT, UPDATE, and DROP commands. It also covers procedures and functions. Finally, it provides examples of how to export a MySQL database using mysqldump and import a database using the mysql command.
This document provides an overview of basic SQL statements and SQL*Plus commands. It covers capabilities of SELECT statements, executing a basic SELECT statement, writing SQL statements, selecting specific columns, using arithmetic expressions and operators, defining aliases and literals, eliminating duplicate rows, and interacting with SQL*Plus through commands like editing, saving, and running SQL statements.
This document discusses various SQL concepts including data types, data definition language (DDL), data manipulation language (DML), constraints, and transactions. It provides examples of creating tables with different data types, inserting, updating, and deleting data, setting constraints, and using transactions like commit and rollback. Key points covered include creating a table with a timestamp column, using case expressions, cursor for loops, and nested procedures and exception handling.
Oracle - Program with PL/SQL - Lession 07Thuan Nguyen
1. Cursors can be declared with parameters to return different active sets each time the cursor is opened. Parameters allow filtering the cursor result set.
2. The FOR UPDATE clause locks rows before updating or deleting them using a cursor. It is required when updating or deleting the current row referenced by the WHERE CURRENT OF clause.
3. The WHERE CURRENT OF clause references the current row of an explicit cursor and is used with the FOR UPDATE clause to update or delete the row currently being processed by the cursor.
The document lists various commands and functions available in FoxPro, including:
- Date, time, and mathematical functions to return values like the current date, square root, natural logarithm, etc.
- String functions to manipulate and retrieve parts of character strings like LEFT, RIGHT, LEN, SUBSTR, etc.
- Financial functions to calculate loan payments, present value, etc.
- System information functions to get the cursor position, disk space, last update date of a table, and more.
3. writing MySql plugins for the information schemaRoland Bouman
The document discusses how to write MySQL 5.1 Information Schema plugins. It covers defining the column layout using ST_FIELD_INFO, implementing a fill function to populate the table, and hooking up the column layout and fill function via the plugin initialization function by assigning them to the appropriate ST_SCHEMA_TABLE members.
1. The document discusses various SQL commands for creating, manipulating, and querying database tables. It covers commands like CREATE TABLE, INSERT, SELECT, UPDATE, DELETE, ALTER TABLE, COMMENT, and more.
2. Mathematical functions like COUNT, MAX, MIN, ROUND, TRUNC are described along with logical and comparison operators.
3. The document provides examples of using operators, functions, joins and grouping with detailed explanations.
Constraints enforce rules at the table level to maintain data integrity. The main types of constraints are NOT NULL, UNIQUE, PRIMARY KEY, FOREIGN KEY, and CHECK. Constraints can be created at table creation or added later using ALTER TABLE. Constraint information is stored in data dictionary views like USER_CONSTRAINTS and USER_CONS_COLUMNS which can be queried.
This document discusses various data manipulation techniques using PL/SQL including commenting code, using functions, operators, and commands like SELECT, INSERT, UPDATE, DELETE, and MERGE. It provides examples of declaring variables, selecting data into variables, inserting, updating, deleting records with the different commands. The last slide thanks the viewer and provides a link for more Oracle and data mining resources.
The document discusses various topics related to PHP files and MySQL databases, including opening, reading, writing, and closing PHP files, as well as inserting, updating, deleting, joining, and aggregating data in MySQL tables. Functions covered include fopen(), fread(), fwrite(), fclose(), INSERT, UPDATE, DELETE, JOIN, GROUP BY, COUNT, MAX, SUM, STDDEV, VARIANCE. File modes, database syntax, and case studies using MySQL are also summarized.
This document discusses database management systems and SQL. It provides examples of creating tables, inserting and retrieving data using commands like SELECT, UPDATE, and DELETE. It also covers SQL sublanguages, data types, logical operators, and pattern matching operators. Key points include that a DBMS manages a database using software, SQL is the standard language used to communicate with databases, and tables are used to store data in rows and columns.
This document discusses using Ruby to create terminal-based applications. It provides an overview of terminal graphics libraries like curses and ncurses that enable creating user interfaces in terminals. It then describes the Ruby gems RbCurse and Canis that provide a widget toolkit for building terminal apps in Ruby. The document demonstrates creating a terminal application skeleton and includes code examples of common widgets.
The document provides an overview of common SQL queries and clauses used for creating and manipulating tables and selecting data. Key queries covered include CREATE TABLE, ALTER TABLE, INSERT, SELECT, WHERE, DISTINCT, UPDATE, DELETE, TRUNCATE, ORDER BY, JOIN, AND/OR, IN, BETWEEN, and DROP TABLE. Aggregate functions like AVG, MIN, MAX and the GROUP BY clause are also summarized.
This document contains the resume of Vivian Qiu. It summarizes her work experience, including positions as a legal secretary at Allbright Law Offices from 2008-2015 where she provided secretarial support to partners, and as secretary to the general manager at Minmetals Land Limited from 2009-2010. It also lists international internship experiences at the US Consulate General in Shanghai and DuPont China Holding Co., Ltd. Her education is included which is a bachelor's degree in social work from East China University of Politics and Law. Voluntary experience is described working with organizations helping autistic children, blood donation, and anti-drug efforts.
The document summarizes the findings of a case study on guidance professionals' awareness and understanding of the National Framework of Qualifications (NFQ) in Ireland. It finds that:
1) Guidance professionals working directly with learners, such as career advisors and school counselors, have the strongest awareness and understanding of the NFQ levels relevant to their work.
2) Adult learners and secondary students have varying awareness depending on their engagement with education, with adult learners seeking to understand where their prior learning fits on the NFQ.
3) National organizations like FETAC, FÁS, and the NCGE have taken steps to implement the NFQ within their programs and guidance. However,
This document discusses how Western cultures have affected traditional Vietnamese family life. It begins by providing context on the importance of family in Vietnamese culture and society. Since Vietnam's economic reforms in 1986, Western individualism and modernization have increasingly influenced Vietnamese families. Younger generations migrating to cities for work and education has led to a shift from extended to nuclear family structures. The document then examines characteristics of traditional Vietnamese families, which were largely shaped by Confucianism and emphasized collective identity, filial piety, and multi-generational living. Rural to urban migration due to industrialization has disrupted these family traditions and roles. Overall, the document analyzes the tensions between preserving cultural traditions and adapting to social changes from Western influence.
This document discusses a research study on the post-merger performance of acquiring firms from different industries in India between 1991 and 2003. The study found minor variations in the impact on operating performance following mergers across industries. Mergers seemed to have a slightly positive impact on profitability for banking and finance firms. Pharmaceuticals, textiles, and electrical equipment saw a marginal negative impact on profitability and returns. Chemicals and agri-products saw a significant decline in profitability margins and returns on investment post-merger. The document provides background on mergers and acquisitions in India and a literature review on previous studies examining the financial performance of companies post-merger.
Este documento resume los principales cambios introducidos por el nuevo Código Civil y Comercial de la Nación en relación a la responsabilidad parental y la concepción de los niños como sujetos de pleno derecho. El nuevo código elimina el concepto de "patria potestad" y lo reemplaza por el de "responsabilidad parental", concibiéndose a los niños como personas con derechos y no como incapaces. También incorpora nuevos conceptos como "adolescentes" y reconoce diversas formas de familias. El objetivo principal es garantizar el interés superior
This document discusses various topics related to dynamic websites using PHP with Oracle DB including:
1. Quizzes on database relations and queries
2. Installing and connecting to Oracle 11g
3. Using SQL Developer tool
4. An overview of PL/SQL including blocks, conditions, loops
5. Stored procedures and functions
6. Triggers
7. Basic HTML markup
The document discusses various data modification operations and how much redo is generated for each. It shows that inserts, deletes, updates, and DML on indexed tables can generate significant redo, while direct path inserts on NOLOGGING tables can minimize redo generation. The document also explains why some redo is always needed even for temporary changes, to support functions like media recovery and standby databases.
Contents
COSC 2436 – LAB4
TITLE .............................................................................................................................................................. 1 TIME TO COMPLETE ...................................................................................................................................... 1 COURSE OBJECTIVES – LEARNING OUTCOME .............................................................................................. 1 LAB OBJECTIVES ............................................................................................................................................ 2 SKILLS REQUIRED........................................................................................................................................... 2 HOW TO DO EACH PART ............................................................................................................................... 2 REQUIREMENT .............................................................................................................................................. 3
LAB4 PART1 ............................................................................................................................................... 3
LAB4 PART2 ............................................................................................................................................... 4 HOW TO TURN IN THE LAB ........................................................................................................................... 6 HOW TO GRADE THE LAB.............................................................................................................................. 6
Note: in the instruction of the lab change “yourLastName” to your last name. In the example, change Smith to your last name, change James Smith to your full name, change Mary Lane to the name that users type in from the keyboard (if these words are in this instruction)
TITLE
Restricted Data Structure: Stack and Queue -Evaluating the infixed Math expression
TIME TO COMPLETE
Two week
COURSE OBJECTIVES
–
LEARNING OUTCOME
[LO1]
Provide UML class diagram and the code of data type classes
Provide the pseudo-code or flowchart based on the requirement of a project before writing the code of the driver class. Also, can access data members of data type classes
Describe and implement the inheritance relationship between super class and child classes.
Can use abstract classes or interface and apply polymorphism to the real life problem project
[LO3]
Describe and implement operations of Stack and Queue structures. Using Stack/Queue to the real life problem project
LAB OBJECTIVES
-Complete the lab on time (Time Management) -Can write the pseudo-code
-Can provide UML of data type class
-Can write comments in the program
-Can write the code of data type classes including data members, no-argument constructor, parameter constructors, mutator methods, ass.
ER Publication,
IJETR, IJMCTR,
Journals,
International Journals,
High Impact Journals,
Monthly Journal,
Good quality Journals,
Research,
Research Papers,
Research Article,
Free Journals, Open access Journals,
erpublication.org,
Engineering Journal,
Science Journals,
This document discusses collections in Oracle PL/SQL and provides examples of using different collection types such as index-by tables, nested tables, and varrays. It describes collection methods like EXISTS, COUNT, FIRST, LAST, etc. It also covers multiset operations on collections and creating multidimensional collections using record and nested table types. Triggers in Oracle are briefly introduced, including the different timing points of before/after statement and before/after each row triggers.
Ass2-Descriptor.docx1 Problem DescriptionThe objective of .docxfredharris32
Ass2-Descriptor.docx
1 Problem Description
The objective of this assignment is to:
(1) Enhance your understanding of Relational Database Design & Implementation, and
(2) Understand & practice with PL/SQL in particular database interaction, functions & procedures, check constraints, triggers and packages.
The assignment will consist of four (4) tasks.
Task one will involve the extension of the relational model from assignment 1 and the development of the code for maintaining the consistency of the database.
Task two will involve the development of several functions and procedures which will be encapsulated in a package with a separate specification (header) and a body (implementation).
Task three will involve developing a database trigger.
Task four will involve testing the code developed as part of tasks one to three. You may want to insert a sufficient number of rows into the tables so that you can demonstrate the workings of all the code components.
Methodology
Using your solutions to assignments 1 & 2, create the DDL/SQL script file to create the tables and attributes (dropping them all beforehand of course).
Write the code for Task one in a separate SQL script and test it to check for errors.
Write the package specification and the package body in two separate SQL scripts.
Write the SQL script file to insert the records (at least five records per table) into the relevant tables so that you can test the functions and procedures provided in the package above.
** Refer to the Oracle 11g documentation files when necessary.
Compile all the separate SQL scripts together into a single script (Assignment2.sql).
Place the test results into your report (Assignment2.doc).
The EER diagram for Task One from the Diagnostic Assignment:
Note: conductTest is a relationship among Airplane, Technician, Senior_Technician and Testinfo with attributes: data, score, and hours. And service is a relationship among Flight, Technician, and Senior_ Technician with attribute date and time.
2 Task Specifications
Task 1
You are required to add another attribute called NoofPassengers to each flight to record the number of passengers booked on that flight. You are also required to ensure the consistency requirement that NoofPassengers does not exceed the capacity of the airplane that serves that flight.
Discuss how you could maintain the consistency of the database. This discussion should go in the report. Then revise your DDL script from assignment 1 to add NoofPassengers to the relevant flight table as well as implementing the necessary SQL and/or PL/SQL code to maintain the consistency of the database. Place the revised DDL statements and the code in your SQL script.
Task 2
Write the package body for the following package specification. Place the package specification and the package body in your SQL script. The marks for each procedure are of equal value.
create or replace package assignment2
is
procedure ...
Ive posted 3 classes after the instruction that were given at star.pdfdeepaarora22
I\'ve posted 3 classes after the instruction that were given at start
You will implement and test a PriorityQueue class, where the items of the priority queue are
stored on a linked list. The material from Ch1 ~ 8 of the textbook can help you tremendously.
You can get a lot of good information about implementing this assignment from chapter 8.
There are couple notes about this assignment. 1. Using structure Node with a pointer point to
Node structure to create a linked list, the definition of the Note structure is in the priority queue
header file (pqueue1.h). 2. Using a typedef statement to define the underlying data type, we can
easily change to a new data type on all the typedef data type by change one statement. 3.
Abandoning the usage of linked list toolkit, all the needed function will be implemented in the
class.
I want to mention it again you that you are welcome to use more advance skills than the
techniques introduce in the textbook to do the assignment. But the implemented class needs to
pass the examining file to get credit.
Following is an introduction to some files in this program.
pqueue1.h is the headers file for this first version of the PriorityQueue class. You can start from
this version and add your name and other documentation information at the top. Please look into
and understand the structure Note. Without understanding this, you will have tough time to finish
this project. Reading through this file carefully you need to know what functions you need to
implement and the preconditions and postcondition of each function. This file should be a good
guide to your implementation of the class. By the way if a member function of a class is an inline
function, it is implemented in this file. You don’t need to redo it in the implementation file which
is pqueue1.cpp.
pqueue1.cpp is the implementation file for the PriorityQueue class. You need to create this file
and implement all the function defined in the pqueue1.cpp. I want to bring to you attention that
the PriorityQueue\'s linked list consists of allocating memory. So we have to define a copy
constructor, an assignment operator, and also a destructor to cope with the demand of dynamic
memories allocation.
pqtest.cpp is the same style interactive test program that you used in the previous assignments.
You can open it with your editor or import it to a compiler project to run with the pqueue1.cpp
and pqueue1.h.
pqexam1.cpp is the same style non-interactive examine program as you use in the previous
assignment. You can add this file to a compiler to run with the pqueue1.cpp and pqueue1.h to
grade your pqueue1.cpp implementation.
CISP430V4A4Exam.exe is an executable file which you can generate this file by compiling and
running the pqexam1.cpp, pqueue1.cpp (proper implemented) and pqueue1.h. When you click it
you can see the following results.
file one (pqexam1.cpp)
#include // Provides memcpy.
#include // Provides size_t.
#include \"pqueue1.h\" // Provides the PriorityQueue cl.
POSTGRESQL is an open-source, full-featured relational database. This presentation gives an overview of the Postgres 11 release.
Creative Commons Attribution License http://momjian.us/presentations
Last updated: September, 2018
This document summarizes various control structures in C++ that allow programs to make decisions and repeat code. It describes conditional structures like if/else that execute code based on conditions. It also covers iteration structures like while, do-while, and for loops that repeat code. Additionally, it mentions jump statements like break, continue, goto that change the flow of loops. It provides examples to illustrate how each control structure works.
The document discusses various techniques for optimizing database performance in Oracle, including:
- Using the cost-based optimizer (CBO) to choose the most efficient execution plan based on statistics and hints.
- Creating appropriate indexes on columns used in predicates and queries to reduce I/O and sorting.
- Applying constraints and coding practices like limiting returned rows to improve query performance.
- Tuning SQL statements through techniques like predicate selectivity, removing unnecessary objects, and leveraging indexes.
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.
The document describes how to use the vtlib API to customize vtiger CRM. It provides examples for creating modules, tabs, blocks, fields, custom views, and enabling/disabling actions. The vtlib API allows easier development by automating common customization tasks like creating a new "Payslip" module with the necessary database tables, fields, and views. Test scripts demonstrate how to execute the API functions to fully create custom modules.
COMM 166 Final Research Proposal GuidelinesThe proposal should.docxmonicafrancis71118
COMM 166 Final Research Proposal Guidelines
The proposal should contain well-developed sections (Put clear titles on the top of each section) of your outline that you submitted earlier. The proposal should have seven (7) major sections:
1. Introduction: A brief overview of all your sections. Approx. one page
2. A summary of the literature review. In this section you would summarize the previous research (summarize at least 8-10 scholarly research articles), and also your field data collection results (if it was connected to your proposal topic). Also indicate the gaps in the previous research, including your pilot study, and the need for your research study. Please devote around three pages in reviewing the previous research and finding the gaps.
3. Arising from the literature review, write the Purpose Statement of your research (purpose statement should have all its parts clearly written. Follow the examples from textbook).
4. Identify two to three main hypotheses or research questions (based on the quantitative/qualitative research design). Also give some of your supporting research questions. Follow the examples from textbook.
5. Describe the research strategy of inquiry and methods that you would use and why. The method part should be the substantial part of your paper, around three pages. Define your knowledge claims, strategies, and methods from the textbook (and cite), why you chose them, and how you will conduct the research in detail.
6. A page on the significance of your study.
7. A complete reference list of your sources in APA style.
The total length of the paper should be between 8-10 pages (excluding the reference and cover pages).
If you have further questions, please do not hesitate to contact me.
Best wishes
Dev
mportant notes about grading:
1. Compiler errors: All code you submit must compile. Programs that do not compile will receive an automatic zero. If you run out of time, it is better to comment out the parts that do not compile, than hand in a more complete file that does not compile.
2. Late assignments: You must submit your code before the deadline. Verify on Sakai that you have submitted the correct version. If you submit the incorrect version before the deadline and realize that you have done so after the deadline, we will only grade the version received before the deadline.
A Prolog interpreter
In this project, you will implement a Prolog interpreter in OCaml.
If you want to implement the project in Python, download the source code here and follow the README file. Parsing functions and test-cases are provided.
Pseudocode
Your main task is to implement the non-deterministic abstract interpreter covered in the lecture Control in Prolog. The pseudocode of the abstract interpreter is in the lecture note.
Bonus
There is also a bonus task for implementing a deterministic Prolog interpreter with support for backtracking (recover from bad choices) and choice points (produce multiple results). Please refer t.
A transaction is a unit of work performed against a database that must adhere to the properties of atomicity, consistency, isolation, and durability. Transactions can be committed to save changes to the database or rolled back to undo changes. Additional commands like savepoints allow rolling back parts of transactions. The scheduler in a database manages the concurrent execution of transactions to maintain data consistency.
COMM 166 Final Research Proposal GuidelinesThe proposal should.docxcargillfilberto
COMM 166 Final Research Proposal Guidelines
The proposal should contain well-developed sections (Put clear titles on the top of each section) of your outline that you submitted earlier. The proposal should have seven (7) major sections:
1. Introduction: A brief overview of all your sections. Approx. one page
2. A summary of the literature review. In this section you would summarize the previous research (summarize at least 8-10 scholarly research articles), and also your field data collection results (if it was connected to your proposal topic). Also indicate the gaps in the previous research, including your pilot study, and the need for your research study. Please devote around three pages in reviewing the previous research and finding the gaps.
3. Arising from the literature review, write the Purpose Statement of your research (purpose statement should have all its parts clearly written. Follow the examples from textbook).
4. Identify two to three main hypotheses or research questions (based on the quantitative/qualitative research design). Also give some of your supporting research questions. Follow the examples from textbook.
5. Describe the research strategy of inquiry and methods that you would use and why. The method part should be the substantial part of your paper, around three pages. Define your knowledge claims, strategies, and methods from the textbook (and cite), why you chose them, and how you will conduct the research in detail.
6. A page on the significance of your study.
7. A complete reference list of your sources in APA style.
The total length of the paper should be between 8-10 pages (excluding the reference and cover pages).
If you have further questions, please do not hesitate to contact me.
Best wishes
Dev
mportant notes about grading:
1. Compiler errors: All code you submit must compile. Programs that do not compile will receive an automatic zero. If you run out of time, it is better to comment out the parts that do not compile, than hand in a more complete file that does not compile.
2. Late assignments: You must submit your code before the deadline. Verify on Sakai that you have submitted the correct version. If you submit the incorrect version before the deadline and realize that you have done so after the deadline, we will only grade the version received before the deadline.
A Prolog interpreter
In this project, you will implement a Prolog interpreter in OCaml.
If you want to implement the project in Python, download the source code and follow the README file. Parsing functions and test-cases are provided.
Pseudocode
Your main task is to implement the non-deterministic abstract interpreter covered in the lecture Control in Prolog. The pseudocode of the abstract interpreter is in the lecture note.
Bonus
There is also a bonus task for implementing a deterministic Prolog interpreter with support for backtracking (recover from bad choices) and choice points (produce multiple results). Please refer to th.
COMM 166 Final Research Proposal GuidelinesThe proposal should.docxdrandy1
COMM 166 Final Research Proposal Guidelines
The proposal should contain well-developed sections (Put clear titles on the top of each section) of your outline that you submitted earlier. The proposal should have seven (7) major sections:
1. Introduction: A brief overview of all your sections. Approx. one page
2. A summary of the literature review. In this section you would summarize the previous research (summarize at least 8-10 scholarly research articles), and also your field data collection results (if it was connected to your proposal topic). Also indicate the gaps in the previous research, including your pilot study, and the need for your research study. Please devote around three pages in reviewing the previous research and finding the gaps.
3. Arising from the literature review, write the Purpose Statement of your research (purpose statement should have all its parts clearly written. Follow the examples from textbook).
4. Identify two to three main hypotheses or research questions (based on the quantitative/qualitative research design). Also give some of your supporting research questions. Follow the examples from textbook.
5. Describe the research strategy of inquiry and methods that you would use and why. The method part should be the substantial part of your paper, around three pages. Define your knowledge claims, strategies, and methods from the textbook (and cite), why you chose them, and how you will conduct the research in detail.
6. A page on the significance of your study.
7. A complete reference list of your sources in APA style.
The total length of the paper should be between 8-10 pages (excluding the reference and cover pages).
If you have further questions, please do not hesitate to contact me.
Best wishes
Dev
mportant notes about grading:
1. Compiler errors: All code you submit must compile. Programs that do not compile will receive an automatic zero. If you run out of time, it is better to comment out the parts that do not compile, than hand in a more complete file that does not compile.
2. Late assignments: You must submit your code before the deadline. Verify on Sakai that you have submitted the correct version. If you submit the incorrect version before the deadline and realize that you have done so after the deadline, we will only grade the version received before the deadline.
A Prolog interpreter
In this project, you will implement a Prolog interpreter in OCaml.
If you want to implement the project in Python, download the source code and follow the README file. Parsing functions and test-cases are provided.
Pseudocode
Your main task is to implement the non-deterministic abstract interpreter covered in the lecture Control in Prolog. The pseudocode of the abstract interpreter is in the lecture note.
Bonus
There is also a bonus task for implementing a deterministic Prolog interpreter with support for backtracking (recover from bad choices) and choice points (produce multiple results). Please refer to th.
The document discusses formal methods for software specification and modeling. It provides examples of using formal languages like Z and OCL to formally specify the state and behavior of a print spooler system. Key concepts discussed include using sets, logic, and mathematics to precisely define a system's state, operations, preconditions, and postconditions to ensure consistency and avoid ambiguity.
The document discusses three Philippine Supreme Court cases related to labor and election laws:
1) JMM v NLRC (1993) addressed whether an employer was still required to post an appeal bond despite posting other surety bonds. The Court held that the appeal bond served a different purpose from the other bonds and was still required.
2) Mateo Casela v. Court of Appeals involved whether a motion for execution of a writ was time-barred. The Court excluded time periods where execution was suspended and found the motion was timely.
3) Datu Michael Abas Kida v. Senate of the Philippines concerned the constitutionality of resetting ARMM elections. The Court upheld the new law,
This document summarizes ordinances and resolutions passed by local governments in Palawan, Philippines regarding the banning of shipping live fish and lobsters outside of Puerto Princesa City and prohibiting the catching, selling, and shipping of certain marine organisms from Palawan waters. Specifically, it summarizes Ordinance No. 15-92 passed by Puerto Princesa City banning the shipping of all live fish and lobsters outside the city from 1993 to 1998 with some exemptions. It also summarizes Office Order No. 23 implementing the city ordinance. Lastly, it summarizes Resolution No. 33 and Ordinance No. 2 passed by the Sangguniang Panlalawigan (Provincial Council) of Pal
Geography Sem II Unit 1C Correlation of Geography with other school subjectsProfDrShaikhImran
The correlation of school subjects refers to the interconnectedness and mutual reinforcement between different academic disciplines. This concept highlights how knowledge and skills in one subject can support, enhance, or overlap with learning in another. Recognizing these correlations helps in creating a more holistic and meaningful educational experience.
A measles outbreak originating in West Texas has been linked to confirmed cases in New Mexico, with additional cases reported in Oklahoma and Kansas. The current case count is 795 from Texas, New Mexico, Oklahoma, and Kansas. 95 individuals have required hospitalization, and 3 deaths, 2 children in Texas and one adult in New Mexico. These fatalities mark the first measles-related deaths in the United States since 2015 and the first pediatric measles death since 2003.
The YSPH Virtual Medical Operations Center Briefs (VMOC) were created as a service-learning project by faculty and graduate students at the Yale School of Public Health in response to the 2010 Haiti Earthquake. Each year, the VMOC Briefs are produced by students enrolled in Environmental Health Science Course 581 - Public Health Emergencies: Disaster Planning and Response. These briefs compile diverse information sources – including status reports, maps, news articles, and web content– into a single, easily digestible document that can be widely shared and used interactively. Key features of this report include:
- Comprehensive Overview: Provides situation updates, maps, relevant news, and web resources.
- Accessibility: Designed for easy reading, wide distribution, and interactive use.
- Collaboration: The “unlocked" format enables other responders to share, copy, and adapt seamlessly. The students learn by doing, quickly discovering how and where to find critical information and presenting it in an easily understood manner.
Odoo Inventory Rules and Routes v17 - Odoo SlidesCeline George
Odoo's inventory management system is highly flexible and powerful, allowing businesses to efficiently manage their stock operations through the use of Rules and Routes.
Link your Lead Opportunities into Spreadsheet using odoo CRMCeline George
In Odoo 17 CRM, linking leads and opportunities to a spreadsheet can be done by exporting data or using Odoo’s built-in spreadsheet integration. To export, navigate to the CRM app, filter and select the relevant records, and then export the data in formats like CSV or XLSX, which can be opened in external spreadsheet tools such as Excel or Google Sheets.
How to Set warnings for invoicing specific customers in odooCeline George
Odoo 16 offers a powerful platform for managing sales documents and invoicing efficiently. One of its standout features is the ability to set warnings and block messages for specific customers during the invoicing process.
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulsesushreesangita003
what is pulse ?
Purpose
physiology and Regulation of pulse
Characteristics of pulse
factors affecting pulse
Sites of pulse
Alteration of pulse
for BSC Nursing 1st semester
for Gnm Nursing 1st year
Students .
vitalsign
APM event hosted by the Midlands Network on 30 April 2025.
Speaker: Sacha Hind, Senior Programme Manager, Network Rail
With fierce competition in today’s job market, candidates need a lot more than a good CV and interview skills to stand out from the crowd.
Based on her own experience of progressing to a senior project role and leading a team of 35 project professionals, Sacha shared not just how to land that dream role, but how to be successful in it and most importantly, how to enjoy it!
Sacha included her top tips for aspiring leaders – the things you really need to know but people rarely tell you!
We also celebrated our Midlands Regional Network Awards 2025, and presenting the award for Midlands Student of the Year 2025.
This session provided the opportunity for personal reflection on areas attendees are currently focussing on in order to be successful versus what really makes a difference.
Sacha answered some common questions about what it takes to thrive at a senior level in a fast-paced project environment: Do I need a degree? How do I balance work with family and life outside of work? How do I get leadership experience before I become a line manager?
The session was full of practical takeaways and the audience also had the opportunity to get their questions answered on the evening with a live Q&A session.
Attendees hopefully came away feeling more confident, motivated and empowered to progress their careers
*Metamorphosis* is a biological process where an animal undergoes a dramatic transformation from a juvenile or larval stage to a adult stage, often involving significant changes in form and structure. This process is commonly seen in insects, amphibians, and some other animals.
What makes space feel generous, and how architecture address this generosity in terms of atmosphere, metrics, and the implications of its scale? This edition of #Untagged explores these and other questions in its presentation of the 2024 edition of the Master in Collective Housing. The Master of Architecture in Collective Housing, MCH, is a postgraduate full-time international professional program of advanced architecture design in collective housing presented by Universidad Politécnica of Madrid (UPM) and Swiss Federal Institute of Technology (ETH).
Yearbook MCH 2024. Master in Advanced Studies in Collective Housing UPM - ETH
GDGLSPGCOER - Git and GitHub Workshop.pptxazeenhodekar
This presentation covers the fundamentals of Git and version control in a practical, beginner-friendly way. Learn key commands, the Git data model, commit workflows, and how to collaborate effectively using Git — all explained with visuals, examples, and relatable humor.
This presentation was provided by Bill Kasdorf of Kasdorf & Associates LLC and Publishing Technology Partners, during the fifth session of the NISO training series "Accessibility Essentials." Session Five: A Standards Seminar, was held May 1, 2025.
Understanding P–N Junction Semiconductors: A Beginner’s GuideGS Virdi
Dive into the fundamentals of P–N junctions, the heart of every diode and semiconductor device. In this concise presentation, Dr. G.S. Virdi (Former Chief Scientist, CSIR-CEERI Pilani) covers:
What Is a P–N Junction? Learn how P-type and N-type materials join to create a diode.
Depletion Region & Biasing: See how forward and reverse bias shape the voltage–current behavior.
V–I Characteristics: Understand the curve that defines diode operation.
Real-World Uses: Discover common applications in rectifiers, signal clipping, and more.
Ideal for electronics students, hobbyists, and engineers seeking a clear, practical introduction to P–N junction semiconductors.
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...Celine George
Analytic accounts are used to track and manage financial transactions related to specific projects, departments, or business units. They provide detailed insights into costs and revenues at a granular level, independent of the main accounting system. This helps to better understand profitability, performance, and resource allocation, making it easier to make informed financial decisions and strategic planning.
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schoolsdogden2
Algebra 1 is often described as a “gateway” class, a pivotal moment that can shape the rest of a student’s K–12 education. Early access is key: successfully completing Algebra 1 in middle school allows students to complete advanced math and science coursework in high school, which research shows lead to higher wages and lower rates of unemployment in adulthood.
Learn how The Atlanta Public Schools is using their data to create a more equitable enrollment in middle school Algebra classes.
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...larencebapu132
This is short and accurate description of World war-1 (1914-18)
It can give you the perfect factual conceptual clarity on the great war
Regards Simanchala Sarab
Student of BABed(ITEP, Secondary stage)in History at Guru Nanak Dev University Amritsar Punjab 🙏🙏
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...larencebapu132
235689260 oracle-forms-10g-tutorial
1. Get Homework/Assignment Done
Homeworkping.com
Homework Help
https://www.homeworkping.com/
Research Paper help
https://www.homeworkping.com/
Online Tutoring
https://www.homeworkping.com/
click here for freelancing tutoring sites
Forms 10g Tutorial
1. Introduction
Here is a collection of Oracle Forms 10g sample dialogs extracted from a complete Oracle Forms tutorial.
This tutorial has been written in French and it would be too time consuming to translate it all in English.
This is the reason why I have only extracted and translated these sample dialogs.
The purpose of this article is not to teach how to build a new form from scratch. It intends to show some of the main
advanced features of the product.
To clearly understand in details how these dialogs work, you will have to open them in the Forms Builder and examine
them thoroughly.
However, in this article, I am going to explain the best I can the most important mechanisms of each sample.
These sample have been tested with an Oracle Forms 10g release 10.1.2.0.2 on an Oracle Database 10g
Express Edition Release 10.2.0.1.0.
2. Description of the sample dialogs
2.1 Main screen
3. 2.2 Canvases
TEST_CANVAS.FMB
This sample shows three types of canvas :
The content canvas (light green)
The stacked canvas (white)
The tab canvas (dark green)
Stacked canvas
A stacked canvas is displayed atop—or stacked on—the content canvas assigned to the current
window. Stacked canvases obscure some part of the underlying content canvas, and often are
shown and hidden programmatically. You can display more than one stacked canvas in a window
at the same time
4. A stacked canvas allows to scroll a big canvas in a delimited window.
In this sample, the stacked canvas (CV_EMP_1) is twice bigger than its viewport.
The <Down> button allows to move the stacked canvas programatically:
Set_View_Property('CV_EMP_1', VIEWPORT_Y_POS_ON_CANVAS, 140) ;
Here are the properties of this stacked canvas:
Viewport
Viewport X position 77
Viewport Y position 11
Viewport Width 212
Viewport Height 138
Physical
Viewport X position on canvas 0
Viewport Y position on canvas 0
Width 212
Height 324
The second Stacked canvas (CV_EMP_3) demonstrates how to integrate in a Tab canvas:
6. 2.3 Blocks
2.3.1 Block based on a complex view
TEST_BLOC_VUE.FMB
This sample show how you can base a block on a view that aggregate the columns of several tables (in this case, DEPT
and EMP) and when you can insert, update and delete from the target tables from this view.
The code that handles the target table is located in a program unit, called from the three block-level triggers:
ON-INSERT
ON-UPDATE
ON-LOCK
7. This is the code of the ins_upd_emp_dept procedure:
PROCEDURE ins_upd_emp_dept IS
LN$Dummy PLS_INTEGER := 0 ;
BEGIN
-- Table DEPT --
Begin
Select 1
Into LN$Dummy
From DUAL
Where exists( select deptno from dept where deptno = :EMP_DEPT.DEPTNO ) ;
-- Found -> update --
Message('Update DEPT table');
UPDATE DEPT
SET DNAME = :EMP_DEPT.DNAME
WHERE DEPTNO = :EMP_DEPT.DEPTNO ;
Exception
When no_data_found Then
-- Not found -> insert --
Message('Insert into DEPT table');
INSERT INTO DEPT ( DEPTNO, DNAME )
VALUES ( :EMP_DEPT.DEPTNO, :EMP_DEPT.DNAME ) ;
End ;
-- Table EMP --
Begin
Select 1
8. Into LN$Dummy
From DUAL
Where exists( select empno from emp where empno = :EMP_DEPT.EMPNO ) ;
-- Found -> update --
Message('Update EMP table');
UPDATE EMP
SET ENAME = :EMP_DEPT.ENAME
WHERE EMPNO = :EMP_DEPT.EMPNO ;
Exception
When no_data_found Then
-- Not found -> insert --
Message('Insert into EMP table');
INSERT INTO EMP ( EMPNO, ENAME )
VALUES ( :EMP_DEPT.EMPNO, :EMP_DEPT.ENAME ) ;
End ;
END;
9. 2.3.2 Block based on stored procedures
TEST_BLOC_PROC.FMB
This sample demonstrates how a block can be based on stored procedures.
This feature can be implemented in two ways:
A REF CURSOR
A PL/SQL table
In addition to that, there are also two different locations where to implement this functionality:
The ON-xxx triggers
The transactionnal triggers
In this sample, the top block uses a REF CURSOR with the ON-xxx triggers
10. The bottom block uses a collection with the standard transactionnal triggers.
The stored procedures are located in the PKG_EMP package shipped with the scripts.
Block1 (EMP), REF CURSOR and ON-xxx triggers
The Query Data Source Type is set to Procedure and the Query Data Source Name indicates the name of the query
procedure.
The insert, update, delete and lock orders are managed in the corresponding On-xxx triggers:
Example of ON-INSERT trigger:
DECLARE
LR$Emp emp_pkg.emp_rec;
BEGIN
LR$Emp.empno := :emp.empno;
LR$Emp.ename := :emp.ename;
LR$Emp.job := :emp.job;
LR$Emp.sal := :emp.sal;
LR$Emp.comm := :emp.comm;
emp_pkg.emp_insert( LR$Emp );
END;
The variable used as parameter is of type of emp_pkg.emp_rec
TYPE emp_rec IS RECORD(
11. empno emp.empno%TYPE,
ename emp.ename%TYPE,
job emp.job%TYPE,
sal emp.sal%TYPE,
comm emp.comm%TYPE);
Then the emp_pkg.emp_insert() stored procedure:
------------
-- Insert --
------------
PROCEDURE emp_insert(r IN emp_rec) IS
BEGIN
INSERT INTO emp (empno, ename, job, sal, comm)
VALUES(r.empno, r.ename, r.job, r.sal, r.comm);
END emp_insert;
Block2 (EMP_TRG), Collection and transactionnal triggers
This block uses a collection of records with the emp.pkg.emp_query procedure.
TYPE emptab IS TABLE OF emp_rec INDEX BY BINARY_INTEGER;
PROCEDURE emp_query(emp_data IN OUT emptab) IS
ii NUMBER;
CURSOR empselect IS
SELECT empno, ename, job, sal, comm FROM emp
ORDER BY ename ;
BEGIN
12. OPEN empselect;
ii := 1;
LOOP
FETCH empselect INTO
emp_data( ii ).empno,
emp_data( ii ).ename,
emp_data( ii ).job,
emp_data( ii ).sal,
emp_data( ii ).comm;
EXIT WHEN empselect%NOTFOUND;
ii := ii + 1;
END LOOP;
END emp_query;
The collection of records is an IN OUT parameter, read from the database and returned to Forms.
The insert, update,delete and lock orders are also managed by stored procedures.
(see them in detail in the EMP_PKG package)
Have also a look at the Query Data Source Column property that manages the relation between the columns of the
collection and the items of the block.
14. 2.3.3 Block based on a relational table that contains a collection
TEST_COLLECTION.FMB
In this dialog, we can see how to handle a table that contains a nested table (collection).
There is no standard buit-in to base a block on a collection, but we will see how easy it is to work with this sort of
object via the ON-xxx triggers.
Here is the description of the table (ARTICLES)
CREATE TABLE ARTICLES
( CODE VARCHAR2(20 BYTE),
LIBELLE VARCHAR2(100 BYTE),
PRIX NUMBER(8,2),
QTETOT NUMBER(8,0),
CASES TAB_TYP_CASE
)
NESTED TABLE CASES STORE AS CASES_NT
15. RETURN AS VALUE;
TAB_TYP_CASE is a table of objects of type : TYP_CASE
create or replace TYPE TYP_CASE AS OBJECT
(
EMP VARCHAR2(10),
QTE NUMBER
)
In this sample, the first block (ARTICLES) displays the standard columns of the ARTICLE table
and the second block (detail) displays the columns of its nested table.
Populate the detail block (nested table)
The detail block (CASES) is dynamically populated each time a master record change in a When-New-Record-
Instance of the master block:
Declare
LC$Req Varchar2(256) ;
Begin
If :ARTICLES.CODE Is not null Then
-- Dynamic query of secondary block --
LC$Req := '(SELECT cases.EMP, cases.QTE FROM TABLE ( SELECT cases FROM articles
WHERE code = ''' || :ARTICLES.CODE || ''') cases)' ;
Go_Block('CASES' );
Clear_Block ;
Set_Block_Property( 'CASES', QUERY_DATA_SOURCE_NAME, LC$Req ) ;
-- populate the block --
Execute_Query ;
Go_Block('ARTICLES') ;
Else
Go_Block('CASES' );
Clear_Block ;
16. Go_Block('ARTICLES') ;
End if ;
End ;
Because it is not possible to create a new article with a NULL collection, we have to handle the insertion into the
ARTICLE table in a ON-INSERT trigger:
--------------------------------------------------------------
-- we are doing an explicit insert because the new record --
-- cannot contain a NULL collection --
--------------------------------------------------------------
INSERT INTO ARTICLES
(
CODE,
LIBELLE,
PRIX,
QTETOT,
CASES
)
VALUES
(
:ARTICLES.CODE,
:ARTICLES.LIBELLE,
:ARTICLES.PRIX,
:ARTICLES.QTETOT,
TAB_TYP_CASE() -- insert an empty collection
)
;
Indeed, if we insert a NULL collection, it will be no longer possible to insert anything in the nested
table.
17. Then after, it is easy to manage the detail records with the ON-xxx triggers of the CASES block:
ON-INSERT:
-- Insert the row in the collection --
INSERT INTO TABLE
(
SELECT
cases
FROM
articles
WHERE
code = :ARTICLES.CODE
)
Values
(
TYP_CASE( :CASES.EMP, :CASES.QTE )
);
ON-DELETE:
-- Delete row in the collection --
DELETE FROM TABLE
(
SELECT
cases
FROM
articles
WHERE
code = :ARTICLES.CODE
19. 2.3.4 Block based on multiple data sources
TEST_DATA_SOURCES.FMB
I this sample dialog, we can see how to base a block on several tables that share an identical structure.
(see the JANVIER, FEVRIER and MARS tables created by the install.sql script)
The list item is populated with the name of three tables that share the same structure:
20. Then, the source table of the block is changed dynamically in the When-List-Changed trigger:
If :CTRL.CHOIX is not null Then
:global.choix := :ctrl.choix ;
clear_form ;
:ctrl.choix := :global.choix ;
-- change the Query Data Source --
Set_Block_Property('TEST2', QUERY_DATA_SOURCE_NAME, :global.CHOIX );
go_block('TEST2');
execute_query;
End if ;
21. 2.3.5 Block based on an object table that contains a collection of references
TEST_OBJETS.FMB
Let’s see how to manage an object table that contains a collection of references.
This sample is based on the object table (ARTICLE_OBJ) that contains a collection of references:
create or replace TYPE REF_TYP_EMP AS OBJECT
(
ref_emp REF TYP_EMP
)
create or replace TYPE TAB_REF_TYP_EMP AS TABLE OF REF_TYP_EMP
22. create or replace TYPE TYP_ARTICLES AS OBJECT
(
CODE VARCHAR2 (20),
LIBELLE VARCHAR2 (100),
PRIX NUMBER (8,2),
QTETOT NUMBER (8),
REMP TAB_REF_TYP_EMP -- collection
)
CREATE TABLE ARTICLES_OBJ OF TYP_ARTICLES
NESTED TABLE REMP STORE AS REMP_NT
RETURN AS VALUE;
The tip is the same that the one used to manage the relational table with nested table:
- A when-New-Record-Instance trigger on the master block to populate the detail block (the collection of references):
Declare
LC$Req Varchar2(256) ;
Begin
If :ARTICLES.CODE Is not null Then
-- Dynamic query of secondary block --
LC$Req := '(SELECT emp.ref_emp.emp EMP, emp.ref_emp.qte QTE
FROM TABLE( SELECT REMP FROM articles_obj WHERE CODE = ''' ||
:ARTICLES.CODE || ''') emp
WHERE emp.ref_emp.art = ''' || :ARTICLES.CODE || ''')' ;
Go_Block('CASES' );
Clear_Block ;
-- change the Query Data Source Name --
Set_Block_Property( 'CASES', QUERY_DATA_SOURCE_NAME, LC$Req ) ;
-- populate the block --
23. Execute_Query ;
Go_Block('ARTICLES') ;
Else
Go_Block('CASES' );
Clear_Block ;
Go_Block('ARTICLES') ;
End if ;
End ;
- An ON-INSERT trigger to insert a new record with an empty collection:
-------------------------------------------------------
-- We are doing an implicit insert because the new --
-- record cannot contain a NULL collection --
-------------------------------------------------------
INSERT INTO ARTICLES_OBJ
VALUES
(
TYP_ARTICLES
(
:ARTICLES.CODE,
:ARTICLES.LIBELLE,
:ARTICLES.PRIX,
:ARTICLES.QTETOT,
TAB_REF_TYP_EMP()
)
) ;
The collection of references is managed with the corresponding ON-xxx trigger of the detail block:
ON-INSERT:
24. -- Insert a row (REF) in the collection --
Declare
LC$Req Varchar2(256) ;
Begin
LC$Req := 'INSERT INTO TABLE
( SELECT remp FROM ARTICLES_OBJ WHERE code = ''' || :ARTICLES.CODE || ''')
VALUES
( REF_TYP_EMP ( (SELECT REF(a) FROM EMP_OBJ a WHERE a.ART = '''
|| :ARTICLES.CODE || ''' AND a.EMP = ''' || :CASES.EMP || ''') ) )' ;
Forms_Ddl( LC$Req ) ;
End ;
ON-DELETE:
-- Delete the row (REF) of the collection --
DELETE FROM TABLE
( SELECT remp FROM ARTICLES_OBJ WHERE code = :ARTICLES.CODE ) emp
WHERE
emp.ref_emp.art = :ARTICLES.CODE
And
emp.ref_emp.emp = :CASES.EMP
;
25. 2.4 Items
2.4.1 Principal items
TEST_ITEMS.FMB
Here is a description of the main items.
Click everywhere on each item to see some information messages and some particular behaviours.
26. 2.4.2 List items
TEST_LISTES.FMB
Let’s study and handle the three sorts of list item and also the different ways to populate them.
In this sample, the three list items are synchronized. Change the value of the first list and it will adapt the content of
the second then the content of the third.
For each new list value, the corresponding value and label are displayed.
a) The first list item is populated with the RG_MOIS record group:
-- List 1 --
errcode := Populate_Group( 'RG_MOIS' );
CLEAR_LIST('BLOC2.LISTE1');
POPULATE_LIST('BLOC2.LISTE1', 'RG_MOIS' );
-- Select the first value --
:BLOC2.LISTE1 := Get_List_Element_Value('BLOC2.LISTE1', 1 ) ;
b) Then init the second list item
-- Update the weeks list --
errcode := Populate_Group( 'RG_SEMAINES' );
CLEAR_LIST('BLOC2.LISTE2');
27. POPULATE_LIST('BLOC2.LISTE2', 'RG_SEMAINES' );
-- Select the first value --
:BLOC2.LISTE2 := Get_List_Element_Value('BLOC2.LISTE2', 1 ) ;
c) That finally init the third list item:
PROCEDURE Init_Liste3 IS
LC$D Varchar2(12) ;
LC$Day Varchar2(20) ;
BEGIN
-- Update the days list --
LC$D := '01/01/2005' ;
Clear_List( 'BLOC2.LISTE3' );
For i IN 0..6 Loop
SELECT
to_char( To_date(LC$D, 'DD/MM/YYYY' ) + (i + ((To_number(:BLOC2.LISTE2)-1) *
7)), 'FMDay DD Month' )
Into
LC$Day
FROM dual ;
Add_List_Element('BLOC2.LISTE3', i + 1, LC$Day, LC$Day ) ;
End loop ;
-- Select the first value --
:BLOC2.LISTE3 := Get_List_Element_Value('BLOC2.LISTE3', 1 ) ;
29. 2.4.3 Image items
ALBUM_PHOTO.FMB
This dialog is the main part of the ensemble that allows to search, attach and display images.
You can build a photo album based on a one image’s column table.
CREATE TABLE PHOTOS
( LEGENDE VARCHAR2(100 BYTE),
PHOTO BLOB NOT NULL ENABLE,
FORMAT VARCHAR2(50 BYTE) NOT NULL ENABLE,
CREDIT VARCHAR2(50 BYTE) NOT NULL ENABLE,
LIEN VARCHAR2(100 BYTE),
IDENTIFIANT NUMBER(5,0) NOT NULL ENABLE,
NOM VARCHAR2(50 BYTE),
CONSTRAINT PHOTO_PK PRIMARY KEY (IDENTIFIANT) ENABLE
) ;
30. It shows two ways to search a filename on the local machine with and without Webutil.
By clicking on a picture, you can navigate on another canvas to display the detail of the picture:
31. CHARGE_PHOTO.FMB
The get_file_name sample dialog is only a “pure exercice of style” , because it is so easy to pick-up a file with the
File_Open_Dialog() Webutil function.
This sample is interesting to see how to use the HOST() and TEXT_IO() functions to get the list of the local machine
drives and their content.
33. 2.4.4 Java Bean component
TEST_GRAPH.FMB
Here is a sample to demonstrate how to handle a bean area.
This dialog use the Oracle FormsGraph Java Bean that is part of the Oracle Forms demos.
You can download the FormsGraph.jar file on the OTN page
http://www.oracle.com/technology/sample_code/products/forms/files/formsgraph_patch2005.zip
34. 2.4.5 Calculated items
TESTS_CALCUL.FMB
Let’s see how to use the calculated items.
The first calculated item use the Summary calculation mode:
The third one use a Formula calculation mode
36. 2.5 Alerts
TEST_ALERTES_MESSAGES.FMB
This dialog shows how to use the Alert boxes to build the messaging engine of your Forms application.
The message texts are read from the database then displayed via Alert boxes.
To reduce the number of messages needed in the application, some of them can take from 1 up to 3 parmeters (%1,
%2 and %3). A pipe (|) character allows to split the message on several lines.
The main block is based on the MESSAGES table.
CREATE TABLE MESSAGES
( CODE NUMBER(5,0) NOT NULL ENABLE, -- unique identifiant
TEXTE VARCHAR2(256) NOT NULL ENABLE, -- text of the message
TITRE VARCHAR2(100), -- title of the alert
STOP VARCHAR2(1) DEFAULT 'N' NOT NULL ENABLE, -- Shall we stop the process ?
(raise form_trigger_failure)
ALERTE VARCHAR2(15), -- name of the alert box
CONSTRAINT MSG_PK PRIMARY KEY (CODE) ENABLE
37. )
This sample use the Affiche_Message() procedure of the TUTO_FORMS pl/sql library to display the messages.
These messages can be displayed through the 3 alert boxes available in every dialog of this demo.
AL_ERREUR wich is the simple “OK” alert box.
AL_MSG_OUI_NON wich is a yes/no alert box (default yes)
AL_MSG_NON_OUI wich is a yes/no alert box (default no)
38. 2.6 Property classes and visual attributes
TEST_CLASSES_PROP.FMB
Let’s see some ways to use the property classes and the visual attributes to colorize and highlight dynamically different
objects of the form (alert, item, current record, etc.).
Property classes and visual attributes are located in the OBJ_TUTO_FORMS.olb object library.
39. 2.7 Forms internal triggering events
TEST_CYCLES.FMB
This dialog allows you to understand what trigger fire and in what order when you use the application.
Before each particular action, you can clear the list of triggers window.
This window show you what trigger is firing in what order and from what block and what item.
3. Installation steps
This sample dialog need database objects to run.
All the necessary objects are provided in the tutoforms10g.zip file shipped with the article.
This zip file contains 2 sub directories:
/config that contains the configuration files.
/scripts that contains the Sql script files to create the database objects.
Download the tutoforms10g.zip file
40. Unzip the tutoforms10g.zip file under your <DEVSUITE_HOME>/forms/ directory.
Create a new user in your database
With Sql*plus or SqlDeveloper, run the /scripts/install.sql script
note : because this demo use the Webutil functions, the Oracle user where you have created these objects
must have the WEBUTIL_DB package compiled or a grant EXECUTE to this package if it is present in
another schema.
Under the /tutoforms/ directory compile all the source modules
You can use the compile_all.bat file located in the same directory to compile all objects at once.
e.g. compile_all user/password@instance
Edit the /tutoforms/config/tutforms10g.env file to indicate your own settings (in blue in this example)
#oracle home adapt this value to your own setting
ORACLE_HOME=D:Dev10gR2
FORMS_PATH=%ORACLE_HOME%formstutoforms
ORACLE_PATH=%ORACLE_HOME%formstutoforms
FORMS_TRACE_PATH=%ORACLE_HOME%formstutoforms
CLASSPATH=D:Dev10gR2formsjavafrmwebutil.jar;%ORACLE_HOME%jlibdebugger.jar;
%ORACLE_HOME%formstutoformsFormsGraph.jar;%ORACLE_HOME%formstutoformsmyIcons.jar;
# webutil config file path
WEBUTIL_CONFIG=D:Dev10gR2formsserverwebutil.cfg
Edit the /tutoforms/config/ add_to_formsweb.cfg file to set your own database connect string (in blue in
this example)
...
lookAndFeel=Oracle
colorScheme=blaf
logo=no
#don't forget to put your own database connexion
userid=tutoforms10g/tutoforms10g@XE
Copy the /tutoforms/config/tutforms10g.env to the /forms/server directory
add the /tutoforms/config/ add_to_formsweb.cfg at the end of your /forms/server/formsweb.cfg file
41. Then, you can start the demo by indicating the new [tutoforms10g] formsweb.cfg section.
http://machine:8890/forms/frmservlet?config=tutoforms10g