Oracle Architecture and Concepts

  Home  Oracle  Oracle Architecture and Concepts


“Oracle Architecture and Conceptual frequently Asked Questions in various Oracle Architectural job Interviews by interviewer. Get preparation of Oracle Architecture and Concepts related job interview questions”



82 Oracle Architecture And Concepts Questions And Answers

22⟩ Do you know what is an Extent?

An extent is a logical unit of database storage space allocation made up of a number of contiguous data blocks. One or more extents in turn make up a segment. When the existing space in a segment is completely used, Oracle allocates a new extent for the segment. When you create a table, Oracle allocates to the table's data segment an initial extent of a specified number of data blocks. Although no rows have been inserted yet, the Oracle data blocks that correspond to the initial extent are reserved for that table's rows. If the data blocks of a segment's initial extent become full and more space is required to hold new data, Oracle automatically allocates an incremental extent for that segment. An incremental extent is a subsequent extent of the same or greater size than the previously allocated extent in that segment. (The next section explains the factors controlling the size of incremental extents.) For maintenance purposes, the header block of each segment contains a directory of the extents in that segment.

 183 views

23⟩ Tell me do View contain Data?

No, View never contain the the data, Only defination of it stores in the data base, when ever you invoke them they show you the data based on their defination.Only Materlized view or SnaptShot contain the the data.

 194 views

24⟩ Explain what is a Sequence?

A sequence is an automatically generated unique number.It is typically used to create a primary key value.It is a sharable object.Using sequence change the increment value, maximum value, minimum value, cycle option, or cache option.

 205 views

25⟩ What is Hash Cluster in Oracle?

Hash Clusters cluster table data in a manner similar to normal, index clusters. To find or store a row in a hash cluster, Oracle applies a hash function to the row's cluster key value. The resulting hash value corresponds to a data block in the cluster.All rows with the same key value are stored together on disk.Hash clusters are a better choice than using an indexed table or index cluster when a table is often queried with equality queries (for example, WHERE product_id=123). 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 rows.This reduces the amount of I/Os that must be performed to locate and read/write a row of data.

 185 views

26⟩ What is a Segment in Oracle?

A segment is a set of extents that contains all the data for a specific logical storage structure within a tablespace. For example, for each table, Oracle allocates one or more extents to form that table's data segment; for each index, Oracle allocates one or more extents to form its index segment. Oracle databases use four types of segments, these are:Data SegmentsIndex SegmentsTemporary SegmentsRolback SegmentsData Segments: A single data segment in an Oracle database holds all of the data for one of the following: a table that is not partitioned or clustered a partition of a partitioned table a cluster of tables Oracle creates this data segment when you create the table or cluster with the CREATE command. The storage parameters for a table or cluster determine how its data segment's extents are allocated. You can set these storage parameters directly with the appropriate CREATE or ALTER command. These storage parameters affect the efficiency of data retrieval and storage for the data segment associated with the object. Index Segments: Every nonpartitioned index in an Oracle database has a single index segment to hold all of its data. For a partitioned index, every partition has a single index segment to hold its data. Oracle creates the index segment for an index or an index partition when you issue the CREATE INDEX command. In this command, you can specify storage parameters for the extents of the index segment and a tablespace in which to create the index segment. (The segments of a table and an index associated with it do not have to occupy the same tablespace.) Setting the storage parameters directly affects the efficiency of data retrieval and storage.Temporary Segments: When processing queries, Oracle often requires temporary workspace for intermediate stages of SQL statement parsing and execution. Oracle automatically allocates this disk space called a temporary segment. Typically, Oracle requires a temporary segment as a work area for sorting. Oracle does not create a segment if the sorting operation can be done in memory or if Oracle finds some other way to perform the operation using indexesRollback Segments: Each database contains one or more rollback segments. A rollback segment records the old values of data that was changed by each transaction (whether or not committed). Rollback segments are used to provide read consistency, to roll back transactions, and to recover the database

 191 views

27⟩ What are Clusters in Oracle?

Clusters are groups of one or more tables physically stored together because they share common columns and are often used together. This improves disk access time.The related columns of the tables in a cluster are called the cluster key. The cluster key is indexed so that rows of the cluster can be retrieved with a minimum amount of I/O.No matter how many tables within the cluster contain the cluster key value, it is stored only once each in the cluster and the cluster index. Therefore, less storage is required.Whether or not a table is part of a cluster is transparent to users and to applications. Data stored in a clustered table is accessed by SQL in the same way as data stored in a nonclustered table.

 191 views

28⟩ What is a Data File in Oracle?

The data of logical database, say tables,indeses etc are stored in datafile.they can be associated with only one database. once created their size can not be altered. but we can add new data file to the table space.

 185 views

29⟩ What is Row Chaining in Oracle?

If a row is too large to fit into a single database block row chaining happens. For example, if you use a 4KB blocksize for your database, and you need to insert a row of 8KB into it, Oracle will use 3 blocks and store the row in pieces. Some conditions that will cause row chaining are: Tables whose rowsize exceeds the blocksize. Tables with long and long raw columns are prone to having chained rows. Tables with more then 255 columns will have chained rows as Oracle break wide tables up into pieces. So, instead of just having a forwarding address on one block and the data on another we have data on two or more blocks.

 199 views

30⟩ What is a Temporary Segment in Oracle?

temporary segments are basically used for sort operations in oracle,,when the user tries to execute the query through order by clause. so system needs an space for an sort operation, and system will use temporary segments for this query.

 189 views

31⟩ What is an Index in Oracle?

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.

 203 views

32⟩ What is self-referential integrity constraint in Oracle?

Self referential integrity constraint refers to two columns related by referential integrity which belong to the same table.For example ManagerId column in employees table is a foreign key which refers to EmployeeId in the same table.

 179 views

33⟩ Explain the different type of Integrity Constraints supported by ORACLE?

NOT NULL Constraint - Disallows Nulls 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.

 187 views

34⟩ Tell me how to define Data Block size?

stansard block size, which is set with parameter DB_BLOCK_SIZE cannot be changed after creating database. We can set non standard parameter size later with parameter DB_nk_BLOCK_SIZE and it can be changed.NOTE: Standard block size cnannot be equal to nonstandars block size.

 189 views

35⟩ What are Schema Objects in Oracle?

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.

 202 views

37⟩ What are the advantages of Views in Oracle?

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.

 208 views

40⟩ What are the Characteristics of Data Files in Oracle?

A data file is created when a 'create tablespace' or 'alter tablespace' command is executed. Creating a data file of size 10MB actually allocates 10MB space on the hard disk. If a tablespace is declared to contain 100 data files, one slot per data file is reserved in the control file. There are four types of data files -- system data files, application (or user) data files, temporary data files (used by oracle to store temp data while executing complex SQL statements) and rollback data files.It is possible to resize a datafile. The command which will serve this purpose is

 210 views