HomeInterview QuestionOracle Database Interview Questions

Oracle Database Interview Questions



1) What is Public Database Link?
Answer: 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.

2) What is a Network Database link?
Answer: 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.

3) What is Data Block?
Answer: ORACLE database’s data is stored in data blocks. One data block corresponds to a specific number of bytes of physical database space on a disk.

4) How to define Data Block size?
Answer: A data block size is specified for each ORACLE database when the database is created. Database users and allocated free database space in ORACLE data blocks. Block size is specified in INIT.ORA file and can’t be changed later.

5) What is Row Chaining?
Answer: 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 the data blocks (one or more) reserved for that segment.

6) What is an Extent?
Answer: An Extent is a specific number of contiguous data blocks, obtained in a single allocation, used to store a specific type of information.

7) What is a Segment?
Answer: A segment is a set of extents allocated for a certain logical structure.

8) What are the different types of Segments?
Answer: Data Segment, Index Segment, Rollback Segment, and Temporary Segment.

9) What is a Data Segment?
Answer: Each Non-clustered table has a data segment. All of the table’s data is stored in the extent 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.

10) What is an Index Segment?
Answer: Each Index has an Index segment that stores all of its data.

11) What is Rollback Segment?
Answer: A Database contains one or more Rollback Segments to temporarily store “undo” information.

12) What are the uses of the Rollback Segment?
Answer: Rollback Segments are used :
To generate read-consistent database information during database recovery to rollback uncommitted transactions for users.

13) What is a Temporary Segment?
Answer: 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.

14) What is a Data File?
Answer: 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.

15) What are the Characteristics of Data Files?
Answer: 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



16) What is the effect of setting the value ‘FIRST_ROWS’ for the OPTIMIZER_GOAL parameter of the ALTER SESSION command?
Answer: This value causes the optimizer to use the cost-based approach for all SQL statements in the session regardless of the presence of statistics and to optimize with the goal of best response time.

17) What is the effect of setting the ‘RULE’ for the OPTIMIER_GOAL parameter of the ALTER SESSION Command?
Answer: This value causes the optimizer to choose the rule-based approach for all SQL statements in a session regardless of the presence of statistics.

18) What is the RULE-based approach to optimization?
Answer: Choosing an executing plan based on the access paths available and the ranks of these access paths.

19) What is the COST-based approach to optimization?
Considering available access paths and determining the most efficient execution plan based on statistics in the data dictionary for the tables accessed by the statement and their associated clusters and indexes.
PROGRAMMATIC CONSTRUCTS

20) What are the different types of PL/SQL program units that can be defined and stored in the ORACLE database?
Answer: Procedures and Functions, Packages, and Database Triggers.

21) What is a Procedure?
Answer: A Procedure consists of a set of SQL and PL/SQL statements that are grouped together as a unit to solve a specific problem or perform a set of related tasks.

22) What is the difference between Procedures and Functions?
Answer: A Function returns a value to the caller where as a Procedure does not.

23) What is a Package?
Answer: A Package is a collection of related procedures, functions, variables, and other package constructs together as a unit in the database.

24) What are the advantages of having a Package?
Answer: Increased functionality (for example, global package variables can be declared and used by any procedure in the package) and performance (for example all objects of the package are parsed compiled, and loaded into memory once)

25) What is Database Trigger?
Answer: A Database Trigger is a procedure (set of SQL and PL/SQL statements) that is automatically executed as a result of an insert in, update to, or delete from a table.

26: What are the uses of Database Trigger?
Answer: Database triggers can be used for automatic data generation, audit data modifications, enforce complex Integrity constraints, and customize complex security authorizations.

27) What are the differences between Database Trigger and Integrity constraints?
Answer: A declarative integrity constraint is a statement about the database that is always true. A constraint applies to existing data in the table and any statement that manipulates the table.
A trigger does not apply to data loaded before the definition of the trigger, therefore, it does not guarantee all data in a table conforms to the rules established by an associated trigger.
A trigger can be used to enforce transitional constraints whereas a declarative integrity constraint cannot be used.

- A word from our sponsors -

