Thehive.ai
HPCL-Mittal Energy Limited Interview Questions and Answers
Q1. What is a Database management system?
A Database Management System (DBMS) is a software that allows users to create, retrieve, update, and manage data in a database.
DBMS helps in organizing and structuring data efficiently
It provides tools for data manipulation, querying, and security
Examples include MySQL, Oracle, SQL Server
Q2. What is the trigger function in SQL?
A trigger function in SQL is a stored procedure that is automatically executed in response to certain events on a particular table.
Triggers can be set to execute before or after INSERT, UPDATE, or DELETE operations on a table.
They are useful for enforcing business rules, auditing changes, and maintaining data integrity.
Example: CREATE TRIGGER audit_trigger AFTER INSERT ON employees FOR EACH ROW EXECUTE PROCEDURE audit_function();
Q3. Write a SQL query for the given table's "XYZ" scenario.
SQL query for XYZ scenario
Use SELECT statement to retrieve data from the table
Use WHERE clause to filter data based on the XYZ scenario
Consider using JOIN if data from multiple tables is needed
Q4. What do you know about Hive?
Hive is a data warehouse infrastructure built on top of Hadoop for providing data summarization, query, and analysis.
Hive uses a SQL-like language called HiveQL to query and manage large datasets stored in Hadoop.
It allows users to write complex queries without needing to know Java or MapReduce.
Hive organizes data into tables, partitions, and buckets for efficient querying and analysis.
It supports custom MapReduce scripts and UDFs for advanced data processing.
Hive is commonly...read more
Q5. What is a primary key?
A primary key is a unique identifier for each record in a database table.
A primary key must contain unique values for each record in the table.
It cannot contain null values.
It can consist of one or multiple columns.
Example: In a table of students, the student ID can be a primary key.
Q6. What are joins in SQL?
Joins in SQL are used to combine rows from two or more tables based on a related column between them.
Joins are used to retrieve data from multiple tables based on a related column between them
Common types of joins include INNER JOIN, LEFT JOIN, RIGHT JOIN, and FULL JOIN
Example: SELECT * FROM table1 INNER JOIN table2 ON table1.column = table2.column
Q7. What is a temporary table?
A temporary table is a table that is created and exists only for the duration of a database session.
Temporary tables are typically used to store intermediate results during a complex query or to isolate data for a specific task.
They are automatically dropped when the session ends or when the table is explicitly dropped.
Temporary tables are often prefixed with a '#' or '##' to differentiate them from permanent tables.
Interview Process at HPCL-Mittal Energy Limited
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month