Oracle SQL / PLSQL Developer – Technical Question Answers – Part 5


 

 

Question: What are the Pct Free and Pct Used


Answer:  Pct Free is used to denote the percentage of the free space that is to be left when creating a table. Similarly Pct Used is used to denote the percentage of the used space that is to be used when creating a table eg.:: Pctfree 20, Pctused 40 
 
 

 

 
 
 
 

 

Question: What is Row Chaining

Answer: The data of a row in a table may not be able to fit the same data block.Data for row is stored in a chain of data blocks. 
 
 

 

 
 
 
 

 

Question: What is a 2 Phase Commit
Answer: Two Phase commit is used in distributed data base systems. This is useful to maintain the integrity of the database so that all the users see the same values. It contains DML statements or Remote Procedural calls that reference a remote object. There are basically 2 phases in a 2 phase commit.
a) Prepare Phase :: Global coordinator asks participants to prepare
b) Commit  Phase ::

Commit all participants to coordinator to Prepared, Read only or abort Reply 
 
 

 

Question: What is the difference between  deleting and truncating of tables
 
 
 

 

Answer:  Deleting   a table will not remove the rows from the table but entry is there in  the database dictionary and it can be retrieved But truncating a table deletes it completely and it cannot be retrieved. 
 
 

 

 
 
 
 

 

Question: What are mutating tables

Answer: When a table is in state of transition it is said to be mutating eg :: If a row has been deleted then the table is said to be mutating and no operations can be done on the table except select. 
 
 

 

 
 
 
 

 

Question:  What are Codd Rules
Answer:  Codd Rules describe the ideal nature of a RDBMS. No RDBMS satisfies all the 12 codd rules and Oracle Satisfies 11 of the 12 rules and is the only Rdbms to satisfy the maximum number of rules.

Question: What is the Difference between a post query and a pre query

Answer: A post query will fire for every row that is fetched but the pre query will fire only once. 
 
 

 

 
 
 
 

 

Question:  Deleting the Duplicate rows in the table

Answer: We can delete the duplicate rows in the table by using the Rowid 
 
 

 

 
 
 
 

 

Question: Can U disable database trigger? How?
Answer: Yes. With respect to table
     ALTER TABLE TABLE
     [   DISABLE all_trigger ]


Question: What is pseudo columns ? Name them?
Answer:  A pseudocolumn behaves like a table column, but is not actually stored in the table.  You can select from pseudocolumns, but you cannot insert, update, or delete their values. 

   * CURRVAL
    * NEXTVAL
    * LEVEL
    * ROWID
    * ROWNUM 
 
Question:  How many columns can table have?

 

 

 

 
 

 

 
 

 

 
 
 

 

Answer: The number of columns  in a table can range from 1 to 254. 
 
 

 

 
 
 
Question:  What is clustered index?

 

Answer:  In an indexed cluster, rows are stored together based on their cluster key values. Can not apply for HASH. 
 
 

 

 
 
 
Question:  What are attributes of cursor?

 

Answer:    %FOUND, %NOTFOUND, %ISOPEN, %ROWCOUNT 
 
 

 

 
 
 
Question: Can you use select in FROM clause of SQL select?
Answer:  Yes.

 

Advertisements

Oracle Forms Development (Developer 2000) : Part 1


Question: Which triggers are created when master -detail relation?
Answer:

1) master delete property*  NON-ISOLATED (default)
a) on check delete master
b) on clear details
c) on populate details
 *  ISOLATED
a) on clear details
b) on populate details
*  CASCADE
a) per-delete
b) on clear details
c) on populate details

 
Question: which system variables can be set by users?

 

Answer:
SYSTEM.MESSAGE_LEVEL
SYSTEM.DATE_THRESHOLD
SYSTEM.EFFECTIVE_DATE
SYSTEM.SUPPRESS_WORKING

 

 
 
 

 

 

Question: What are object group?
Answer: An object group is a container for a group of objects. You define an object group when you want to package related objects so you can copy or reference them in another module.

Question: What are referenced objects?


