0% found this document useful (0 votes)
33 views10 pages

DBMS Important Questions & Answers

Uploaded by

konkalokesh372
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)
33 views10 pages

DBMS Important Questions & Answers

Uploaded by

konkalokesh372
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

DBMS Important Questions & Answers - IA1

Examination
SE IT/SEM-III/DSE - Database Management System
Prepared by: Based on Previous Year Papers & Teacher Notes
Date: August 2025
Max Marks: 20
Duration: 1 hour

COMPULSORY QUESTION 1 (5 Marks)

Q1(a) Define Primary Key and Foreign Key with Example. (2 Marks)
Primary Key:
A primary key is a field (or combination of fields) in a table that uniquely identifies each
record in that table
It cannot contain NULL values and must be unique for every record
Only one primary key is allowed per table
Example:

STUDENT Table:
+----------+--------+-------+
| RollNo | Name | Class |
| (PK) | | |
+----------+--------+-------+
| 101 | Amit | SE IT |
| 102 | Priya | SE IT |
| 103 | Rohit | SE IT |
+----------+--------+-------+

Foreign Key:
A foreign key is a field in one table that refers to the primary key of another table
It is used to establish relationships between tables and enforce referential integrity
Can contain NULL values and duplicate values
Example:

STUDENT Table: DEPARTMENT Table:


+---------+-------+--------+ +--------+----------+
| RollNo | Name | DeptID | | DeptID | DeptName |
| | | (FK) | | (PK) | |
+---------+-------+--------+ +--------+----------+
| 101 | Amit | 1 | | 1 | IT |
| 102 | Priya | 2 | | 2 | CS |
+---------+-------+--------+ +--------+----------+

Q1(b) Define Total Participation with Example. (2 Marks)


Total Participation:
Total participation means every entity in an entity set must participate in at least one
relationship in a relationship set
It is represented by a double line in ER diagrams
Also called "existence dependency"
Example:
Consider a university database with entities STUDENT and COURSE having an ENROLLS
relationship:
Every STUDENT must be enrolled in at least one COURSE
This shows total participation of STUDENT in the ENROLLS relationship
Represented as: STUDENT ==== ENROLLS ---- COURSE (double line from STUDENT)

Q1(c) What are the Basic Characteristics of Databases? (1 Mark)


1. Data Integrity - Ensures accuracy and consistency of data
2. Data Redundancy Control - Minimizes data duplication
3. Data Independence - Changes in data structure don't affect applications
4. Data Security - Controls access and protects sensitive data
5. Multi-user Access - Multiple users can work simultaneously
6. Efficient Query Processing - Fast data retrieval and manipulation
7. Backup and Recovery - Prevents data loss
8. Data Sharing - Centralized access enables sharing
9. Structured Data Storage - Data organized for ease of management

CHOOSE ANY THREE FROM REMAINING FOUR QUESTIONS (15 Marks)

Q2. Draw and Explain DBMS System Architecture (5 Marks)


DBMS Architecture has Three Levels:

┌─────────────────────────────────────┐
│ VIEW LEVEL │
│ (External/User Views) │
│ ┌─────────┐ ┌─────────┐ ┌─────────┐│
│ │ View 1 │ │ View 2 │ │ View n ││
│ └─────────┘ └─────────┘ └─────────┘│
└─────────────────────────────────────┘
↕ (External/Logical Mapping)
┌─────────────────────────────────────┐
│ LOGICAL LEVEL │
│ (Conceptual Schema) │
│ Tables, Relationships, │
│ Constraints, Security │
└─────────────────────────────────────┘
↕ (Logical/Physical Mapping)
┌─────────────────────────────────────┐
│ PHYSICAL LEVEL │
│ (Internal Schema) │
│ Files, Indexes, Storage │
│ Structures, Access Paths │
└─────────────────────────────────────┘

