Object Oriented

Published on June 2017 | Categories: Documents | Downloads: 20 | Comments: 0 | Views: 346
of 18
Download PDF   Embed   Report



The object oriented programming is commonly known as OOP. Most of the languages are developed using OOP concept. Object-oriented programming (OOP) is a programming concept that uses "objects" to develop a system. A programming object has an ability to perform actions and has attributes. It performs just like real world entities for e.g. a motor bike. A bike performs actions such as 'Start', 'Stop' etc., and it has attributes like red color, 150 cc etc. So does an Object. Actions and attributes are represented by Methods and fields or properties respectively in programming language. An object hides the implementation details and exposes only the functionalities and parameters it requires to its client. Here also an object shares the same concept as that of a bike. While driving a motor bike, we are unaware of its implementation details such as how it is developed, internal working of gears etc.? We know only the functions or actions it can perform.

Q2. What is the function of SMON?
The SMON background process performs all system monitoring functions on the oracle database. Each time oracle is re-started, SMON performs a warm start and makes sure that the transactions that were left incomplete at the last shut down are recovered. SMON performs periodic cleanup of temporary segments that are no longer needed.

Q3. Explain different types of segment.
There are four types of segments used in Oracle databases: - data segments - index segments - rollback segments - temporary segments Data Segments: There is a single data segment to hold all the data of every non clustered table in an oracle database. This data segment is created when you create an object with the CREATE TABLE/SNAPSHOT/SNAPSHOT LOG command. Also, a data segment is created for a cluster when a CREATE CLUSTER command is issued. The storage parameters control the way that its data segment's extents are allocated. These affect the efficiency of data retrieval and storage for the data segment associated with the object. Index Segments: Every index in an Oracle database has a single index segment to hold all of its data. Oracle creates the index segment for the index when you issue the CREATE INDEX command. Setting the storage parameters directly affects the efficiency of data retrieval and storage. Rollback Segments Rollbacks are required when the transactions that affect the database need to be undone. Rollbacks are also needed

during the time of system failures. The way the roll-backed data is saved in rollback segment, the data can also be redone which is held in redo segment. A rollback segment is a portion of the database that records the actions of transactions if the transaction should be rolled back. Each database contains one or more rollback segments. Rollback segments are used to provide read consistency, to rollback transactions, and to recover the database. Types of rollbacks: - statement level rollback - rollback to a savepoint - rollback of a transaction due to user request - rollback of a transaction due to abnormal process termination - rollback of all outstanding transactions when an instance terminates abnormally - rollback of incomplete transactions during recovery. Temporary Segments: The SELECT statements need a temporary storage. When queries are fired, oracle needs area to do sorting and other operation due to which temporary storages are useful. The commands that may use temporary storage when used with SELECT are: GROUP BY, UNION, DISTINCT, etc.

Q4. Explain SGA memory structures.
SGA (System Global Area) is a dynamic memory area of an Oracle Server. In SGA,the allocation is done in granuels. The size of the SGA is dependent on SGA_MAX_SIZE parameter. The memory structures contained by SGA are:Shared Pool this memory structure is divided into two sub-structures which are Library Cache and Data Dictionary Cache for storing recently used PL/SQL statements and the recent data definitions. The maximum size of the Shared Pool depends on the SHARED_POOL_SIZE parameter. Database Buffer Cache – This memory structure improves the performance while fetching or updating the recently used data as it stores the recently used datafiles. The size of this block is decided by DB_BLOCK_SIZE. Redo Log Buffer – This memory structure is used to store all the changes made to the database and it's primarily used for the data recovery purposes. The size of this block is decided by LOG_BUFFER. Java Pool – This memory structure is used when Java is installed on the Oracle server. Size that can be used is stored in parameter named JAVA_POOL_SIZE. Large Pool – This memory structure is used to reduce the burden of the Shared Pool, as the Session memory for the Shared Server, as the temporary storage for the I/O and for the backup and restore operations or RMAN. Parameter that stores the maximum size is LARGE_POOL_SIZE