Most Popular

Leave a reply

Please enter your comment!
Please enter your name here

More from Author

Indian government considering 100% WFH for workers in SEZ units

Piyush Goyal, the minister of commerce and industry, stated on Tuesday...

Myntra plans to employ 16,000 employees during the holiday season.

India’s leading e-commerce company Myntra has announced that it will be...

If an infant dies, the government has approved special 60-day maternity leave.

The central government has approved 60-day special maternity leave for women...

North East region’s first all-women delivery center is unveiled by Ecom Express

Ecom Express, a top provider of technology-enabled end-to-end logistics solutions, has...

- A word from our sponsors -

Indian government considering 100% WFH for workers in SEZ units

Piyush Goyal, the minister of commerce and industry, stated on Tuesday that the commerce ministry is mulling allowing all employees of units in special economic zones to work from home (WFH) (SEZ). Currently, the Centre allows 50% of the overall staff of a company based out of a...

Myntra plans to employ 16,000 employees during the holiday season.

India’s leading e-commerce company Myntra has announced that it will be hiring nearly 16,000 people directly and indirectly. Commenting on the hiring process the company said, “Myntra is creating 16000 job opportunities for our upcoming Big Fashion Festival (BFF) as 6000+ brands gear up to bring a whopping...

If an infant dies, the government has approved special 60-day maternity leave.

The central government has approved 60-day special maternity leave for women central government employees in case of stillbirth or death of an infant within a few days of birth. Ministry of Personnel, Public Grievances, and Pensions said, “The matter has been considered in consultation with the Ministry of...

North East region’s first all-women delivery center is unveiled by Ecom Express

Ecom Express, a top provider of technology-enabled end-to-end logistics solutions, has announced the opening of Imphal, Manipur, as the site of its first Northeast all-women Delivery Center. The company said, “The pursuit of women’s economic independence is going to be the deciding aspect of an equal work environment,...

Starbucks Names Indian-origin Laxman Narasimhan as new CEO

Starbucks, a leading company in the coffee industry and a multinational coffee chain, recently announced the replacement of Howard Schultz, who served as interim CEO. On October 1, 2022, Narasimhan will start working at Starbucks as CEO. Before officially taking on the CEO position, he will collaborate...

EPFO: Boost the retirement age to lessen the strain on pension funds

The Employees' Provident Fund Organization (EPFO), according to a story in the Economic Times, supports raising the retirement age in order to relieve strain on pension funds since it predicts that by 2047, India would have an ageing population of 140 million individuals. EPFO said that this can...

Mahendra N. Shah is appointed managing director by IDFC.

Mahendra N. Shah has been appointed managing director (MD) of IDFC Limited, beginning October 1, 2022, for a period of one year until September 30, 2023, the IDFC has said. It is subject to the approval of the shareholders of the Company and other applicable statutory/ regulatory approvals,...

Teleperformance is hiring various profiles including WFH

Teleperformance, a global leader in outsourced omnichannel customer experience management, is looking for a variety of positions, including work from home positions (WFH). Teleperformance commented on the hiring process company said, “Become part of a world-class team. At Teleperformance, we believe that good is never good enough.” “That’s why...

Understanding API Calls

Written by Vikrant Chaudhary

TCS is accepting registrations for fresh MBA hiring

India’s largest Tech giant, Tata Consultancy Services (TCS) is accepting applications from management graduates who can join the company in the upcoming financial year 2022-23. The online registration process for this role is reopened for now. However, the last date to apply for the role is unknown. Students...

British Electric, One Moto India plans to hire, add people by 150%

British electric two-wheeler company, One Moto India has announced that it will be hiring and increasing manpower by 150% in the country, This will be the company’s first hiring drive in India. As of now, it has a workforce of 35 employees in India. And aims to take...

ICCS is all set to hire 1,000 employees in next 12 months

BPO firm, ICCS is hiring nearly 1,000 employees in the coming next 12 months. ICCS CEO Divij Singhal said, “We are now planning to expand our team and hire across roles to ensure the employees have the support they need so as to drive the organizational growth and...