1) What is oracle database ?
Oracle Database is a relational database management system (RDBMS) which is
used to store and retrieve the large amounts of data. Oracle Database had
physical and logical structures. Logical structures and physical structures are
separated from each other
2)
What is schema?
A user account and its associated data including tables, views, indexes,
clusters, sequences,procedures, functions, triggers,packages and database links
is known as Oracle schema. System, SCOTT etc are default schema's. We can
create a new Schema/User. But we can't drop default database schema's. 3)
3)
What is a Tablespace?
Oracle use Tablespace for logical data Storage. Physically, data will get
stored in Datafiles. Datafiles will be connected to tablespace. A tablespace
can have multiple datafiles. A tablespace can have objects from different
schema's and a schema can have multiple tablespace's. Database creates
"SYSTEM tablespace" by default during database creation. It contains
read only data dictionary tables which contains the information about the
database.
4) What is a Control File ?
Control file is a binary file which stores Database name, associated data
files, redo files, DB creation time and current log sequence number. Without
control file database cannot be started and can hamper data recovery.
5)
Define data blocks ?
Data Blocks are the base unit of logical database space. Each data block
represents a specific number of bytes of database space on a disk
6) What is an Extent ?
Extent is a collection of Continuous data blocks, which is used for storing a
specific type of information.
7)
What is a Segment ?
A segment is a collection of extends which is used for storing a specific data
structure and resides in the same tablespace.
8) What is Rollback Segment ?
Database contain one or more Rollback Segments to roll back transactions and
data recovery.
9) What are the different type of Segments ?
Data Segment(for storing User Data), Index Segment (for storing index),
Rollback Segment and Temporary Segment.
10) What is a Redo Log ?
Redo Log files is a collection of 2 or more pre-allocated files, which is used
in data recovery. When ever a change is made to the database, change info gets
stored in redo files. In case of a database crash, we can used redo files for
data recovery.
11) What is a table Cluster ?
Table Cluster is a group of related tables that share common columns are store
related data in the same block.
12) What is a cluster Key ?
The common column or group of columns associated with the clustered tables is
called cluster Key. Advantage of using cluster key is that the common columns
will be stored only once.
13) What is a synonym?
Synonym is the alias name for a table, view, sequence or program unit.
14)
What are the two types of Synonyms?
Two types of Synonyms are Private and Public. A private synonym can be accessed
by its owner only, where as the public synonym can be accesses by any DB user.
15) What is System Global Area (SGA) ?
The System Global Area (SGA) is a part of system memory which is allocated to
all process belonging to oracle instance. We can allocate memory to SGA
by modifying Oracle initialization parameters like shared_pool_size, include
db_cache_size and log_buffer.
16) What is a shared pool?
Shared pool is one of the most important part of SGA. Shared pool is used by
oracle to handle identical queries, which enables it to execute only once thus
by improving performance. Shared Pool depends on db_cache_size parameter.
17) What is Program Global Area (PGA)?
Program Global Area is the non shared memory used by oracle that contain data
and control information of server process.
18) What is dictionary cache ?
Oracle Data directory contains meta data about the tables owned by SYSTEM and
SYS schema's. Proper sizing of data directory cache allows fast retrieval of
data from data dictionary.
19) What is Database Buffer Cache ?
Database buffer cache is used by SGA to hold blocks of data read from data
files. Each buffer can hold one database block.
20) What is a cursor ?
When a DML statements like INSERT, UPDATE, DELETE, or MERGE is executed or when
SELECT query is executed, the information (statement and the rows of data
accessed by it) about the same will be stored in private SQL area. Cursor is a
pointer to this private SQL area.
21) Explain the two type of Cursors ?
Two types of cursors are Implicit Cursor and Explicit Cursor. Implicit Cursors
are created when SELECT which returns one row, INSERT, UPDATE and DELETE
statements are executed. Explicit Cursors are user defined cursors which get
created when SELECT statement return more than one row.
22) What is a Query Record Group?
A query record group is a record group that has an associated SELECT statement.
Columns in query record group derive their default names, data types, had
lengths from the database columns referenced in the SELECT statement. Records
in query record group are the rows retrieved by the query associated with that
record group.
23) What is row chaining?
When size of a row exceed size of data block, data for the row is stored in a
chain of data block reserved for that segment. This is called row chaining