Q5. What is SQL Loader? Explain the files used by SQL Loader to load file.
SQL*Loader is a bulk loader utility used for moving data from external files into the Oracle database. SQL*Loader supports various load formats, selective loading, and multi-table loads. When a control file is fed to an SQL*Loader, it writes messages to the log file, bad rows to the bad file and discarded rows to the discard file. Control file The SQL*Loader control file contains information that describes how the data will be loaded. It contains the table name, column datatypes, field delimiters, etc. controlfile.sql should be used to generate an accurate control file for a given table. Log File The log file contains information about the SQL*loader execution. It should be viewed after each SQL*Loader job is complete

Q6. Explain the methods provided by SQL Loader.
Conventional Path Load and Direct Path Load are the two methods of loading data. Conventional Path Load is the default loading method and uses the SQL‟s INSERT statements. It takes the following form: INSERT INTO TABLE T partition (P) VALUES ... The row is loaded if it maps with the portioned else an error log is written. Direct Path Load: This method is faster than the conventional load method. In this method, the data to be loaded is parsed as per the description in the loader control file. It converts data for each input field with its corresponding data type and builds pairs in the form of <length, data> pairs). The SQL *Loader then uses these pairs to build index keys and formats the oracle data blocks as per the pairs. These blocks are then written into the database. This reduces the processing load as compared to INSERT statement.

Q7. What is the physical and logical structure of oracle?
Logical Database structures Logical structures include tablespaces, schema objects, data blocks, extents and segments. Tablespaces Database is logically divided into one or more tablespaces. Each tablespace creates one or more datafiles to physically store data. Schema objects Schema objects are the structure that represents database's data. Schema objects include structures such as tables, views, sequences, stored procedures, indexes, synonyms, clusters and database links. Data Blocks Data block represents specific number of bytes of physical database space on disk. Extents An extent represents continuous data blocks that are used to store specific data information. Segments A segment is a set of extents allocated for a certain logical structure.

Physical database structure The physical database structure comprises of datafiles, redo log files and control files Datafiles Datafiles contain database's data. The data of logical data structures such as tables and indexes is stored in datafiles of the database. One or more datafiles form a logical unit of database storage called a tablespace. Redo log files The purpose of these files is to record all changes made to data. These files protect database against failures. Control files Control files contain entries such as database name, name and location of datafiles and redo log files and time stamp of database creation

Q8. Explain the categories of oracle processes i.e. user, data writing processes, logging processes
and monitoring processes.
   
User process – User process is used in invocation of application software. Data writing process - A database writer process is used to write buffer content into a datafile. They are specifically used to write “dirty block” to data files from the buffer. Logging processes - Log writer is used to write the redo log buffer from system global area to online redo log file. Only those redo entries are written hat have been copied into the buffer since the last time it wrote. Monitoring process - this can be either a system monitor process or a process monitor process. System monitor process is mainly used for crash recovery and cleaning up of temporary segments. Process monitor is used to clean all resources acquired by a failed process

Q9. What are the Back ground processes in Oracle?
There are a number of background processes running. Each process is used for a specific job.

       

SMON – system monitor process is used to clean temporary segments and crash recovery of a crashed instance. PMON – process monitor is used to clean all resources acquired by a failed process. DBWR- Database writer is used to write “dirty block” to data files from the buffer. LGWR - Log writer is used to write the redo log buffer from system global area to online redo log file. MMAN – Memory manager process is used to manage the memory. ARCn - Archiver 0-9 is used for writing the online redo log files to the mentioned archive log destination after a log switch has occurred. CKPT – checkpoint process using the checkpoints information signals the synchronization of all database files. Used for database consistency and faster database recovery. LCK0 -9 – LOCK process is used to lock shared resources for manages the global enqueue requests and the cross-instance broadcast

Q10. What are various Oracle Operator?
Different operators: Unary operators:- Operates on one operand. Binary:- Operates on two operands. Arithmetic operators:- Used to perform basic arithmetic operations like addition, subtraction etc. they are listed below:

    

+ - - Denotes positive or negative expression. They are unary operators. */- Denotes multiplication or division. They are binary operators. ||- Concatenates strings =, !=. <, >, <=, >= are all comparison operators. OR, AND, NOT are all logical operators

