DBMS QA -
1. What is data abstraction? How is data abstraction achieved in DBMS?
Answer:
Data abstraction refers to the process of hiding the complex details of a system from the user
and showing only the essential features. In DBMS, data abstraction helps in simplifying
interaction with the database by hiding unnecessary details.
Levels of Data Abstraction:
1. Physical level – Describes how data is stored (e.g., files, indices).
2. Logical level – Describes what data is stored and the relationships (e.g., tables,
schemas).
3. View level – Describes a subset of the database (user's perspective).
Achievement in DBMS:
DBMS achieves data abstraction through these layers by ensuring that users don’t need to
worry about the physical storage and can interact through queries and views.
2. What are mapping constraints in DBMS? Explain with example.
Answer:
Mapping constraints define the number of entities that can be associated with another entity
in a relationship. It specifies cardinality—how many instances of an entity relate to instances
of another.
Types of Mapping Constraints:
1. One-to-One (1:1) – One entity in set A is related to one entity in set B.
2. One-to-Many (1:N) – One entity in set A relates to many in B.
3. Many-to-One (N:1) – Many entities in A relate to one in B.
4. Many-to-Many (M:N) – Many entities in A relate to many in B.
Example:
A department can have many employees (1:N), but each employee belongs to only one
department.
3. What is the difference between DDL, DML, and DCL in SQL?
Answer:
Type Full Form Purpose Example Commands
Defines database
DDL Data Definition Language CREATE, ALTER, DROP
schema
,2|Page
Type Full Form Purpose Example Commands
Data Manipulation INSERT, UPDATE, DELETE,
DML Manipulates data
Language SELECT
DCL Data Control Language Controls access to data GRANT, REVOKE
Explanation:
• DDL changes the structure.
• DML works on data stored.
• DCL manages permissions.
4. What is functional dependency? Explain full and trivial functional dependency with
examples.
Answer:
A functional dependency (FD) exists when one attribute uniquely determines another.
Denoted as:
A → B means B is functionally dependent on A.
• Full Functional Dependency: If A → B, and no subset of A alone determines B.
o Example: In (Roll_No, Subject_Code) → Marks, Marks is fully dependent on
both attributes.
• Trivial Functional Dependency: A dependency X → Y is trivial if Y ⊆ X.
o Example: (Roll_No, Name) → Roll_No is trivial since Roll_No is part of
LHS.
5. What is data independence? How is physical data independence different from logical
data independence?
Answer:
Data Independence is the ability to change the schema at one level without altering the
schema at the next higher level.
• Physical Data Independence: Changes in physical storage do not affect logical
schema.
o Example: Changing storage from HDD to SSD.
• Logical Data Independence: Changes in logical schema do not affect external views.
o Example: Adding a new column in a table.
, 3|Page
Difference:
Logical independence is harder to achieve than physical independence because user views are
closely tied to the logical structure.
6. State the 3 schemas of data abstraction in DBMS.
Answer:
The three-schema architecture in DBMS provides data abstraction at different levels:
1. External Schema (View Level): Individual user views. Each user sees only relevant
data.
2. Conceptual Schema (Logical Level): Defines all logical structure like tables,
attributes, and relationships.
3. Internal Schema (Physical Level): Describes physical storage structure and access
paths.
This architecture helps maintain data independence and security.
7. Define E-R diagram and how does it help in system development.
Answer:
An Entity-Relationship (E-R) Diagram is a visual representation of entities, their attributes,
and relationships in a database.
Importance in System Development:
• Helps in understanding database structure before implementation.
• Provides a clear model for communication between stakeholders.
• Aids in normalization and identifying entity relationships.
• Serves as a blueprint for database creation.
Example elements: Entity (rectangle), Attribute (ellipse), Relationship (diamond).
8. What is a Database Management System (DBMS)? Write advantages of DBMS.
Answer:
A DBMS is software that enables users to define, create, maintain, and control access to a
database.
Advantages:
1. Data Redundancy Reduction – Avoids duplicate data.
2. Data Integrity and Accuracy – Maintains consistent data.
3. Data Security – Allows controlled access.