Explanation:
1. View Level (External Level):
Highest level of abstraction
Shows only part of database relevant to users
Multiple user views possible
Hides complexity from end users
2. Logical Level (Conceptual Level):
Describes what data is stored and relationships
Includes tables, attributes, data types, constraints
One conceptual schema for entire database
Used by DBAs and database designers
3. Physical Level (Internal Level):
Lowest level of abstraction
Describes how data is physically stored
Includes file structures, indexes, access methods
Concerned with storage efficiency
Data Independence:
Logical Data Independence: Changes in logical schema don't affect external views
Physical Data Independence: Changes in physical storage don't affect logical schema
Q3. Draw ER Diagram for Library Management System (5 Marks)
Entities and Attributes:
1. BOOK
BookID (Primary Key)
Title
Author
ISBN
Publisher
Category
Price
2. MEMBER
MemberID (Primary Key)
Name
Address
Phone
Email
MembershipDate
3. LIBRARIAN
LibrarianID (Primary Key)
Name
Designation
Salary
Relationships:
1. ISSUES (Member issues Book)
IssueDate
ReturnDate
Fine
2. MANAGES (Librarian manages Library)
Shift
ER Diagram Structure:

┌─────────────┐ ┌─────────────┐ ┌─────────────┐


│ MEMBER │────◇│ ISSUES │◇────│ BOOK │
└─────────────┘ └─────────────┘ └─────────────┘
│ │ │
MemberID IssueDate BookID
Name ReturnDate Title
Address Fine Author
Phone ISBN
Email
MembershipDate

┌─────────────┐ ┌─────────────┐
│ LIBRARIAN │────◇│ MANAGES │
└─────────────┘ └─────────────┘
│ │
LibrarianID Shift
Name
Designation
Salary

Cardinalities:
MEMBER : ISSUES : BOOK = M : N (Many-to-Many)
LIBRARIAN : MANAGES = 1 : 1 (One-to-One)

Q4. Explain the Extended Entity-Relationship (EER) Model (5 Marks)


The EER Model extends the basic ER model with additional concepts:
1. Specialization:
Top-down approach
Higher-level entity divided into lower-level subentities
Subentities inherit attributes of superentity
Example: PERSON → STUDENT, FACULTY
2. Generalization:
Bottom-up approach
Lower-level entities combined to form higher-level entity
Common attributes moved to superentity
Example: CAR, TRUCK → VEHICLE
3. Inheritance:
Subentities inherit all attributes of superentity
Can have additional specific attributes
Reduces redundancy
4. Constraints in Specialization/Generalization:
Disjointness Constraint:
Disjoint: Entity can belong to only one subentity (d)
Overlapping: Entity can belong to multiple subentities (o)
Completeness Constraint:
Total: Every superentity must belong to some subentity (double line)
Partial: Superentity may not belong to any subentity (single line)
Example:

PERSON
|
┌─────┴─────┐
│ │
STUDENT FACULTY
| |
RollNo Designation
Course Salary

5. Aggregation:
Relationship treated as higher-level entity
Used when relationship needs to participate in another relationship
6. Categories (Union Types):
Subentity that represents collection of objects from different entity types
Uses ∪ symbol

Q5. Explain Binary Relational Operations in Relational Algebra (5 Marks)


Binary operations work on two relations:
1. UNION (R ∪ S):
Combines tuples from both relations
Result contains all tuples from R and S
Eliminates duplicates
Condition: R and S must be union compatible
Example:

R = {(1,'A'), (2,'B')}
S = {(2,'B'), (3,'C')}
R ∪ S = {(1,'A'), (2,'B'), (3,'C')}

2. SET DIFFERENCE (R - S):


Tuples in R but not in S
Condition: R and S must be union compatible
Example:
R = {(1,'A'), (2,'B'), (3,'C')}
S = {(2,'B'), (4,'D')}
R - S = {(1,'A'), (3,'C')}

3. INTERSECTION (R ∩ S):
Tuples common to both R and S
Condition: R and S must be union compatible
Example:

R = {(1,'A'), (2,'B'), (3,'C')}


S = {(2,'B'), (3,'C'), (4,'D')}
R ∩ S = {(2,'B'), (3,'C')}

4. CARTESIAN PRODUCT (R × S):