Example: SELECT * FROM emp WHERE job = 'CLERK' AND deptno = 10;

Q11. What is IN operator?
IN operator in a query allows you to have multiple values in a WHERE clause. Example: to return records of employees staying in Pune and Mumbai. Select * from employee Where employee_location IN („Pune‟, „Mumbai‟);

Q12. What is Like operator?
LIKE in oracle enables the user to search for a string of the matching type. “%” is used as a wild card in the query. Example: The query below will display results of student names starting with A SELECT stud_name FROM dept WHERE student_name LIKE 'A%';

Q13. Define Is Null operator.
IS NULL operator is usually used to check if a columns value is NULL or not. Example: select * from student where student_name IS NOT NULL;

Q14. What is NVL() function?
Oracle deals with Null values using NVL function. The function replaces the NULL value in the given column with the value provide to it. The function accepts two parameters, the first one is the column name and the second one is the value with which NULL has to be replaced. Example Select Amount – NVL(Disc, 0) from Price

Q15. What is composite data type?
A composite data type could be a record, table, nested table, varray. This is so because all of them are composed of multiple data types. For instance, a RECORD has fields, its values etc. Each field has a name and a different data type. A RECORD can have multiple fields whose initial values can be NOT NULL.

Example: Creating a record to store name and id of student: TYPE student_data IS RECORD ( First_name VARCHAR(20), Id NUMBER(2), ); Create a record type to hold the values declared above: Student_record student_data; To access a field: Student_record.id Assign a value: Student_record.id=1

Q16. Explain the types of composite data type.
Following are the types of composite data types: RECORD – PL/SQL records are similar to C structures. A record provides with a way to deal with separate but related variables as a unit. TABLE – They are similar to arrays in C. However, they are implemented differently. In order to declare a PL/SQL table, you need to first define a table type, then you declare a variable of this type

Q17. Explain the constraints that can be applied to Oracle tables.
Oracle constraints are usually used to maintain integrity of data. The different types of constraints include:-

CHECK constraint: This constraint specifies a condition for a row. Example: Create table employee ( Id, varchar(10), CONSTRAINT id CHECK (id BETWEEN 10 and 1000) ); NOT NULL constraint: This specifies that a column cannot accept NULL values. Example: Create table employee ( Id, varchar(10) NOT NULL, CONSTRAINT id CHECK (id BETWEEN 10 and 1000) ); Primary key constraint: This constraint ensures that each row is identified by a unique key. Example: Create table employee ( Id, varchar(10) NOT NULL, Roll_number INTEGER(10);

CONSTRAINT id PRIMARY KEY(Roll_number) ); Unique Constraint: This constraint ensures no columns value has repetitive values. Example: Create table employee ( Id, varchar(10) NOT NULL, Roll_number INTEGER (10); CONSTRAINT id UNIQUE (Roll_number) );

Q18. Explain various types of constraints in Oracle.
Oracle "Check" Constraint: It validates incoming columns at row insert time. Not Null Constraint: It is used to specify that a column may never contain a NULL value. Primary Key Constraint: It is used to identify the primary key for a table. This operation requires that the primary columns are unique, and it creates a unique index on the target primary key. References Constraint: This is the foreign key constraint and is only applied during INSERT and DELETE. Unique Constraint: It is used to ensure that all column values within a table never contain a duplicate entry

Q19. What is an integrity constraint?
Integrity constraints define a business rule for a column of the table. They are defined with a table and are stored as part of a table‟s definition. Types of integrity constraints supported by oracle are NOT NULL integrity constraint Unique Key integrity constraint Primary Key integrity constraint Foreign key integrity constraint Check integrity constraint

Q20. xplain the differences between char and varchar2 data types.
When a column is of type char, the memory used will not be dependent on the value. It entirely depends on the bytes defined. Example: Name CHAR(10) Each value will occupy 10 bytes of memory space even though the value may be of a smaller size. When a column is of type varchar2, the memory used entirely depends on the value of the column Example: Name VARCHAR2(10)

