Oracle Questions

Q:

What is correlated query? Explain its uses.

Answer

In a correlated query, the outer query is related to the inner query. This means one or more columns in the outer query are referenced. It’s used when the outer queries value is being used by inner query. For example, we need to find which employee had more perks in the current month than they did in the previous month. The correlated subquery is executed for each row of perks information in the parent query to first determine what the perks were for each employee in the previous month. This data, in turn, is compared to perks for each employee in the current month, and only those employees whose perks in the current month were greater that their previous month's perks are returned.

Report Error

View answer Workspace Report Error Discuss

Subject: Oracle

0 1951
Q:

Explain primary key constraint.

Answer

Primary key constraint ensures that the column(s) always has a unique value to identify the record.
Example:
Below, the primary key is created for column id with name prim_id.
create table employee ( id number NOT NULL, Name varchar(200) Constraint prim_id primary key(id) );

Report Error

View answer Workspace Report Error Discuss

Subject: Oracle

0 1947
Q:

What is a synonym? What are its various types?

Answer

A synonym can be called as an alias for a table, view, sequence or program unit. It is basically of two types:
- Private - Only the owner can access it.
- Public - Can be accessed by any database user.

Report Error

View answer Workspace Report Error Discuss

Subject: Oracle

0 1933
Q:

What is an Index? Explain how to create an Index.

Answer

An index is a object which is used to improve performance during retrieval of records.


CREATE [UNIQUE] INDEX index_name 


ON employee[emp_id, emp_name,dept_id]


[COMPUTE STATISTICS]


The UNIQUE keyword is used when combined values of the index should be unique.


The COMPUTE STATISTICS during the creation of index optimizes the plan of execution of the SQL statement and improves performance.

Report Error

View answer Workspace Report Error Discuss

Subject: Oracle

0 1920
Q:

Could you explain the areas where tuning of database is required?

Answer

The following are the areas of concern for tuning:


- Memory Usage


- Data Storage


- Data Manipulation


- Physical Storage


- Logic Storage


- Network Traffic


Tuning Memory Usage: In Oracle 10g, we can use the Automatic Workload Repository (AWR) toolset to gather and manage statistical data but in case of Oracle 11g, we can use new initialization parameters such as MEMORY_TARGET to further control the overall memory used by Oracle. It helps us to tune the database automatically when we don’t have time to read the AWR report.


Tuning Data Manipulation: There are two ways to tune Data manipulation in Oracle one way is through Conventional Path mode and second is Direct Path mode.


Tuning Physical Storage: We need to tune the physical storage because it limits the disk in database. This can be done by: Distributing I/O, Striping and Mirroring.

Report Error

View answer Workspace Report Error Discuss

Subject: Oracle

0 1913
Q:

What is a PeopleSoft database?

Answer

Peoplesoft Database is similar to other database which is used to store data. Peoplesoft database stores data in a table format for system PeopleTools and Application tables. This is independent of the process you use to retrieve that data from PeopleSoft. Inside PeopleSoft database, only three types of tables reside inside the schema: System Catalog tables, PeopleTools tables, and Application data tables. Two of these table types, System Catalog and PeopleTools tables, can be referred to as metadata tables; users make use of Application data tables to store the data they need for their processes.

Report Error

View answer Workspace Report Error Discuss

Subject: Oracle

0 1844
Q:

What are transaction isolation levels supported by Oracle?

Answer

Oracle supports 3 transaction isolation levels: 


- Read committed (default)


- Serializable transactions


- Read only

Report Error

View answer Workspace Report Error Discuss

Subject: Oracle

1 1828
Q:

Define PL/SQL. Explain its purpose

Answer

PL/SQL is Procedural Language SQL that is an extension of SQL that results in a more structural language composed of blocks. It is mainly used in writing applications that needs to be structured and has error handling.

Report Error

View answer Workspace Report Error Discuss

Subject: Oracle

0 1822