MAULANA ABUL KALAM AZAD UNIVERSITY OF TECHNOLOGY, WEST BENGAL
Paper Code: BCAC401
Database Management System
UPID: 400086
Time Allotted: 3 Hours
Full Marks: 70
The figures in the margin indicate full marks.
Candidates are required to give their answers in their own words as far as practicable.
Group-A (Very Short Answer Type Questions)
Answer any ten of the following: (1 × 10 = 10)
Data about data is known as ______.
Answer: Metadata.
"Not applicable" condition in a relation is represented as ______.
Answer: NULL.
Command to add attributes to an existing relation: ______.
Answer:
ALTER TABLE.
Symbol used to select a tuple in relational algebra: ______.
Answer: σ (sigma).
One cause of file system failure: ______.
Answer: Data redundancy or Data inconsistency.
Main goal of indexing: ______.
Answer: Speed up data retrieval.
A transaction proceeds only after the concurrency control manager ______ the lock.
Answer: Grants.
In the relational model, rows are called ______.
Answer: Tuples.
Entity set without sufficient attributes for a primary key is a ______.
Answer: Weak entity set.
Command to remove records without affecting table structure: ______.
Answer:
DELETE.
A relation is in 2NF if it has no ______ dependencies.
Answer: Partial functional.
Files of unordered records are called ______.
Answer: Heap files.
Group-B (Short Answer Type Questions)
Answer any three of the following: (5 × 3 = 15)
2. Data Abstraction in DBMS
Definition: Hiding complex implementation details from users.
Levels:
Physical: How data is stored (files, indexes).
Logical: Tables, relationships (schema).
View: User-specific data presentation.
3. Mapping Constraints
Types:
One-to-One (1:1): A student has one unique ID.
One-to-Many (1:N): A department has many employees.
Many-to-Many (M:N): Students enroll in multiple courses.
4. DDL vs. DML vs. DCL
| Category | Purpose | Examples |
|---|---|---|
| DDL | Define structure | CREATE, ALTER, DROP |
| DML | Manipulate data | SELECT, INSERT |
| DCL | Control access | GRANT, REVOKE |
5. Functional Dependency
Full FD:
{StudentID, CourseID} → Grade(both keys needed).Trivial FD:
{StudentID} → StudentID(always true).
6. Data Independence
Physical: Change storage without affecting apps (e.g., switching from HDD to SSD).
Logical: Change schema without altering apps (e.g., adding a column).
Group-C (Long Answer Type Questions)
Answer any three of the following: (15 × 3 = 45)
7. Database Schema vs. Instance
Schema: Blueprint (tables, relationships). Changes rarely.
Instance: Actual data at a time. Changes frequently.
8. ER Diagram for a Company
Entities:
Department(Name, Manager, StartDate).Project(Name, Number, Location).Employee(Name, ID, Salary, Supervisor).
Relationships:
Manages(1:1),Controls(1:N),Works_On(M:N with Hours/Week).
9. Relational Algebra Queries (SBR Example)
(i) Sailors reserving ≥2 boats:
π Sname (σ COUNT(Bid)≥2 (Sailors ⨝ Reserves))
(ii) Sailors >20 years not reserving red boats:
π Sname (σ Age>20 (Sailors)) - π Sname (Sailors ⨝ Reserves ⨝ σ Color='Red' (Boats))
10. Keys in DBMS
Primary Key: Unique identifier (e.g.,
StudentID).Candidate Key: Potential primary keys (e.g.,
EmailorSSN).Foreign Key: Links tables (e.g.,
DeptIDinEmployeetable).
11. DBMS vs. File System
DBMS: Centralized, avoids redundancy, supports transactions.
File System: Decentralized, prone to inconsistency.
Group-A (Very Short Answer Type Questions)
Solutions (Any 10):
Metadata
Data describing other data (e.g., table definitions in a catalog).
NULL
Represents missing/unknown data in a relational table.
ALTER TABLEExample:
ALTER TABLE Students ADD COLUMN Phone VARCHAR(10);
σ (sigma)
Relational algebra selection operator:
σ_(Age>20)(Students)
File System Failure Cause
Data redundancy (duplicate data) or inconsistency (conflicting updates).
Indexing Goal
Accelerate query performance (e.g., B-tree indexes).
Grants
The concurrency control manager grants locks to transactions to ensure isolation.
Tuples
Rows in a relational table.
Weak Entity Set
Depends on a strong entity (e.g.,
Dependentrelies onEmployee).
DELETERemoves rows:
DELETE FROM Employees WHERE Salary < 30000;
Partial Functional Dependencies
Non-prime attribute depends on part of a composite key (violates 2NF).
Heap Files
Unordered records with no indexing.
Group-B (Short Answer Type Questions)
Solutions (Any 3):
2. Data Abstraction in DBMS
Levels:
Physical: Storage details (files, indexes).
Logical: Schema (tables, relationships).
View: User-specific interfaces.
Purpose: Simplify user interaction while hiding complexity.
3. Mapping Constraints
Types:
1:1: One passport per person (
Passport↔Person).1:N: One department has many employees (
Department→Employee).M:N: Students enroll in courses (resolved via junction table).
4. DDL vs. DML vs. DCL
| Type | Purpose | Example |
|---|---|---|
| DDL | Define structure | CREATE TABLE Employees (...); |
| DML | Manipulate data | INSERT INTO Employees VALUES (...); |
| DCL | Manage permissions | GRANT SELECT ON Employees TO Alice; |
5. Functional Dependency
Full FD:
{StudentID, CourseID} → Grade(needs both keys).Trivial FD:
{StudentID} → StudentID(always true).
6. Data Independence
Physical: Change storage (e.g., SSD → HDD) without app changes.
Logical: Add a column (e.g.,
Employees.Address) without modifying queries.
Group-C (Long Answer Type Questions)
Solutions (Any 3):
7. Database Schema vs. Instance
Schema:
Structure (tables, constraints).
Rarely changes (e.g., adding a
Birthdatecolumn).
Instance:
Current data (rows).
Changes frequently (e.g., inserting new employees).
8. ER Diagram for a Company
Entities:
Department(DeptID, Name, ManagerStartDate).Project(ProjID, Name, Location).Employee(EmpID, Name, Salary, SupervisorID).
Relationships:
Manages(1:1 betweenEmployeeandDepartment).Controls(1:N fromDepartmenttoProject).Works_On(M:N betweenEmployeeandProjectwith attributeHours/Week).
Diagram:
[Department]-(Manages)-[Employee] [Department]-(Controls)-[Project] [Employee]-(Works_On)-[Project]
9. Relational Algebra (SBR Example)
(i) Sailors reserving ≥2 boats:
π Sname (σ COUNT(Bid)≥2 (Sailors ⨝ Reserves))
(ii) Sailors >20 years not reserving red boats:
π Sname (σ Age>20 (Sailors)) - π Sname (Sailors ⨝ Reserves ⨝ σ Color='Red' (Boats))
10. Keys in DBMS
Primary Key:
StudentIDinStudentstable.Candidate Key:
EmailorSSN(could be primary keys).Foreign Key:
DeptIDinEmployeesreferencingDepartments.
11. DBMS vs. File System
| Aspect | DBMS | File System |
|---|---|---|
| Data Redundancy | Minimized via normalization | High (duplicate files) |
| Consistency | Enforced via ACID transactions | No guarantees |
| Querying | SQL (structured) | Manual search (unstructured) |
Key Concepts Summary
Normalization:
1NF (atomic values), 2NF (no partial dependencies), 3NF (no transitive dependencies).
SQL Commands:
DDL (
CREATE,ALTER), DML (SELECT,INSERT), DCL (GRANT).
ER Modeling:
Entities, weak/strong entities, relationships (1:1, 1:N, M:N).
Relational Algebra:
σ (select), π (project), ⨝ (join), ∪ (union).

No comments:
Post a Comment