Each value will occupy “x” bytes of memory space depending on the value. To summarize, char data type is usually used when the value of fixed size is ascertained; for example Student id. On the other hand, varchar2 should be used for variable length of data; for example Name

Q21. Explain BLOB, CLOB, NCLOB and BFILE.
These are the built in large object data types.

    

BLOB, CLOB, NCLOB are stored internally where as BFILE is stored externally The BLOB data type stores binary large objects. The CBLOB data type stores character large objects. The NCBLOB data type stores character large objects in multibyte national character set. The BFILE data type enables access to binary file LOBs that are stored in file systems outside the Oracle database.

All these data types have a capacity of 4GB

Q22. Explain ROWID in oracle.
A ROWID in oracle is a pseudo column that is not within the database. It is used to uniquely identify a row with a table. The rowid values are used to locate necessary information to locate a row. Example: Below query selects address of all rows that contain data for students in department 20 SELECT ROWID, last_name FROM student WHERE department_id = 20;

Q23. What is a LOB data type?
LOB or Large Object data type is used to store large amount of data. This data is usually in an unstructured form like images, video clips etc. Maximum size is 4gigabytes. BLOB, CLOB, NCLOB, and BFILE come under this category of data type.

Q24. Explain DCL command.
DCL: Data Control Language DCL are used to configure and control database objects. Following are the DCL commands: GRANT REVOKE

Q25. What is TCL command?
TCL - Transaction Control: statements used to manage the changes made by DML statements. It allows statements to be grouped together into logical transactions.

   

COMMIT - save work done SAVEPOINT - identify a point in a transaction to which you can later roll back ROLLBACK - restore database to original since the last COMMIT SET TRANSACTION - Change transaction options like isolation level and what rollback segment to use

Q26. List the differences between GRANT and REVOKE command.
By using the GRANT command you can grant an system level previledge or role to another user. The WITH ADMIN OPTION clause permits permits the guarantee to bestow the privilege or role on other users. The grantor can revoke the role from the user as well. Privileges granted can be taken away. An individual with DBA role can revoke CONNECT, RESOURCE and DBA or any other privilege from anyone including DBA

Q27. Explain ROLLBACK and COMMIT command.
The transactions like update, insert or delete can be undone with the help of rollback command. This is helpful when an introduced during your work. COMMIT can be used to reflect the changes in the database. Until you commit, you can only see how your work affects the tables. Anyone who is accessing the database would be able to see the changes only after you have committed it. This is with the help of CMMIT command

Q28. What are difference between post database commit and post-form commit?
Post-Database-Commit It fires once during the Post and Commit Transactions process, after the database commit occurs. It fires after Oracle Forms issue the Commit to finalize the transaction. The Post-Forms-Commit It fires once during the Post and Commit Transactions process. If there are records in the form that have been marked as inserts, updates, or deletes, this trigger fires after these changes have been written to the database but before Oracle Forms issues the database Commit to finalize the transaction. If the operator or the application initiates a Commit when there are no records in the form have been marked as inserts, updates, or deletes,then Oracle Forms fires these, without posting changes to the database

Q29. What is Exception in Oracle?
Errors occur during runtime processing due to either hardware or network failure or application logic errors are known as exception. Types of Exceptions in Oracle Predefined Oracle Exception User-Defined Exceptio

Q30. What are the predefined oracle exceptions?
Following is the predefined oracle exceptions No_data_found Too_many_rows Zero_divide Login_denied Program_error Timeout_on_resource Invalid_cursor Cursor_already_open Dup_val_on_index

Q31. Explain user defined exceptions in oracle.
User defined exception in oracle are defined by the user. They need to be explicitly raised by the user using the RAISE statement. Oracle is not aware of these exceptions unless declared. Example: DECLARE Trans EXCEPTION; BEGIN IF TO_CHAR(SYSDATE, ‘DY’)= ‘SUN’ THEN RAISE Trans; END IF EXCEPTION WHEN trans THEN DBMS_OUTPUT.PUT_LINE(‘No transactions today’); END;

