Sunday, 11 October 2015
Oracle DBA Interview Questions -3
1.
What is an Extent?
An
Extent is a specific number of contiguous data blocks, obtained in a single
allocation, and used to store a specific type of information.
2.
What is a Segment?
A
segment is a set of extents allocated for a certain logical structure.
3.
What is the different type of Segments?
Data
Segment, Index Segment, Rollback Segment and Temporary Segment.
4.
What is a Data Segment?
Each
Non-clustered table has a data segment. All of the table's data is stored in
the extents of its data segment. Each cluster has a data segment. The data of
every table in the cluster is stored in the cluster's data segment.
5.
What is an Index Segment?
Each
Index has an Index segment that stores all of its data.
6.
What is Rollback Segment?
A
Database contains one or more Rollback Segments to temporarily store
"undo" information.
7.
What are the uses of Rollback Segment?
Rollback
Segments are used:
To
generate read-consistent database information during database recovery to
rollback uncommitted transactions for users.
8.
What is a Temporary Segment?
Temporary
segments are created by ORACLE when a SQL statement needs a temporary work area
to complete execution. When the statement finishes execution, the temporary
segment extents are released to the system for future use.
9.
What is a Data File?
Every
ORACLE database has one or more physical data files. A database's data files
contain all the database data. The data of logical database structures such as
tables and indexes is physically stored in the data files allocated for a
database.
10.
What are the Characteristics of Data Files?
A
data file can be associated with only one database. Once created a data file
can't change size.
One
or more data files form a logical unit of database storage called a tablespace.
11.
What is a Data Dictionary?
The
data dictionary of an ORACLE database is a set of tables and views that are
used as a read-only reference about the database.
It
stores information about both the logical and physical structure of the
database, the valid users of an ORACLE database, integrity constraints defined
for tables in the database and space allocated for a schema object and how much
of it is being used.
12.
What is an Integrity Constrains?
An
integrity constraint is a declarative way to define a business rule for a
column of a table.
13.
Can an Integrity Constraint be enforced on a table if some existing table data
does not satisfy the constraint?
No.
14.
Describe the different type of Integrity Constraints supported by ORACLE?
NOT
NULL Constraint - Disallows NULL's in a table's column.
UNIQUE
Constraint - Disallows duplicate values in a column or set of columns.
PRIMARY
KEY Constraint - Disallows duplicate values and NULLs in a column or set of
columns.
FOREIGN
KEY Constrain - Require each value in a column or set of columns match a value
in a related table's UNIQUE or PRIMARY KEY.
CHECK
Constraint - Disallows values that do not satisfy the logical expression of the
constraint.
15.
What is difference between UNIQUE constraint and PRIMARY KEY constraint?
A
column defined as UNIQUE can contain NULLs while a column defined as PRIMARY
KEY can't contain Nulls.
16.
Describe Referential Integrity?
A
rule defined on a column (or set of columns) in one table that allows the
insert or update of a row only if the value for the column or set of columns
(the dependent value) matches a value in a column of a related table (the
referenced value). It also specifies the type of data manipulation allowed on
referenced data and the action to be performed on dependent data as a result of
any action on referenced data.
17.
What are the Referential actions supported by FOREIGN KEY integrity constraint?
UPDATE
and DELETE Restrict - A referential integrity rule that disallows the update or
deletion of referenced data.
DELETE
Cascade - When a referenced row is deleted all associated dependent rows are
deleted.
18.
What is self-referential integrity constraint?
If
a foreign key reference a parent key of the same table is called
self-referential integrity constraint.
19.
What are the Limitations of a CHECK Constraint?
The
condition must be a Boolean expression evaluated using the values in the row
being inserted or updated and can't contain sub-queries, sequence, the
SYSDATE, UID, USER or USERENV SQL functions, or the pseudo columns LEVEL or
ROWNUM.
20.
What is the maximum number of CHECK constraints that can be defined on a column?
Oracle DBA Interview Questions Part-2
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.
2.
How is Indexes Update?
Indexes
are automatically maintained and used by ORACLE. Changes to table data are
automatically incorporated into all relevant indexes.
3.
What are Clusters?
Clusters
are groups of one or more tables physically stores together to share common
columns and are often used together.
4.
What is cluster Key?
The
related columns of the tables in a cluster are called the Cluster Key.
5.
What is Index Cluster?
A
Cluster with an index on the Cluster Key.
6.
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.
7.
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.
8.
What is Database Link?
A
database link is a named object that describes a "path" from one
database to another.
9.
What are the types of Database Links?
Private
Database Link, Public Database Link & Network Database Link.
10.
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.
11.
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.
12.
What is Network Database link?
Network
database link is created and managed by a network domain service. A network
database link can be used when any user of any database in the network
specifies a global object name in a SQL statement or object definition.
13.
What is Data Block?
ORACLE
database's data is stored in data blocks. One data block corresponds to a
specific number of bytes of physical database space on disk.
14.
How to define Data Block size?
A
data block size is specified for each ORACLE database when the database is
created. A database users and allocated free database space in ORACLE data
blocks. Block size is specified in INIT.ORA file and can’t be changed latter.
15.
What is Row Chaining?
In
Circumstances, all of the data for a row in a table may not be able to fit in
the same data block. When this occurs, the data for the row is stored in a
chain of data block (one or more) reserved for that segment.
Oracle DBA Interview Questions - 1
Oracle DBA Interview Questions - 3
Oracle DBA Interview Questions - 1
Oracle DBA Interview Questions - 3
Wednesday, 7 October 2015
Oracle DBA Interview Questions Part I
A database is an organized
collection of information treated as a unit. The purpose of a database is to
collect, store, and retrieve related information for use by database
applications.
1.
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.
2.
What are the components of Logical database structure of ORACLE database?
Tablespaces
and the Database's Schema Objects.
3.
What is a Tablespace?
A
database is divided into Logical Storage Unit called tablespaces. A tablespace
is used to grouped related logical structures together.
4.
What is SYSTEM tablespace and when is it Created?
Every
ORACLE database contains a tablespace named SYSTEM, which is automatically
created when the database is created. The SYSTEM tablespace always contains the
data dictionary tables for the entire database.
5.
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.
6.
What is schema?
A
schema is collection of database objects of a User.
7.
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.
8.
Can objects of the same Schema reside in different tablespaces?
Yes.
9.
Can a Tablespace hold objects from different Schemes?
Yes.
10.
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.
11.
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.)
12.
Do View contain Data?
Views
do not contain or store data.
13.
Can a View based on another View?
Yes.
14.
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 perspective from that of the base table.
Store
complex queries.
15.
What is a Sequence?
A sequence generates a serial list of unique numbers for
numerical columns of a database's tables.
16.
What is a Synonym?
A
synonym is an alias for a table, view, sequence or program unit.
17.
What are the type of Synonyms?
There
are two types of Synonyms Private and Public.
18.
What is a Private Synonyms?
A
Private Synonyms can be accessed only by the owner.
19.
What is a Public Synonyms?
A
Public synonym can be accessed by any user on the database.
20.
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.
Oracle DBA Interview Question -2
Oracle DBA Interview Question - 3
Thursday, 1 October 2015
What is Oracle Incentive Compensation (OIC):
Overview:
Sales jobs have a significant, measurable impact on the revenue of your
business. Keeping your employees motivated and happy is very important for the
long-term health of your enterprise. Oracle Incentive Compensation plays a part
in determining cash and other tangible rewards. You can use Oracle Incentive
Compensation to pay employees, partners, customers, and any non-employee role.
Key terms Used in building compensation plan within OIC Module:
• Products are user-defined categories of sales for which your
organization awards compensation. Each product represents a different kind of
sale for which your organization pays compensation. Classification rules are
used to determine the event eligible for compensation and the basis of
calculation.
• Formulas determine how the compensation will be calculated.
• Rate Tables are the part of a formula that determines the rate at
which achievements is compensated. Rate dimensions are the structural part of a
rate table to which values are added.
• Expressions are interchangeable, reusable parts that are used as input
and output expressions of formulas, in expression-based rate dimensions, and in
performance measures.
When the compensation plan is assigned to a resource then the data is
stored in
CN_SRP_QUOTA_ASSIGNS. In this table we have target, payment amount and
performance goal.
When setting these values for a specific period, the data goes into
CN_PERIOD_QUOTAS.
When setting these values for a specific period for an individual resource
(Sales rep), the data goes into CN_SRP_PERIOD_QUOTAS.
There are numerous columns which derive their values from the above
columns, they can be identified by the inclusion of an ITD or PTD flag in the
column name.
ITD= Interval To date. (Interval is nothing but the time frame.)
PTD=Period TO Date. (Year is taken as period.)
Plan Administrator is responsible for creating and maintaining the compensation
plan.
Once you assign effective start date and end date to a compensation plan
we can assign it to multiple sales roles.
- When we want to compensate a
resource more than once for a transaction then we have to use
"Product Overlap" check box.
For example, you may have two plan
elements, with one used to calculate a monthly commission and the other used to
calculate a quarterly bonus.
- When you enter a sequence
number for multiple plan elements, this tells the
application the order in which to process the plan elements. Sequencing of plan
elements is important when one plan element relies on the calculation results of
another.
Components used to build a compensation plan should be within the start
and end date for that plan.
Oracle DBA Interview Questions
Subscribe to:
Posts (Atom)