Oracle Database Questions & Answers

 What are the components of Physical database structure of Oracle Database?
ORACLE database is comprised of three types of files. One or more Data files, two are more Redo Log files, and one or more Control files.

What are the components of Logical database structure of ORACLE database?
Tablespaces and the Database’s Schema Objects.

What is a Tablespace?
A database is divided into Logical Storage Unit called tablespaces. A tablespace is used to grouped related logical structures together.

What is SYSTEM tablespace and When is it Created?
Every ORACLE database contains a table space named SYSTEM, which is automatically created when the database is created. The SYSTEM tablespace always contains the data dictionary tables for the entire database.

Explain the relationship among Database, Tablespace and Data file
Each databases logically divided into one or more tablespaces One or more data files are explicitly created for each tablespace.

What is schema?
A schema is collection of database objects of a User.

What are Schema Objects ?
Schema objects are the logical structures that directly refer to the database’s data. Schema objects include tables, views, sequences, synonyms, indexes, clusters, database triggers, procedures, functions packages and database links.

Can objects of the same Schema reside in different tablespaces.?

Can a Tablespace hold objects from different Schemes ?

 what is Table ?
A table is the basic unit of data storage in an ORACLE database. The tables of a database hold all of the user accessible data. Table data is stored in rows and columns.

What is a View ?
A view is a virtual table. Every view has a Query attached to it. (The Query is a SELECT statement that identifies the columns and rows of the table(s) the view uses.)

Do View contain Data ?
Views do not contain or store data.

Can a View based on another View ?

What are the advantages of Views ?
Provide an additional level of table security, by restricting access to a predetermined set of rows and columns of a table.
Hide data complexity.
Simplify commands for the user.
Present the data in a different perpecetive from that of the base table.
Store complex queries.

What is a Sequence ?
A sequence generates a serial list of unique numbers for numerical columns of a database’s tables.

What is a Synonym ?
A synonym is an alias for a table, view, sequence or program unit.

What are the type of Synonyms?
There are two types of Synonyms Private and Public.

What is a Private Synonyms ?
A Private Synonyms can be accessed only by the owner.

What is a Public Synonyms ?
A Public synonyms can be accessed by any user on the database.

What are synonyms used for ?
Synonyms are used to: Mask the real name and owner of an object.
Provide public access to an object Provide location transparency for tables,  views or program units of a remote database. Simplify the SQL statements for database users.

What is an Index ?
An Index is an optional structure associated with a table to have direct access to rows, which can be created to increase the performance of data retrieval. Index can be created on one or more columns of a table.

How are Indexes Update ?
Indexes are automatically maintained and used by ORACLE. Changes to table data are automatically incorporated into all relevant indexes.

What are Clusters?
Clusters are groups of one or more tables physically stores together to share common columns and are often used together.

What is cluster Key?
The related columns of the tables in a cluster are called the Cluster Key.

What is Index Cluster ?
A Cluster with an index on the Cluster Key.

What is Hash Cluster ?
A row is stored in a hash cluster based on the result of applying a hash function to the row’s cluster key value. All rows with the same hash key value are stores together on disk.

When can Hash Cluster used ?

Hash clusters are better choice when a table is often queried with equality queries. For such queries the specified cluster key value is hashed. The resulting hash key value points directly to the area on disk that stores the specified rows.

What is Database Link ?
A database link is a named object that describes a “path” from one database to another.

What are the types of Database Links ?

Private Database Link, Public Database Link & Network Database Link.

What is Private Database Link ?
Private database link is created on behalf of a specific user. A private database link can be used only when the owner of the link specifies a global object name in a SQL statement or in the definition of the owner’s views or procedures.

What is Public Database Link ?
Public database link is created for the special user group PUBLIC. A public database link can be used when any user in the associated database specifies a global object name in a SQL statement or object definition.

Page 2