Q32.How PL/SQL Exceptions Are Raised?
The PL/SQL exceptions can be raised in 4 ways. Either the user can raise them or they can be raised by the PL/SQL engine. They are as follows: The PL/SQL runtime engine raised named system exception: These exceptions are raised automatically by the program. You cannot control when PL/SQL will raise a system exception. The programmer raised named exception: The programmer can use an explicit call to the RAISE statement to raise a programmer-defined or system-named exception. The programmer raised unnamed, programmer-defined exception: These are raised with an explicit call to the RAISE_APPLICATION_ERROR procedure in the DBMS_STANDARD package. The programmer re-raised "current" exception: From within an exception handler, you can re-raise the same exception for propagation to the enclosing block

Q33. Explain the guidelines for Avoiding and Handling PL/SQL Errors and Exceptions.
Guidelines for Avoiding and Handling PL/SQL Errors and Exceptions

       

Use both error checking and exception handling to ensure your program can handle all possibilities. Add exception handlers whenever there is any possibility of an error occurring. Add error-checking code whenever you can predict that an error might occur if your code gets bad input data. Make your programs robust enough to work even if the database is not in the state you expect. Handle named exceptions whenever possible, instead of using WHEN OTHERS in exception handlers. Test your code with different combinations of bad data to see what potential errors arise. Write out debugging information in your exception handlers. Carefully consider whether each exception handler should commit the transaction, roll it back, or let it continue

Q34. Explain the types of Exceptions.
Predefined oracle exceptions These are the PL/SQL runtime engine raised named system exceptions. These exceptions are raised automatically by the program. You cannot control when PL/SQL will raise a system exception. User-defined exceptions These are programmer raised named exceptions. The programmer can use an explicit call to the RAISE statement to raise a programmer-defined or system-named exception. The programmer can also raise unnamed, programmerdefined exceptions and re-raised "current" exceptions

Q35. What are conversion functions?
CHARTOROWID Converts a string to a ROWID. CONVERT Converts a string from one character set to another. HEXTORAW Converts from hexadecimal to raw format. RAWTOHEX Converts from raw value to hexadecimal. ROWIDTOCHAR Converts a binary ROWID value to a character string. TO_CHAR Converts a number or date to a string. TO_DATE Converts a string to a date. TO_NUMBER Converts a string to a number.

Q36. What is nested function?
A nested function is a function defined another function. Result of one function is used as an argument to another function.

Example: int E(int x) { int F(int y) { return x + y; } return F(3); } Q37.What are SQL functions in oracle? There are two types of SQL functions in Oracle. User defined and Predefined functions. User defined functions are written by the user and predefined are the inbuilt functions in Oracle. SQL functions here are being referred to Predefined functions. These functions when called with an unexpected data type argument, Oracle attempts to convert the argument to the expected data type before performing the SQL function. MIN, MAX, ROUND etc are some functions in Oracle.

Q38.. Explain IN, OUT and INOUT in procedures.
Values passed to on oracle function can be either of type IN, OUT or INOUT which decides how variables can be used within the procedure. IN: A variable passed in this mode is of read only nature. This is to say, the value cannot be changed and its scope is restricted within the procedure. The procedure receives a value from this argument when the procedure is called. OUT: In this mode, a variable is write only and can be passed back to the calling program. It cannot be read inside the procedure and needs to be assigned a value. INOUT: This procedure has features of both IN and OUT mode. The procedure can also read the variables value and can also change it to pass it to the calling function.

Q39. What are the rules of writing package?
Packeges are PL/SQl constructs that allow related data to be stored together. A package has two parts: specification and a body. The syntax of writing a package is: CREATE [OR REPLACE] PACKAGE pkg_name {IS | AS} procedure_specification | function_specification | variable_declaration | type_definition | exception_declaration | cursor_declaration END [pkg_name]; Thus the rules of writing a package would be:

A package should have a name,

 

The elements within the package should be the same as they are in the declarative section of an anonymous block. The same syntax rules apply to the package header as the declarative section, except for the procedures and the functions declarations

