0% found this document useful (0 votes)
2 views3 pages

Module 1: Tables: What Are The Types of Tables in Oracle Database?

The document provides a concise overview of key SQL concepts, including types of tables, data types, data modeling, SQL commands for data retrieval, joins, aggregate functions, and transaction management. It outlines common interview questions and brief answers related to these topics. Additionally, it highlights the differences between operations like DELETE and TRUNCATE.

Uploaded by

adityapandji1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views3 pages

Module 1: Tables: What Are The Types of Tables in Oracle Database?

The document provides a concise overview of key SQL concepts, including types of tables, data types, data modeling, SQL commands for data retrieval, joins, aggregate functions, and transaction management. It outlines common interview questions and brief answers related to these topics. Additionally, it highlights the differences between operations like DELETE and TRUNCATE.

Uploaded by

adityapandji1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Here’s a short summary of what interviewers might ask from each of these topics, along with

brief answers:

🟢 Module 1: Tables
What are the types of tables in Oracle Database?

🔹 Regular Tables – Store structured data.


🔹 Temporary Tables – Hold session-based data.
🔹 External Tables – Link to external data sources.

How do you create a table in SQL?


CREATE TABLE students (
id NUMBER PRIMARY KEY,
name VARCHAR2(50),
age NUMBER
);

🟡 Module 2: Columns and Data Types


What are common SQL data types?

🔹 NUMBER – Stores numeric values.


🔹 VARCHAR2(n) – Variable-length string.
🔹 DATE – Stores date & time.
🔹 BLOB – Stores large binary data.

🔵 Module 3: Data Modeling


What is data modeling?

🔹 Designing a database structure to efficiently store data.

What are normalization and denormalization?

🔹 Normalization – Eliminates data redundancy.


🔹 Denormalization – Optimizes query performance by allowing redundancy.
🟠 Module 5: Select and Where
How do you retrieve data using SELECT and WHERE?
SELECT name, age FROM students WHERE age > 18;

🔹 WHERE filters results based on conditions.

🟣 Module 6: Joins
What are different types of joins?

Join Type Description


INNER JOIN Returns matching rows from both tables.
LEFT JOIN Returns all rows from left table + matches.
RIGHT JOIN Returns all rows from right table + matches.
FULL JOIN Returns all rows from both tables.

Example:

SELECT s.name, c.course_name


FROM students s
INNER JOIN courses c ON s.course_id = c.id;

🟢 Module 7: Aggregates and Group By


What are aggregate functions?

🔹 SUM(), AVG(), COUNT(), MAX(), MIN().

How does GROUP BY work?


SELECT department, COUNT(*)
FROM employees
GROUP BY department;

🔹 Groups results based on a column.

🟡 Module 9: Insert and Commit


How do you insert data in a table?
INSERT INTO students (id, name, age)
VALUES (1, 'John', 20);

What is the difference between COMMIT and ROLLBACK?

🔹 COMMIT – Saves changes permanently.


🔹 ROLLBACK – Undoes uncommitted changes.

🔵 Module 10: Update and Transactions


How do you update a record?
UPDATE students
SET age = 21
WHERE id = 1;

What is a transaction?

🔹 A set of SQL operations that must execute completely or not at all.

🟠 Module 11: Delete and Truncate


What is the difference between DELETE and TRUNCATE?

Operation Effect Can be Rolled Back?


DELETE Removes specific rows ✅ Yes
TRUNCATE Removes all rows ❌ No

Example:

DELETE FROM students WHERE age < 18; -- Deletes specific rows
TRUNCATE TABLE students; -- Deletes all rows

Would you like detailed answers for specific topics? 😊

You might also like