Answer: Referencing allows you to create objects that inherit their functionality and appearance from other objects. Referencing an object is similar to copying an object, except that the resulting reference object maintains a link to its source object. A reference object automatically inherits any changes that have been made to the source object when you open or regenerate the module that contains the reference object. 

 
 
 

Question: Can you issue DDL in forms?
Answer: yes, but you have to use FORMS_DDL.


Restrictions: The statement you pass to FORMS_DDL may not contain bind variable

references in the string, but the values of bind variables can be concatenated into the string before passing the result to FORMS_DDL.   
Question: What is SECURE property?

 

Answer: – Hides characters that the operator types into the text item.  This setting is typically used for  password protection.

 

 
 
 

 

 

Question: What are the types of triggers and how the sequence of firing in text item
Answer: Triggers can be classified as Key Triggers, Mouse Triggers ,Navigational Triggers.
Key Triggers: Key Triggers are fired as a result of Key action.e.g :: Key-next-field, Key-up,Key-Down
Mouse Triggers: Mouse Triggers are fired as a result of the mouse navigation.e.g. When-mouse-button-presed,when-mouse-doubleclicked,etc
Navigational Triggers :: These Triggers are fired as a result of Navigation. E.g :  Post-Text-item,Pre-text-item.
We also have event triggers like when –new-form-instance and when-new-block-instance. We cannot call restricted procedures like go_to(‘my_block.first_item’) in the Navigational triggers But can use them in the Key-next-item.


The Difference between Key-next and Post-Text is an very important question. The key-next is fired as a result of the key action while the post text is fired as a result of the mouse movement. Key next will not fire unless there is a key event.
The sequence of firing in a text item are as follows::
    a) pre – text
    b) when new item
    c) key-next
    d) when validate
    e) post text 

 
 
 

Question: Can you store pictures in database? How?


Answer: Yes, in long raw datatype. 

 
 
 

Question: What are property classes? Can property classes have trigger?


Answer: Property class inheritance is a powerful feature that allows you to quickly define objects that conform to your own interface and functionality standards. Property classes also allow you to make global changes to applications quickly.  By simply changing the definition of a property class, you can change the definition
of all objects that inherit properties from that class. Yes. All type of triggers. 

 
 
 

Question: If you have property class attached to an item and you have same trigger written for the item.  Which will fire first?
Answer: Item level trigger fires , If item level trigger fires, property level trigger won’t fire. Triggers at the lowest level are always given the first preference. The item level trigger fires first and then the block and then the Form level trigger.
 
Question: What are record groups?  Can record groups created at run-time?

Answer: A record group is an internal Oracle Forms data structure that has a column/row framework similar to a database table.  However, unlike database tables, record groups are separate objects that belong to the form module in which they are defined.  A record group can have an unlimited number of columns of type CHAR, LONG, NUMBER, or DATE provided that the total number of columns does not exceed 64K.  Record group column names cannot exceed 30 characters.Programmatically, record groups can be used whenever the functionality offered by a two-dimensional array of multiple data types is desirable.
TYPES OF RECORD GROUP:
Query Record Group    A query record group is a record group that has an associated SELECT statement. 

The columns in a query record group derive their default names, data types, and lengths from the database columns referenced in the SELECT statement.  The records in a query record group are the rows retrieved by the query associated with that record group.
Non-query Record Group: A non-query record group is a group that does not have an associated query, but whose structure and values can be modified programmatically at runtime.
Static Record Group: A static record group is not associated with a query; rather, you define its structure and row values at design time, and they remain fixed at runtime.
 

 

 Shivmohan Purohit

 

 

Oracle Forms Development (Developer 2000): Part 2


Question: What are ALERT?


Answer: An ALERT is a modal window that displays a message notifiying operator of some application condition.
Question: Can a button have icon and label at the same time?


Answer: NO
Question: What is mouse navigate property of button?


Answer: When Mouse Navigate is True (the default), Oracle Forms performs standard navigation to move the focus to the item when the operator activates the item with the mouse.
When Mouse Navigate is set to False, Oracle Forms does not perform navigation (and the resulting validation) to move to the item when an operator activates the item with the mouse.
Question: What is FORMS_MDI_WINDOW?