Q40. What are the use of Export and Import command?
Import and export in Oracle is used to move logical objects like tables in and out of the database. Example: Export entire database in db..dmp file:exp SYSTEM/password FULL=y FILE=dba.dmp LOG=dba.log CONSISTENT=y FULL specifies the entire database to be dumped

Q41. What are the parameters to be provided while executing Export and Import commands?
The parameters that need to be provided while executing IMPORT or EXPORT commands are: The file name Write access The commit count number The nickname For example: IMPORT FROM file_1.ixf OF IXF ALLOW WRITE ACCESS COMMITCOUNT 20 INSERT INTO NICKNAME_1;

Q42. What is the difference between the SQL*Loader and IMPORT utilities?
SQL*Loader is a bulk loader utility used for moving data from external files into the Oracle database. SQL*Loader supports various load formats, selective loading, and multi-table loads. Oracle's export (exp) and import (imp) utilities are used to perform logical database backup and recovery. When exporting, database objects are dumped to a binary file which can then be imported into another Oracle database

Q43. Explain sub-queries in brief.
A sub-query is a query within a query. It is embedded within the WHERE clause of the first query. It is used to return data that is used in main query as a condition. Example: To return salary for the employee‟s id in employee table. Select emp_id, emp_name from employee Where emp_id IN (select emp_id FROM salary);

Q44. What are the different operators used in building sub queries?
Following operators can be used in building sub queries: IN: Allows multiple values to be checked. EXIST: Checks if a value exists. There are other logical operators like AND, OR and comparison operators like =, <, > can also be used. Example: Select emp_id, emp_name from employee Where emp_id IN (select emp_id FROM salary);

Q45. What are the guidelines for using SUB-QUERIES?
Following things need to be kept in mind when you write sub-queries:

 

Caution should be taken with simple sub-query, especially when a normal value operator is used on the results of a sub-query, only one field must be returned If you want to check for the existence of a single value within a set of other values, use the IN keyword as an operator upon the result set from a sub-query.

Example of a Sub-Query: SELECT name FROM students WHERE stud_id = (SELECT stud_id FROM class WHERE last_name='abc' AND first_name='xyz');

Q46. What is correlated sub-query?
In a simple SubQuery, the result retrieved by the inner query is fed to the outer query. The outer query takes the result as its input and processes it to produce its output. However, in a corelated sub query, a correlated sub-query is dependent upon the outer query. The outer query and the sub-query are related typically through a WHERE statement located in the sub-query. The sub query gives a reference to the outer query. Then the outer query executes and the result is returned to the sub query. Finally the sub query is executed for every row that is selected by the outer query

Q47. Explain drop and truncate table command.
TRUNCATE removes all rows from a table. The operation cannot be rolled back and no triggers will be fired. The following example will show what a TRUNCATE does: SQL> TRUNCATE TABLE emp; Table truncated. The DROP command removes a table from the database. All the tables' rows, indexes and privileges will also be removed. No DML triggers will be fired. The operation cannot be rolled back.

The following example will show what a DROP does: SQL> DROP TABLE emp; Table dropped

Q48. Write the command to view the structure of the table.
The structure of a table can be viewed using the DESCRIBE TABLE_NAME command. This command shows the entire schema of the table.

Q49. What are the limitation of alter command?
ALTER Command supports only the RENAME TABLE and ADD COLUMN variants. Other kinds of ALTER TABLE operations such as DROP COLUMN, ALTER COLUMN, ADD CONSTRAINT are omitted

Q50. Explain Alter Table Command.
Alter Table command is a DDL command that is used to change the definition of the table. Changing definition means changing datatype, width of columns or adding a new column in the table

Q51. Explain the use of Alter Table command. Explain with an example.
ALTER table command is used to modify a table‟s column attributes, renaming a table or column etc. Example: 1. 2. Add column to an existing table ALTER table student ADD COLUMN department varhchar(100); Rename a table ALTER table student RENAME TO studentdata;

Q52. Explain types of tables in oracle.
In Oracle, tables are the basic storage units. There are several types of database tables. Different types of tables have different characteristics. Heap Organized Table: The default table type in Oracle is heap table. If you use “create table” clause normally, you create a standard database table. Exp: create table A ( x char ); Object Table This type of table is created based on an object type and not collection of columns. It is usually used in special cases. The logic depends on object-oriented programming. “create table ” statement for object tables is:

