🔹 Q1: What is Data?
👉 Answer:
Data is just raw facts and figures that by themselves don’t have much meaning.
For example, numbers like 20, 25, 30 or names like Masood, Ali, Sara are data.
When we process this data, we get useful information.
🔹 Q2: What is a Database?
👉 Answer:
A database is an organized collection of related data stored in a system so we can easily
access, manage, and update it.
For example, a student database can store details like:
Student_ID Name Age City
1 Masood 20 Mumbai
2 Ali 22 Pune
This table of student details is stored inside a database.
🔹 Q3: What are the Types of Databases?
👉 Answer:
There are mainly 4 types of databases:
1. Hierarchical Database – Data stored like a tree (parent-child).
Example: Old IBM databases.
2. Network Database – Data stored in a graph structure (many-to-many).
3. Relational Database (RDBMS) – Data stored in tables (rows & columns) with
relationships between tables.
Example: Oracle, MySQL, SQL Server.
4. NoSQL Database – For unstructured data, stores JSON, documents, key-value pairs.
Example: MongoDB, Cassandra.
🔹 Q4: Difference between DBMS and RDBMS?
👉 Answer:
Point DBMS RDBMS
Data Storage Files or simple tables Tables with rows & columns
Relationships Not supported Supported (using keys)
Integrity & Rules Less strict Strong (ACID properties)
Example MS Access, dBase Oracle, MySQL, SQL Server
👉 In simple words:
DBMS is basic, it stores data but doesn’t manage relationships between data.
RDBMS is advanced, it organizes data in tables and connects them using
relationships (like primary key, foreign key).
Example:
DBMS: MS Access storing one table of students.
RDBMS: Oracle storing multiple tables like Students and Courses linked by
Student_ID.
✅ So if interviewer asks in a flow:
1. Data → raw facts.
2. Database → organized collection of data.
3. Types of Databases → hierarchical, network, relational, NoSQL.
4. DBMS vs RDBMS → DBMS is basic, RDBMS is advanced with relationships.
📌 Answer: Tell me about Oracle Database
👉 Oracle Database is a Relational Database Management System (RDBMS) developed by
Oracle Corporation.
It is one of the most widely used databases in the world, especially in large companies,
because it is powerful, secure, and supports very large amounts of data.
🔹 Key Points (you can say in interview):
1. RDBMS – It stores data in tables (rows & columns) and allows relationships between
tables.
2. Multi-user & Enterprise Use – Many users can access it at the same time without
problems.
3. SQL & PL/SQL – It supports SQL for querying and PL/SQL (Oracle’s programming
language) for automation.
4. High Performance – Oracle can handle huge amounts of data with fast speed.
5. Features
o Backup & Recovery using RMAN.
o High Availability with RAC (Real Application Clusters).
o Data Security with roles, privileges, encryption.
o Scalability – can run from small systems to big cloud data centers.
6. Versions – Latest version is Oracle Database 19c/21c, but 19c is the Long-Term
Support release.
Monitoring Sessions in Oracle
👉 A session = a connection between a user/application and the Oracle Database.
Every time a user logs in (via SQL*Plus, application, etc.), a session is created.
As a DBA, you must monitor sessions to see who is connected, what they are doing,
and if they are causing issues.
🔹 1. The v$session View
Oracle provides a dynamic performance view called v$session.
It shows details of all current sessions in the database.
Columns include session ID, username, status, machine, program, etc.
🔹 2. Useful Queries with v$session
✅ See all active sessions:
SELECT sid, serial#, username, status, machine, program
FROM v$session
WHERE status = 'ACTIVE';
👉 Shows only active users currently running queries.
✅ See all sessions (active + inactive):
SELECT sid, serial#, username, status, osuser, machine
FROM v$session
WHERE username IS NOT NULL;
👉 Helps check which users/applications are connected.
✅ Find sessions for a specific user:
SELECT sid, serial#, status, machine, program
FROM v$session
WHERE username = 'HR';
👉 Shows all sessions opened by user HR.
✅ Find sessions causing locks/blocking:
SELECT blocking_session, sid, serial#, wait_class, event, seconds_in_wait
FROM v$session
WHERE blocking_session IS NOT NULL;
👉 Helps identify blocking sessions that slow down the database.
✅ Kill a problematic session (if needed):
1. First, get sid and serial# from v$session.
2. Then run:
ALTER SYSTEM KILL SESSION 'sid,serial#' IMMEDIATE;
👉 Example:
ALTER SYSTEM KILL SESSION '123,4567' IMMEDIATE;
🔹 3. Important Columns in v$session
SID & SERIAL# → Unique identifiers of session (needed to kill).
USERNAME → Database user name.
OSUSER → Operating system user.
MACHINE → From which system the user connected.
PROGRAM → Which application (e.g., sqlplus, toad, app server).
STATUS → ACTIVE or INACTIVE.
EVENT / WAIT_CLASS → Shows what the session is waiting for (good for tuning).
✅ Interview-Style Answer
👉 “To monitor sessions, I mainly use the v$session view. It gives details about all current
connections like session ID, username, machine, and status. I can check active sessions, find
blocking users, and even kill problematic sessions using SID and SERIAL#. This helps me
manage database performance and troubleshoot issues.”