0% found this document useful (0 votes)
6 views8 pages

Database Fundamentals

The document serves as a comprehensive interview guide on database fundamentals, covering key concepts such as database definitions, components, user types, DBMS architecture, and SQL operations. It includes summaries of important topics like entity-relationship diagrams, normalization, and data manipulation languages, along with interview questions and answers for each section. The guide is structured into chapters, making it a valuable resource for preparing for database-related interviews.

Uploaded by

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

Database Fundamentals

The document serves as a comprehensive interview guide on database fundamentals, covering key concepts such as database definitions, components, user types, DBMS architecture, and SQL operations. It includes summaries of important topics like entity-relationship diagrams, normalization, and data manipulation languages, along with interview questions and answers for each section. The guide is structured into chapters, making it a valuable resource for preparing for database-related interviews.

Uploaded by

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

database fundamentals

Last Edited Time @May 25, 2025 6:51 PM

Created By makar samer

Last Edited By makar samer

Database Fundamentals Interview Guide

CH01: Introduction

Database Concepts
Summary:

A database is an organized collection of structured data stored electronically.


Databases allow data to be easily accessed, managed, modified, and updated.
Examples include MySQL, PostgreSQL, Oracle, and MongoDB.
Interview Question:

What is a database?
Answer: A database is a structured collection of data that can be easily
accessed, managed, and updated using a Database Management System
(DBMS).

Database Systems Main Components


Summary:
The main components include hardware, software, data, users, and
procedures. Software includes the DBMS, application programs, and the
operating system.
Interview Question:

What are the components of a database system?


Answer: Hardware, Software, Data, Procedures, and Database Access
Language (e.g., SQL).

Database Users

database fundamentals 1
Summary:
Database users include administrators, developers, and end users. They
interact with the DBMS through queries, applications, or interfaces.
Interview Question:

Name different types of database users.


Answer: DBA (Database Administrator), End Users, Application
Programmers, and System Analysts.

DBMS Architecture and Data Models


Summary:
Architectures include single-tier and multi-tier. Data models describe how data
is organized: hierarchical, network, relational, and object-oriented models.
Interview Question:

What are different types of data models in DBMS?


Answer: Hierarchical, Network, Relational, and Object-oriented.

Mappings
Summary:
Mappings in DBMS relate different levels of abstraction—external, conceptual,
and internal schema.

Interview Question:

What is schema mapping?


Answer: It's the process of mapping between external, conceptual, and
internal schemas.

DBMS Other Functions


Summary:
DBMS functions include data storage, retrieval, update, transaction
management, concurrency control, and backup.
Interview Question:

Name key functions of a DBMS.

database fundamentals 2
Answer: Storage management, Query processing, Security, Backup, and
Recovery.

Centralized and Distributed Database Environments


Summary:

Centralized DB: Single location.

Distributed DB: Data spread over multiple sites.

Interview Question:

Difference between centralized and distributed DB?

Answer: Centralized stores data in one location, while distributed spreads


data across multiple locations.

CH02: Entity Relationship Diagram (ERD)

Entity Relationship Modeling


Summary:
ER modeling uses entities, attributes, and relationships to represent data
logically.
Interview Question:

What is ER modeling?
Answer: A diagrammatic method to design a database using entities and
relationships.

Entities & Attributes


Summary:

Entities represent real-world objects. Attributes describe the properties of


entities.
Interview Question:

What is the difference between entity and attribute?


Answer: An entity is an object (e.g., Student), and an attribute is its
property (e.g., name).

Relationship - Degree and Cardinality Ratio

database fundamentals 3
Summary:

Degree indicates the number of entities in a relationship (binary, ternary).


Cardinality defines numerical mapping (one-to-one, one-to-many, many-to-
many).

Interview Question:

What is cardinality in ER diagrams?


Answer: It defines the number of instances of one entity related to another.

Participation
Summary:

Describes if all entities participate in a relationship (total or partial).

Interview Question:

What is total participation?

Answer: All entity instances must participate in the relationship.

CH03: ERD Mapping to Tables

Mapping Strong and Weak Entities


Summary:

Strong entities have primary keys. Weak entities depend on strong ones and
use foreign keys.
Interview Question:

How are weak entities mapped to tables?


Answer: By creating a table with a foreign key referencing the strong entity.

Mapping Relationship Types


Summary:

1:1 → Merge or use FK.

1:N → FK in many side.

M:N → Create a new relation.

Interview Question:

database fundamentals 4
How do you map many-to-many relationships?
Answer: Create a junction table with foreign keys referencing both tables.

CH04: Structured Query Language (SQL)

Database Schema & Constraints


Summary:

Schema defines structure. Constraints ensure data integrity (e.g., primary key,
foreign key, unique).

Interview Question:

What is a schema in SQL?

Answer: It defines the structure of the database including tables and their
relationships.

SQL DDL & DCL


Summary:

DDL: CREATE, ALTER, DROP

DCL: GRANT, REVOKE

Interview Question:

What is the purpose of DCL commands?

Answer: To control access permissions.

CH05: Data Manipulation Language (DML)

INSERT, UPDATE, DELETE, TRUNCATE


Summary:

Used to add, modify, and remove data.

Interview Question:

Difference between DELETE and TRUNCATE?

Answer: DELETE is row-based and can be rolled back; TRUNCATE is faster


but not roll-backable.

database fundamentals 5
SELECT and Related Clauses
Summary:

SELECT retrieves data. Additional clauses like WHERE, ORDER BY, DISTINCT,
GROUP BY filter and structure results.

Example:

SELECT DISTINCT name FROM employees WHERE salary > 50000 ORDER
BY name ASC;

Interview Questions:

What does DISTINCT do?


Answer: Removes duplicate rows from the result.

How does GROUP BY work?


Answer: Groups records with the same values for aggregation functions.

JOINs and Subqueries


Summary:

INNER JOIN: Matching rows from both tables

LEFT/RIGHT JOIN: All from one table, matched from another

FULL JOIN: All rows

SELF JOIN: Join table to itself

Subquery: Query inside another

Interview Question:

What is a self join?

Answer: A join where a table is joined to itself using aliases.

Aggregate Functions
Summary:

MAX, MIN, COUNT, AVG, SUM

Interview Question:

What does COUNT(*) return?

database fundamentals 6
Answer: The number of rows in the table.

CH06: SQL Other DB Objects

Views
Summary:
Virtual tables from SELECT queries. Can simplify complex queries.
Interview Question:

What is a view?
Answer: A saved query that acts like a table.

Indexes
Summary:

Improve query speed by indexing columns. Can be unique or composite.


Interview Question:

What is the purpose of an index?


Answer: To speed up data retrieval.

CH07: Normalization

What is Normalization?
Summary:

A process to reduce redundancy and improve integrity.


Interview Question:

Why normalize a database?


Answer: To eliminate data redundancy and improve consistency.

Functional Dependency
Summary:

A relationship that expresses that one attribute uniquely determines another.


Interview Question:

What is a functional dependency?

database fundamentals 7
Answer: Attribute A functionally determines B if each value of A maps to
exactly one value of B.

1NF, 2NF, 3NF


Summary:

1NF: Atomic columns.

2NF: Remove partial dependency.

3NF: Remove transitive dependency.

Interview Question:

What is the requirement for 3NF?

Answer: Must be in 2NF and have no transitive dependencies.

Let me know if you want this formatted into a downloadable PDF or DOCX!

database fundamentals 8

You might also like