create table test of x_type; create or replace type atype as object ( a varchar2(30), b date ) Create table p of atype; Index Organized Tables Index Organized Tables have their primary key and non-key column data stored within the same B-Tree structure. The data is stored within the primary key index. Use: IOTs make accessing data via the primary key quicker as the key and the data reside in the same structure. Since there is no need to read an index, the table data is read in a separate structure. Less duplication of the key columns in an index and table mean low storage requirements. Hash clustered tables Hash clusters provide a good facility for storage and retrieval. In the case of a heap table, the rows are not sorted in a user-controlled manner. Oracle hash cluster tables can improve random row access speed by foour times as the hash can get the row location far faster than index access. Multiple table hash clusters store logically-related rows on a single data block due to which you can access a whole unit of data in a single physical I/O. Nested tables Nested table can be used to link the subordinate data items to the base table using the object ID (OID). Oracle objects can be directly referenced by using pointers as opposed joining relational. Objects in standard relational databases need to be reassembled every time it is used. Index cluster tables An index cluster uses an index to maintain row sequence. A table cluster is a group of tables that share the same data blocks, since they share common columns and are often used together. All rows for each table are stored in the same data blocks, When you create cluster tables are created.

The cluster key value is the value of the cluster key columns for a particular row. Index cluster tables can be either multi-table or single-table

Q53. Global temporary tables.
The maintenance and management of temporary tables can be delegated to the server by using Global Temporary Tables. The data in a global temporary table is private. CREATE GLOBAL TEMPORARY TABLE table_a ( x NUMBER, y NUMBER ) ON COMMIT PRESERVE ROWS;

Q54. What is trigger in oracle?
Triggers are constructs in PL/SQL that need to be just created and associated with a table. Once they are created, when the table associated with it gets updated due to an UPDATE, INSERT or a DELETE, the triggers get implicitly fired depending upon the instructions passed to them

Q55. What are the types of triggers?
The types of triggers are:

  

Row level triggers Statement level triggers BEFORE and AFTER triggers

Q56. How the triggers are attached to the table?
When we write a trigger, we also have to give the reference of the table the trigger has to be fired on. The Data Dictionary too is used for this purpose. The view includes the trigger body, WHEn clause, triggering table, and trigger type.

Q57. What are triggering attributes?
Triggers can be fired based on the following criteria: Category - (INSERT, DELETE, UPDATE) i.e. which kind of DML statement causes the trigger to fire. Timing – (BEFORE or AFTER) i.e. whether the trigger fires before the statement is executed of after. Level – (Row or Statement) i.e. whether it fires once for each row affected by trigger statement or whether it fires once.

Q58. Difference between database triggers and form triggers.
Database triggers (DBA)

   

Fired when a DML operation is performed They manipulate data stored in Oracle tables They can cause other database triggers to fire. They can be fired from any session executing the triggering DML statements.

Form trigger (FT)

   

Fired in response to any event that takes place while working with the forms. They manipulate data in Oracle tables as well as variables in forms. They cannot cause other form triggers to fire, but can fire other database triggers. They can be fired only from the form that define the trigger

Q59. What is the content view and stacked view?
In a window that is displayed, the content view occupies the entire content pane. A stacked view is not the base view for the window to which it is Assigned. However, content view is the base view and this is how it differs from the stacked view.

Q60. Explain the different types of canvas views.
Different types of Canvas views:1. 2. 3. Stacked Canvas Views:- A view that is displayed on top of the content canvas of the same window. Content Canvas Views:- This is the main view that occupies the entire window pane. Horizontal/Vertical Toolbar Canvas Views: - Tool bars fall under this category of canvas views that may be displayed vertically or horizontally.

Sponsor Documents

Or use your account on DocShare.tips


Forgot your password?

Or register your new account on DocShare.tips


Lost your password? Please enter your email address. You will receive a link to create a new password.

Back to log-in