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

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...

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

British electric two-wheeler company, One Moto India has announced that it...

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...

- A word from our sponsors -

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...

Infosys hiring 50,000 freshers in FY23, offers salary hike this month

IT Tech giant, Infosys said that it has already hired 85,000 freshers both off-campus and on-campus in the financial year 2022 which ended on March 31. Infosys attrition rate reaches 27.7% in the March quarter, up from 25.5% in the December quarter, but the management was confident that...

Binance, the world’s largest cryptocurrency exchange, gets Abu Dhabi crypto nod

Binance Holdings Ltd. received in-principle approval from Abu Dhabi Global Market to operate as a broker-dealer in virtual assets. The world’s largest cryptocurrency exchange by trading volume still needs to complete the application process, Richard Teng, the company’s head for the Middle East and North Africa and a...

AWS Top Interview Questions

Question: What is AWS? Answer: AWS (Amazon Web Services) is a platform to provide secure cloud services, database storage, offerings to compute power, content delivery, and other services to help business level and develop. Question: What is the importance of buffer in Amazon Web Services? Answer: An Elastic Load Balancer...

Internship

Job description We are currently hiring for a Digital Marketing Internship part-timers to join our core team immediately.a) Are available for WFH internship,b) Can start the internship immediately,c) Are available for a duration of 2-3 monthsd) Final year college students can also apply for this internship Stipend: INR 2500/-Duration:...

TCS is all set to hire 1 Lakh freshers by March 31

India’s largest IT giant Tata Consultancy Services (TCS) could end Fiscal Year 2022 with fresher hiring of 100,000, the highest ever not just by the company in a financial year but also by any IT services player in India and multinationals. TCS has onboarded 77,000 freshers till December...

TCS expands its operations in New Jersey, all set to hire 1000 people by 2023

India’s largest Tech giant, Tata Consultancy Services (TCS) has announced recently, its plans to expand operations in New Jersey by hiring nearly 1,000 additional employees by the end of 2023. The plan is to meet the growing needs of customers to digitally transform their businesses. To nurture a...

Bharti Airtel to buy Vodafone 4.7% stake in Indus Towers for Rs3,000cr

Global telecommunications company Bharti Airtel has decided to acquire an additional 4.7 percent stake in Indus Towers from Vodafone Group, the company announced it on Friday. “The said acquisition purchase would be at an attractive price representing a significant discount typically available for such large block transactions. In addition,...

Mindtree is hiring| Service Desk Manager|Bangalore

Role description This opportunity is with Mindtree Ltd. for the position of Team Manager # Service Desk Operations. The role requires providing leadership, guidance, and support to existing L1 L2 line of support engineers. This is an opportunity in a well-stablished service desk for a major client of...