Oracle
January 6, 2017 | Author: Paul Avijit | Category: N/A
Short Description
Download Oracle...
Description
007 Writing [ ] [ ] [ ]
Basic SQL Select Statements List the capabilities of SQL SELECT statements Execute a basic SELECT statement Differentiate between SQL statements and iSQL*Plus commands
Restricting and Sorting Data [ ] Limit the rows retrieved by a query [ ] Sort the rows retrieved by a query Single-Row Functions [ ] Describe various types of functions available in SQL [ ] Use character, number, and date functions in SELECT statements [ ] Use conversion functions Displaying Data from Multiple Tables [ ] Write SELECT statements to access data from more than one table using eq uality and nonequality joins [ ] View data that generally does not meet a join condition by using outer j oins [ ] Join a table to itself using a self-join Aggregating Data using Group Functions [ ] Identify the available group functions [ ] Use group functions [ ] Group data using the GROUP BY clause [ ] Include or exclude grouped rows by using the HAVING clause Subqueries [ ] Describe the types of problems that subqueries can solve [ ] Define subqueries [ ] List the types of subqueries [ ] Write single-row and multiple-row subqueries Producing Readable Output with iSQL*Plus [ ] Produce queries that require a substitution variable [ ] Produce more readable output [ ] Create and execute script files Manipulating Data [ ] Describe each DML statement [ ] Insert rows into a table [ ] Update rows in a table [ ] Delete rows from a table [ ] Merge rows in a table [ ] Control transactions Creating and Managing Tables [ ] Describe the main database objects [ ] Create tables [ ] Describe the datatypes that can be used when specifying column definitio n [ ] Alter table definitions [ ] Drop, rename and truncate tables Including Constraints [ ] Describe constraints
[ ]
Create and maintain constraints
-------------------------------------------------------------------------147 Overview of PL/SQL Programs [ ] Describe a PL/SQL program construct [ ] List the components of a PL/SQL block [ ] List the benefits of subprograms [ ] Describe how a stored procedure/function is invoked Creating Procedures [ ] Define what a stored procedure is [ ] List the development steps for creating a procedure [ ] Create a procedure [ ] Describe the difference between formal and actual parameters [ ] List the types of parameter modes [ ] List the methods for calling a procedure with parameters [ ] Describe the DEFAULT option for parameters [ ] Create a procedure with parameters [ ] Invoke a procedure that has parameters [ ] Define a subprogram in the declarative section of a procedure [ ] Describe how exceptions are propagated [ ] Remove a procedure Creating Functions [ ] Define what a stored function is [ ] Create a function [ ] List how a function can be invoked [ ] List the advantages of user-defined functions in SQL statements [ ] List where user-defined functions can be called from within an SQL state ment [ ] Describe the restrictions on calling functions from SQL statements [ ] Remove a function [ ] Describe the differences between procedures and functions Managing Subprograms [ ] Contrast system privileges with object privileges [ ] Grant privileges [ ] Contrast invokers rights with definers rights [ ] Identify views in the data dictionary to manage stored objects
Creating Packages [ ] Use DESCRIBE command to describe packages and list their possible compon ents [ ] Identify a package specification and body [ ] Create packages: Create related variables , cursors, constants, exceptio ns, procedures, and functions [ ] Designate a package construct as either public or private [ ] Invoke a package construct [ ] Use a bodiless package [ ] Drop Packages [ ] Identify benefits of Packages
More Package Concepts [ ] Write packages that use the overloading feature [ ] Use Forward Referencing [ ] Describe errors with mutually referential subprograms [ ] Initialize variables with a one-time-only procedure [ ] Identify persistent states in package variables and cursors [ ] Identify restrictions on using Packaged functions in SQL statements [ ] Invoke packaged functions from SQL [ ] Use PL/SQL tables and records in Packages Oracle Supplied Packages [ ] Describe the benefits of Execute Immediate over DBMS_SQL for Native Dyna mic SQL [ ] Identify the flow of execution [ ] Use EXECUTE IMMEDIATE [ ] Describe the use and application of some Oracle server-supplied packages : DBMS_SQL, DBMS_OUTPUT, UTL_FILE Manipulating Large Objects [ ] Compare and contrast LONG and large object (LOB) data types [ ] Describe LOB datatypes and how they are used [ ] Differentiate between internal and external LOBs [ ] Identify and Manage Bfiles [ ] Migrate from LONG To LOB [ ] Use the DBMS_LOB PL/SQL package [ ] Create LOB columns and populate them [ ] Perform SQL operations on LOBS: Update LOBs with SQL, Select from LOBS, Delete LOBS [ ] Describe the use of temporary LOBs Creating Database Triggers [ ] Describe the different types of triggers [ ] Describe database triggers and their uses [ ] List guidelines for designing triggers [ ] Create a DML trigger [ ] List the DML trigger components [ ] Describe the trigger firing sequence options [ ] Use conditional predicates in a DML trigger [ ] Create a row level trigger [ ] Create a statement level trigger [ ] Use the OLD and NEW qualifiers in a database trigger [ ] Create an INSTEAD OF trigger [ ] Describe the difference between stored procedures and triggers [ ] Describe the trigger execution model [ ] Alter a trigger status [ ] Remove a trigger More Trigger Concepts [ ] Define what a database trigger is [ ] Describe events that cause database triggers to fire [ ] Create a trigger for a DDL statement [ ] Create a trigger for a system event [ ] Describe the functionality of the CALL statement [ ] Describe the cause of a mutating table [ ] List what triggers can be implemented for [ ] List the privileges associated with triggers [ ] View trigger information in the dictionary views Managing Dependencies
[ [ [ [ [ [ [ [ [ [
] ] ] ] ] ] ] ] ] ]
Track procedural dependencies Describe dependent objects and referenced objects View dependency information in the dictionary views Describe how the UTLDTREE script is used Describe how the IDEPTREE and DEPTREE procedures are used Describe a remote dependency List how remote dependencies are governed Describe when a remote dependency is unsuccessfully recompiled Describe when a remote dependency is successfully recompiled List how to minimize dependency failures
-----------------------------------------------------------------141 Introduction to Oracle Forms Developer and Oracle Forms Services [ ] Describe the components of Oracle9i Developer Suite and the Oracle9i App lication Server [ ] Describe the features and benefits of Oracle Forms Services and Oracle F orms Developer [ ] Describe the architecture of Oracle Forms Services [ ] Describe Forms Builder components [ ] Navigate the Forms Builder interface [ ] Customize the Forms Builder session [ ] Use the online help facilities Running [ ] __ __ __ [ ] [ ] [ ] [ ] [ ]
a Forms Developer Application Describe the run-time environment Explain the role of each Modify Forms environment variables Describe the appearance of a form at run time Navigate a Forms application Retrieve both restricted and unrestricted data Describe the two modes of operation Insert, update, and delete records Display database errors
Creating LOVs and Editors [ ] Describe LOVs and editors [ ] Design, create, and associate LOVs with text items in a form module __ Describe the relationship between LOVs and record groups __ Explain the steps to create an LOV manually __ Use the LOV Wizard to create an LOV __ Set LOV properties [ ] Create editors and associate them with text items in a form module Creating Additional Input Items [ ] Describe the item types that allow input [ ] Create a check box [ ] Create a list item [ ] Create a radio group Creating Noninput Items [ ] Describe item types that do not allow input [ ] Create a display item [ ] Create an image item [ ] Create a button [ ] Create a calculated item [ ] Create a hierarchical tree item [ ] Create a bean area item
Creating Windows and Content Canvases [ ] Define windows, content canvases, and viewports [ ] Describe the relationship between windows and content canvases [ ] Create windows and content canvases [ ] Display a form module in multiple windows and on multiple layouts Working [ ] other [ ] [ ] [ ] [ ]
with Other Canvas Types Describe the different types of canvases and their relationships to each Identify the appropriate canvas type for different scenarios Create an overlay effect by using stacked canvases Create a toolbar Create a tabbed interface
Introduction to Triggers [ ] Define triggers [ ] Describe the different trigger categories [ ] Describe the components of a trigger [ ] Describe the types of statements used in trigger code [ ] Describe the properties that affect the behavior of a trigger Working [ ] [ ] [ ] [ ] __ __
in the Forms Developer Environment Describe the main Forms Developer executables Describe the main Forms Developer module types Describe the main objects in a form module Run a form from within Forms Builder Start and stop an OC4J instance Set Forms Builder preferences to use OC4J
Creating a Basic Form Module [ ] Create a form module [ ] Create data blocks, create data blocks with relationships and create con trol blocks [ ] Use wizards in re-entrant mode to make changes to the data block and lay out [ ] Save and compile a form module [ ] Describe Forms file formats and their characteristics [ ] Explain how to deploy a form module [ ] Produce text files and documentation [ ] Run a master-detail form module Working [ ] [ ] [ ] __ __ __ __ __ [ ] __ __ __ __ __ __ [ ] [ ]
with Data Blocks and Frames Describe the methods to modify object properties Describe the features of the Property Palette Manipulate properties through the Property Palette Display the Property Palette Describe the property controls for different types of properties Display multiple Property Palettes Set properties on multiple objects Copy properties Control the behavior and appearance of data blocks Use visual attributes Use font, pattern, and color pickers Set navigation properties Set records properties Set database properties Set scrollbar properties Control frame properties Delete data blocks and their components
Working [ ] [ ] [ ] [ ]
with Text Items Describe text items Create a text item manage and modify text items using the property palette Display helpful messages
Producing Triggers [ ] Write trigger code __ Create a trigger of appropriate type and scope __ Describe the features of the PL/SQL Editor __ Describe the features of the Database Trigger Editor __ Explain the structure of trigger code __ Use variables in triggers [ ] Explain the use of built-in subprograms in Forms applications [ ] Describe the When-Button-Pressed trigger [ ] Describe the When-Window-Closed trigger Debugging Triggers [ ] Describe the methods to debug triggers in Forms Builder [ ] Describe the components of the Debug Console [ ] Run a form module in debug mode by using the Run Form Debug button [ ] Debug PL/SQL code __ Set breakpoints in code __ Step through code __ View variable values while form is running Adding [ ] [ ] ins __ __ __ __ [ ] lt-ins __ __ __
Functionality to Items Describe item interaction triggers Supplement the functionality of input items by using triggers and builtCode interactions with radio groups Code interactions with check boxes Change list items at run time Display an LOV from a button Supplement the functionality of noninput items by using triggers and bui Populate image items Populate hierarchical trees Code interactions with JavaBeans in the bean area item
Run Time Messages and Alerts [ ] Describe the default messaging behavior of a form [ ] Handle run time failure of built-in subprograms [ ] Describe the different types of Forms Builder messages [ ] Cause a trigger to fail in a controlled manner [ ] Control system messages [ ] Create and control alerts [ ] Handle database server errors Query Triggers [ ] Explain the processes involved in querying a data block [ ] Describe query triggers and their scope [ ] Control query array processing [ ] Write triggers to modify query behavior [ ] Control trigger action based on the form's query status [ ] Obtain query information at run time Validation [ ] Describe the validation process
[ ] __ __ __ __ __ [ ] [ ]
Control validation: Using object properties Explain the effects of the validation unit upon a form Use an LOV for validation Using triggers Using Pluggable Java Components Describe how Forms tracks validation status Control when validation occurs
Navigation [ ] Describe how navigation affects the navigation unit and the cursor [ ] Distinguish between internal and external navigation [ ] Control navigation with properties [ ] Describe and use navigation triggers to control navigation [ ] Explain how the cursor can become stuck between two items, resulting in a navigation trap [ ] Use navigation built-ins in triggers Transaction Processing [ ] Explain the process used by Forms to apply changes to the database [ ] Describe the commit sequence of events [ ] Describe the characteristics and uses of commit triggers [ ] Supplement transaction processing __ Perform delete validation __ Allocate sequence numbers to records as they are applied to tables __ Keep an audit trail [ ] Test the results of trigger DML [ ] Override default transaction processing [ ] Describe how to run against a non-Oracle data source [ ] Get and set the commit status [ ] Implement array DML Writing [ ] [ ] __ __ __ [ ] __ __
Flexible Code Describe flexible code Use system variables to determine: Cursor focus Trigger focus Commit status Describe built-in subprograms that assist flexible coding Write code to reference objects: By internal ID Indirectly
Sharing [ ] [ ] __ __ __ __ __ [ ] [ ] [ ] __ __ __ __ __ __
Objects and Code Describe benefits of reusing objects and code Create and use property classes Describe property classes Create property classes Add properties to property classes Inherit properties from property classes Explain the inheritance symbols in the Property Palette Group related objects for reuse Copy and subclass objects Reuse objects from an object library Describe object libraries Describe the benefits of using object libraries Create object libraries Populate object libraries Modify objects in an object library Create and use SmartClasses
[ ]
Reuse PL/SQL code
Introducing Multiple Form Applications [ ] Describe the characteristics of multiple form applications [ ] Describe the benefits of multiple form applications [ ] Call one form from another form module [ ] Define multiple form functionality [ ] Share data among open forms [ ] Control opening and closing of multiple forms [ ] Synchronize data among multiple forms Creating a Menu Module [ ] Describe the different components of a menu module [ ] Create, save and attach menu modules [ ] Set menu properties using the Property Palette [ ] Create menu toolbars [ ] Create pop-up menus Managing Menu Modules [ ] Control menus programmatically [ ] Manage the interaction between the menu and form documents [ ] Implement application security through the menu Programming Function Keys [ ] Define key triggers and their uses [ ] Program function keys [ ] Describe the characteristics of key triggers [ ] Classify key triggers [ ] Associate function keys with interface controls Building Multiple Form Applications [ ] Describe the various ways of invoking additional forms modules [ ] Open and close form modules [ ] Navigate between form modules [ ] Control open form modules [ ] Choose the most appropriate method for invoking forms Defining Data Sources [ ] Describe the various datasource types [ ] Base a data block on a FROM clause query [ ] Discuss the advantages of using a FROM clause query [ ] Base a data block on a stored procedure that returns a REF cursor [ ] Return a table of records from a stored procedure [ ] Define a Data Source with the Data Block Wizard [ ] Select the appropriate data source for a data block Working [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ]
with Record Groups Describe the record group object Use record groups Define record groups at design time Control record groups by using built-in functions Define query record groups programmatically and nonprogrammatically Manipulate record group rows Define lists of values (LOVs) programmatically Implement dynamic list items and add values to combo boxes
Using Database Objects in Forms Applications [ ] Recognize which object types are supported [ ] Describe how object types are represented within Form Builder [ ] Create a block based on relation table with an object or an REF column
[ ]
Populate a REF column with an LOV
___________________________________________________ 146 Oracle11g: Advanced PL/SQL [ ] Introduction [ ] Introduction to PL/SQL PL/SQL [ ] [ ] [ ] [ ]
Programming Concepts: Review List restrictions on calling functions from SQL expressions Hand exceptions Manage dependencies Use Oracle-supplied packages
Designing PL/SQL Code [ ] Identify guidelines for cursor design [ ] Use cursor variables [ ] Create subtypes based on existing types Working [ ] ables) [ ] [ ] [ ]
with Collections Create collections (nested table, array and associative arrays, PL SQL t Use collections methods Manipulate collections Distinguish between the different types of collections and their uses
Using Advanced Interface Methods [ ] Execute external C programs from PL/SQL [ ] Execute Java programs from PL/SQL Implementing Fine-Grained Access Control for VPD [ ] Explain the process of fine-grained access control [ ] Implement and test fine-grained access control Manipulating Large Objects [ ] Create and manage LOB data types [ ] Use the DBMS_LOB PL/SQL package [ ] Use of temporary LOBs Administering SecureFile LOBs [ ] Describe SecureFile LOB features [ ] Enable SecureFile LOB deduplication, compression, and encryption [ ] Migrate BasicFile LOBs to the SecureFile LOB format Performance and Tuning [ ] Use native and interpreted compilation methods [ ] Tune PL/SQL code [ ] Enable intraunit inlining Improving Performance with Caching [ ] Improve memory usage by caching SQL result sets and using the DBMS_RESUL T_CACHE package [ ] Write queries that use the result cache hint [ ] Set up PL/SQL functions to use PL/SQL result caching
Analyzing PL/SQL Code [ ] Run reports on source code [ ] Determine identifier types and usages [ ] Use DBMS_METADATA to retrieve object definitions Profiling and Tracing PL/SQL Code [ ] Trace PL/SQL program execution [ ] Profile PL/SQL applications Safeguarding Your Code Against SQL Injection Attacks [ ] Describe SQL injections [ ] Reduce attack surfaces [ ] Use DBMS_ASSERT [ ] Design immune code [ ] Test code for SQL injection flaws
# How do you convert a date to a string? To_char. A bonus would be that they alw ays include a format mask. # What is an aggregate function? I'm looking for "grouping", sums or counts, etc . # What is an interval? Specifies a period of time. # What is a nested subquery? A subquery in a where clause. # What is the dual table? A single row table provided by oracle for selecting va lues and expressions. # Describe the block structure of PLSQL. Declaration, Begin, exception, end. # What is an anonymous block? Unnamed PL/SQL block. # What is a PL/SQL collection? PL/SQL Table, Varray, PL/SQL Array, etc. # What is the difference between an explicit cursor and a select into. You might get something about performance but that's a myth. An explicit cursor is just m ore typing. A cursor for loop would be used to return more than a single row. # Why would you choose to use a package versus straight procedures and functions ? I look for maintenance, grouping logical functionality, dependency management, etc. I want to believe that they believe using packages is a "good thing". * What is the difference between an aggregate and an analytic function? I'm looking for them knowing that a sum aggregate (or any other aggregate function) will return one row for a group and a sum analytic will return one result for ea ch row in the group. If they mention the "Window", they get a bonus point. ;-) * How do you create a hierarchical query? Connect by. * How would you generate XML from a query? The answer here is "A lot of diff erent ways". They should know that there are SQL functions: XMLELEMENT, XMLFORES T, etc and PL/SQL functions: DBMS_XMLGEN, DBMS_XMLQUERY, etc. * What do you need before implementing a member function? You need to create a type. * How do you tune a query? I'm looking for a discussion of autotrace and/or explain plan. Ask them what they're looking for in a plan. This should not be a single sentence. Look for a comfort level. For Somewhat Advanced PL/SQL: * What is the default value of a boolean? NULL. This is somewhat tricky but a pparently there are languages that default boolean to false. A PL/SQL developer needs to know all variables default to NULL. * Why is using implicit conversions a poor programming practice? For dates, you must ASSUME that the default date format will always be the same (and it won 't be). In some cases, implicit conversion is slower. I want to feel like they d on't believe writing to_char or to_number is more work than it's worth. BTW, thi
s also applies to SQL. * How can you tell if an UPDATE updated no rows? SQL%NOTFOUND. * How can you tell if a SELECT returned no rows. NO_DATA_FOUND exception. * How do you run Native Dynamic SQL? Execute immediate. * What is an autonomous transaction? Identified by pragma autonomous. A chil d transaction separate from the parent that MUST be committed or rolled back. PL/SQL Questions 1. Describe the difference between a procedure, function and anonymous pl/sql bl ock. Level: Low Expected answer : Candidate should mention use of DECLARE statement, a function must return a value while a procedure doesn't have to. Also one can use function in Select Sql statement but not procedure. 2. What is a mutating table error and how can you get around it? Level: Intermediate Expected answer: This happens with triggers. It occurs because the trigger is tr ying to update a row it is currently using. The usual fix involves either use of views or temporary tables so the database is selecting from one while updating the other. 3. Describe the use of %ROWTYPE and %TYPE in PL/SQL Level: Low Expected answer: %ROWTYPE allows you to associate a variable with an entire tabl e row. The %TYPE associates a variable with a single column type. 4. What packages (if any) has Oracle provided for use by developers? Level: Intermediate to high Expected answer: Oracle provides the DBMS_ series of packages. There are many wh ich developers should be aware of such as DBMS_SQL, DBMS_PIPE, DBMS_TRANSACTION, DBMS_LOCK, DBMS_ALERT, DBMS_OUTPUT, DBMS_JOB, DBMS_UTILITY, DBMS_DDL, UTL_FILE. If they can mention a few of these and describe how they used them, even better . If they include the SQL routines provided by Oracle, great, but not really wha t was asked. 5. Describe the use of PL/SQL tables Level: Intermediate Expected answer: PL/SQL tables are scalar arrays that can be referenced by a bin ary integer. They can be used to hold values for use in later queries or calcula tions. In Oracle they will be able to be of the %ROWTYPE designation, or RECORD. 6. When is a declare statement needed ? Level: Low The DECLARE statement is used in PL/SQL anonymous blocks such as with stand alon e, non-stored PL/SQL procedures. It must come first in a PL/SQL stand alone file if it is used.
7. In what order should a open/fetch/loop set of commands in a PL/SQL block be i mplemented if you use the %NOTFOUND cursor variable in the exit when statement? Why? Level: Intermediate Expected answer: OPEN then FETCH then LOOP followed by the exit when. If not spe cified in this order will result in the final return being done twice because of the way the %NOTFOUND is handled by PL/SQL. 8. What are SQLCODE and SQLERRM and why are they important for PL/SQL developers ? Level: Intermediate Expected answer: SQLCODE returns the value of the error number for the last erro r encountered. The SQLERRM returns the actual error message for the last error e ncountered. They can be used in exception handling to report, or, store in an er ror log table, the error that occurred in the code. These are especially useful for the WHEN OTHERS exception. 9. How can you find within a PL/SQL block, if a cursor is open? Level: Low Expected answer: Use the %ISOPEN cursor status variable. 10. How can you generate debugging output from PL/SQL? Level:Intermediate to high Expected answer: Use the DBMS_OUTPUT package. The DBMS_OUTPUT package can be use d to show intermediate results from loops and the status of variables as the pro cedure is executed, however output only occurs after processing is finished, whi ch might not be useful if processing takes a long time. The package UTL_FILE can be used to write to a file, but one must have write access to the output direct ory. A third possibility is to create a log table and have the procedure write t o the table. This will give you debugging information in real time. 11. What are the types of triggers? Level:Intermediate to high Expected Answer: There are 12 types of triggers in PL/SQL that consist of combin ations of the BEFORE, AFTER, ROW, TABLE, INSERT, UPDATE, DELETE and ALL key word s: BEFORE ALL ROW INSERT AFTER ALL ROW INSERT BEFORE INSERT AFTER INSERT etc. trigger, cursor, index,VIEW,clusters,synonyms,
View more...
Comments