Answer: forms run inside the MDI application window. This property is useful for calling a form from another one.
Question: What are timers? When when-timer-expired does not fire?


Answer: The When-Timer-Expired trigger can not fire during trigger, navigation, or transaction processing.
Question: Can object group have a block?


Answer: Yes , object group can have block as well as program units.
Question:  How many types of canvases are there?
Answer: There are 2 types of canvases called as Content and Stack Canvas. Content canvas is the default and the one that is used mostly for giving the base effect. Its like a plate on which we add items and stacked canvas is used for giving 3 dimensional effect.

Question: What is a visual attribute?
Answer: Visual attributes are the font, color, and pattern properties that you set for form and menu objects that appear in your application’s interface.

Question: Diff. between VAT and Property Class?
Answer: Named visual attributes define only font, color, and pattern attributes; property classes can contain these and  any other properties. You can change the appearance of objects at runtime by changing the named visual attribute
programmatically; property class assignment cannot be changed programmatically. When an object is inheriting from both a property class and a named visual attribute, the named visual attribute settings take precedence, and any visual attribute properties in the class are ignored.

Question: Which trigger related to mouse?


Answer: When-Mouse-Click
When-Mouse-DoubleClick
When-Mouse-Down
When-Mouse-Enter
When-Mouse-Leave
When-Mouse-Move
When-Mouse-Up
Question: What is Current record attribute property?

Answer: Specifies the named visual attribute used when an item is part of the current record.
Current Record Attribute is frequently used at the block level to display the current row in a multi-record If you define an item-level Current Record Attribute, you can display a pre-determined item in a special color when it is part of the current record, but you cannot dynamically highlight the current item, as the input focus  changes.
Question: Can u change VAT at run time?


Answer: Yes. You can programmatically change an object’s named visual attribute setting to change the font, color, and pattern of the object at runtime.
Question: Can u set default font in forms?


Answer: Yes. Change windows registry (regedit). Set form45_font to the desired font.
Question: Can u have OLE objects in forms?


Answer: Yes.
Question: Can u have VBX and OCX controls in forms?


Answers: Yes.
Question: What r the types of windows (Window style)?


Answer:  Specifies whether the window is a Document window or a Dialog window.
10) What is OLE Activation style property?
10) Specifies the event that will activate the OLE containing item.
Question: Can u change the mouse pointer? How?


Answer: Yes. Specifies the mouse cursor style.  Use this property to dynamically change the shape of the cursor.

Question: What are savepoint mode and cursor mode properties? Level?


Answer: Specifies whether Oracle Forms should issue savepoints during a session. This property is included primarily  for applications that will run against non-ORACLE data sources.   For applications that will run against ORACLE, use the default setting.
Cursor mode – define cursur state across transaction Open/close.
Question: What are OPEN_FORM, CALL_FORM,NEW_FORM? Diff?


Answer: CALL_FORM : It calls the other form. but parent remains active, when called form completes the operation ,  it releases lock and control goes back to the calling form.
When you call a form, Oracle Forms issues a savepoint for the called form.  If the CLEAR_FORM function causes a rollback when the called form is current, Oracle Forms rolls back uncommitted changes to this savepoint.
OPEN_FORM: When you call a form, Oracle Forms issues a savepoint for the called form.  If the CLEAR_FORM function causes a rollback when the called form is current, Oracle Forms rolls back uncommitted changes to this savepoint.
NEW_FORM: Exits the current form and enters the indicated form.  The calling form is terminated as the parent form.  If the calling form had been called by a higher form, Oracle Forms keeps the higher call active and treats it as a call to the new form.  Oracle Forms releases memory (such as database cursors) that the terminated form was using.
Oracle Forms runs the new form with the same Runform options as the parent form.  If the parent form was a called form.
Question: What is call form stack?


Answer: When successive forms are loaded via the CALL_FORM procedure, the resulting module hierarchy is known as the call form stack.
Question: Can u port applictions across the platforms? how?
Answer: Yes, we can port applications across platforms.Consider the form developed in windows system.The form would be generated in unix system by using f60gen my_form.fmb scott/tiger