Combines every tuple of R with every tuple of S
If R has m tuples and S has n tuples, result has m×n tuples
Degree = degree of R + degree of S
Example:

R = {(1,'A'), (2,'B')}
S = {('X'), ('Y')}
R × S = {(1,'A','X'), (1,'A','Y'), (2,'B','X'), (2,'B','Y')}

5. JOIN Operations:
Natural Join (R ⋈ S):
Combines tuples with same values for common attributes
Eliminates duplicate columns
Theta Join (R ⋈θ S):
Cartesian product followed by selection based on condition θ
Equi Join:
Special case of theta join where θ is equality condition

ADDITIONAL IMPORTANT QUESTIONS


Q6. Explain Data Abstraction and Data Independence (5 Marks)
Data Abstraction:
Process of hiding complex database details and showing only necessary information.
Three Levels:
1. Physical Level - How data is stored
2. Logical Level - What data is stored and relationships
3. View Level - User-specific database views
Data Independence:
Ability to modify schema at one level without affecting other levels.
Types:
1. Physical Data Independence - Change physical storage without affecting logical schema
2. Logical Data Independence - Change logical schema without affecting external views

Q7. Define DBA and Discuss Role of DBA (5 Marks)


Database Administrator (DBA):
IT professional responsible for managing, maintaining, and securing organization's databases.
Key Responsibilities:
1. Database Management
Install, configure, maintain database software
Ensure efficient operation
2. Data Security
Implement security measures
Control unauthorized access
Manage user roles and permissions
3. Performance Tuning
Monitor database performance
Identify bottlenecks
Optimize queries
4. Backup and Recovery
Create backup strategies
Test recovery procedures
Ensure data protection
5. Schema Definition
Design database structure
Execute DDL commands
Define relationships and constraints

Q8. DBMS vs File System (5 Marks)


Aspect DBMS File System

Data Management Automatic with SQL Manual programming required

Security Advanced user roles Basic OS-level security

Redundancy Low (normalization) High (no built-in control)

Query Support Yes (SQL) No query language

Concurrency Built-in control Difficult to manage

Backup/Recovery Automatic features Manual procedures

Integrity Constraints Supported Must be coded manually

Relationships Easy to implement Hard to maintain

Cost Higher Lower

Examples Oracle, MySQL NTFS, FAT32

SAMPLE PRACTICE QUESTIONS


1. Explain different types of keys in DBMS with examples
2. Draw ER diagram for Hospital Management System
3. Explain integrity constraints in relational model
4. What is normalization? Explain 1NF, 2NF, 3NF
5. Explain different types of database users
6. What are the advantages and disadvantages of DBMS?
7. Explain mapping cardinalities in ER model
8. Define weak entity and strong entity with examples

IMPORTANT FORMULAS & CONCEPTS


Relational Algebra Symbols:
Selection: σ (sigma)
Projection: π (pi)
Union: ∪
Intersection: ∩
Difference: -
Cartesian Product: ×
Natural Join: ⋈
Key Points to Remember:
Primary key cannot be NULL
Foreign key can be NULL
Total participation = double line
Partial participation = single line
Weak entity = double rectangle
Relationship = diamond
Attribute = oval
Multivalued attribute = double oval
Derived attribute = dashed oval

Best of luck for your examination!


Remember to draw clear diagrams and provide examples wherever possible.

Common questions

Powered by AI

The three-level architecture of a DBMS facilitates data abstraction by separating the database into different layers. The View Level (External Level) is the highest, showing only parts of the database relevant to users and hiding complexity, allowing multiple user views. The Logical Level (Conceptual Level) outlines what data is stored and includes tables, attributes, and constraints, managed by DBAs and designers. The Physical Level (Internal Level) is the lowest and describes data storage details, such as files and indexes. This architecture is essential for data abstraction as it allows changes at one level without affecting other levels, enhancing flexibility and maintenance .

A Database Administrator (DBA) is responsible for managing, maintaining, and securing an organization's databases. Key roles include database management (installing, configuring, and maintaining database software), ensuring efficient database operations, implementing security measures to control unauthorized access, managing user roles and permissions, performing performance tuning by monitoring database performance, identifying bottlenecks, optimizing queries, creating backup strategies, testing recovery procedures, and ensuring data protection .

