Oracle Questions

Q:

What is RDBMS? Explain its features.

Answer

RDBMS is a database management system based on relational model defined by E.F.Codd. Data is stored in the form of rows and columns. The relations among tables are also stored in the form of the table.

Features:
- Provides data to be stored in tables
- Persists data in the form of rows and columns
- Provides facility primary key, to uniquely identify the rows
- Creates indexes for quicker data retrieval
- Provides a virtual table creation in which sensitive data can be stored and simplified query can be applied.(views)
- Sharing a common column in two or more tables(primary key and foreign key)
- Provides multi user accessibility that can be controlled by individual users

Report Error

View answer Workspace Report Error Discuss

Subject: Oracle - Technology

33 13397
Q:

Difference between %TYPE and %ROWTYPE.

Answer

%type is used to declare a field of a table while %rowtype is used to declare a record with the same type as specified in that table, view or cursor.


Example of %type:


DECLARE


         v_EmployeeName emp.ename%TYPE


 


Example of %rowtype


DECLARE


          v_empployee emp%ROWTYPE;

Report Error

View answer Workspace Report Error Discuss

Subject: Oracle - Technology

4 4700
Q:

What is SQL*Plus? Explain its features

Answer

SQL*plus allows SQL and PL/SQL scripts to interactively run in command line.

It allows three kinds of commands to run; SQL, PL/SQL and SQL * Plus commands. It’s most commonly used by DBA’s to interact with the oracle database.

Report Error

View answer Workspace Report Error Discuss

Subject: Oracle - Technology

5 2815
Q:

What is Oracle Spatial?

Answer

Oracle Spatial, often referred to as spatial, provides a SQL schema and functions that facilitate the storage, retrieval, update, and query of collections of spatial features in an Oracle database. Oracle Spatial is designed to make spatial data management easier and more natural to users of location-enabled applications and geographic information system (GIS) applications. Once spatial data is stored in an Oracle database, it can be easily manipulated, retrieved, and related to all other data stored in the database.

Report Error

View answer Workspace Report Error Discuss

Subject: Oracle - Technology

0 2603
Q:

Explain how to debug PL/SQL program.

Answer

One can debug PL/SQL program by printing the output using DBMS_OUTPUT package. Put_line can be used to display a line as shown below:


BEGIN


        dbms_output.put_line(‘Sample line');


END;

Report Error

View answer Workspace Report Error Discuss

Subject: Oracle - Technology

0 1844
Q:

What is ANALYZE command used for?

Answer

ANALYZE command is used to perform various functions on index, table, or cluster, as listed below:
- It helps in dentifying migrated and chained rows of the table or cluster.
- It helps in validating the structure of the object.
- It helps in collecting the statistics about object used by the optimizer. They are then stored in the data dictionary.
- It helps in deleting statistics used by object from the data dictionary.

Report Error

View answer Workspace Report Error Discuss

Subject: Oracle - Technology

1 1817
Q:

What are PL/SQL Subprograms? What are its Advantages ?

Answer

Named PL/SQL blocks of code which can be invoked using parameters are called PL/SQL sub programs.


 


Advantages of PL/SQL subprograms are


- The application makes a single call to the database to run a block of statements which improves performance against running SQL multiple times. This will reduce the number of calls between the database and the application.


- PL/SQL is secure since the code resides inside the database thus hiding internal database details from the application. The application will only make a call to the PL/SQL sub program


- PL/SQL and SQL go hand in hand so there would be no need of any translation required between PL/SQL and SQL.

Report Error

View answer Workspace Report Error Discuss

Subject: Oracle - Technology

1 1765
Q:

Difference between clustering and mirroring .

Answer

- Clustering means one than one database server configured for the same user connection. When users connect, one of the server’s responds and connects based on availability. The user is completely ignorant of the fact that there are more than one database servers. It demands high cost due to infrastructure needs. Clustering is hence done on server level.


- Mirroring means, one has many configured databases on the same server. Mirrors are basically copies of the original database. Mirroring is hence done on database level. 

Report Error

View answer Workspace Report Error Discuss

Subject: Oracle - Technology

2 1594