Multi-user access is a key characteristic of databases that allows multiple users to access and work with the database simultaneously. This is important because it enables collaboration and efficient operations within organizations, ensuring that users can retrieve and modify data as needed without waiting for others to finish their tasks. It prevents bottlenecks and improves productivity, fostering an environment where data sharing and collaborative activities are seamless and more efficient .

Database Management Systems (DBMS) provide automatic data management with SQL, while traditional file systems require manual programming. DBMS offer advanced security with user roles, whereas file systems rely on basic OS-level security. Redundancy is low in DBMS due to normalization, but high in file systems due to lack of built-in control. DBMS support query languages like SQL, have built-in concurrency control, and automated backup/recovery features. In contrast, file systems lack these functionalities. Integrity constraints are supported in DBMS but must be manually coded in file systems. Overall, DBMS have higher costs compared to file systems .

Data independence in a DBMS refers to the capability to modify a schema definition at one level without affecting a schema definition at another level. There are two types of data independence: logical and physical. Logical data independence allows changes in the logical schema without affecting the external schema or application programs. Physical data independence allows changes to the storage structure or access methods without affecting the conceptual schema. This separation helps ensure that changes at one schema level do not necessitate changes at others, providing flexibility and reducing maintenance cost .

Normalization is a systematic process to organize a database into tables and columns, reducing data redundancy and improving data integrity. The First Normal Form (1NF) ensures that the values in each column are atomic and each column holds unique data. The Second Normal Form (2NF) builds on 1NF by removing subsets of data that apply to multiple rows and creating separate tables for them, ensuring that all attributes depend on the primary key entirely. The Third Normal Form (3NF) eliminates transitive dependency by ensuring that non-primary key attributes do not depend on other non-primary key attributes, forming tables where all dependencies are directly on the primary key. Normalization thus structures the database to minimize redundancy and dependency, optimizing data storage and reducing anomalies during data operations .

Total participation occurs when every entity in an entity set is involved in at least one relationship in a relationship set. It is significant because it ensures completeness in the representation of relationships. In ER diagrams, it is indicated by a double line connecting the entity to the relationship. For example, in a university database, total participation is represented for the STUDENT entity in the ENROLLS relationship with COURSE, indicating that every student must be enrolled in at least one course, ensuring that the database accurately reflects real-world organizational rules .

The Extended Entity-Relationship (EER) Model enhances the basic ER model by introducing additional concepts such as specialization and generalization, inheritance, aggregation, and categories. Specialization is a top-down approach where higher-level entities are divided into lower-level subentities, which inherit attributes from the superentity. Generalization is a bottom-up approach where lower-level entities are combined to form a higher-level entity. Aggregation is used when a relationship needs to participate in another relationship, treated as a higher-level entity. Categories represent a collection of objects from different entity types .

A foreign key is a field in one table that refers to the primary key of another table, establishing a relationship between the two tables. It helps maintain referential integrity by ensuring that every value of a foreign key matches a value of a primary key in the referenced table, preventing orphaned records and maintaining consistent data across tables. For example, in a database with STUDENT and DEPARTMENT tables, the DeptID in the STUDENT table is a foreign key referring to the DeptID in the DEPARTMENT table. This ensures that all students belong to a valid department .

A natural join is a type of relational operation that combines two tables based on common attributes, eliminating duplicate columns in the result. For example, if R has columns (ID, Name) and S has columns (ID, Department), the natural join R ⋈ S would return a table with columns (ID, Name, Department) containing only rows with matching ID values from both tables. In contrast, a Cartesian product combines every tuple of the first relation with every tuple of the second, resulting in a table with all possible combinations. For example, if R has tuples {(1,'A'), (2,'B')} and S has {('X'), ('Y')}, the Cartesian product R × S results in a table with four tuples: {(1,'A','X'), (1,'A','Y'), (2,'B','X'), (2,'B','Y')} .

You might also like