Comprehensive Answers for Database Design and Management Exam
PART - A (10 Cartesian Product 2 = 20 Marks)
1. What are the disadvantages of the File Processing System?
- Data Redundancy & Inconsistency: The same data is stored in multiple locations, leading to inconsistencies.
- Difficulty in Data Access: Each application has its own data format, making retrieval complex.
- Data Isolation: Data is stored in separate files, making retrieval difficult.
- Integrity Issues: Constraints like uniqueness and relationships are hard to enforce.
- Atomicity Issues: Transaction failures can leave the database in an inconsistent state.
- Security Concerns: Limited control over access permissions compared to a DBMS.
2. Define Data Independence.
- Data Independence allows modification of database schema without affecting application programs.
- Logical Data Independence: Changes in schema structure do not impact application programs.
- Physical Data Independence: Changes in storage structure do not impact schema structure.
3. What do you mean by instance & schema? Explain the difference.
- Instance: A snapshot of data stored in the database at a particular time.
- Schema: The overall structure and design of the database.
- Difference: Schema remains unchanged over time, while an instance changes frequently.
4. Give an example of the following relationships:
- Many-to-One: Multiple employees reporting to one manager.
- One-to-One: A person and their passport.
- One-to-Many: A teacher having multiple students.
- Many-to-Many: Students enrolled in multiple courses.
5. Differentiate between Cartesian Product and Natural Join.
- Cartesian Product: Returns all possible pairs of tuples from two relations, regardless of matching attributes.
- Natural Join: Combines two relations based on common attributes, removing duplicate columns.
6. Discuss about 2NF.
- A relation is in 2NF (Second Normal Form) if:
- It is in 1NF (First Normal Form).
- There are no partial dependencies (i.e., non-key attributes must depend on the whole primary key).
7. List the anomalies of 1NF.
- Insertion Anomaly: Adding a new record might require dummy values.
- Deletion Anomaly: Deleting a record might result in losing important data.
- Update Anomaly: Changing a value in one place requires multiple updates.
8. Which normal form is considered adequate for normal relational database design?
- Third Normal Form (3NF) is considered adequate as it eliminates transitive dependencies while preserving functional
dependencies.
9. Why do we need Normalization?
- Reduces Data Redundancy
- Eliminates Anomalies
- Improves Data Integrity
- Enhances Query Performance
10. What is a primary key and a candidate key?
- Primary Key: A unique identifier for each record.
- Candidate Key: A set of attributes that can uniquely identify a record; one is selected as the Primary Key.
PART - B (5 Cartesian Product 13 = 65 Marks)
11.a Draw an E-R diagram for a banking enterprise with almost all components and explain.
- Entities: Customer, Account, Loan, Transaction, Employee, Branch
- Relationships:
- A customer can have multiple accounts.
- A customer can apply for multiple loans.
- A branch handles multiple accounts and loans.
- Transactions are linked to accounts.
OR
11.b Compare the following:
- Network Model vs Hierarchical Model
| Feature | Network Model | Hierarchical Model |
|---------|--------------|--------------------|
| Structure | Graph-like (Many-to-Many) | Tree-like (One-to-Many) |
| Flexibility | More flexible | Less flexible |
| Relationship | Parent-child & many-to-many | Only parent-child |
| Query Processing | Complex | Simpler |
12.a Explain SELECT, PROJECT, Cartesian Product, and JOIN operations in relational algebra with an example.
- SELECT (SELECT): Filters rows based on conditions.
- PROJECT (PROJECT): Selects specific columns.
- Cartesian Product (Cartesian Product): Joins every row from one table to every row of another.
- JOIN (JOIN): Combines tables based on common attributes.
OR
12.b Describe the DML and DCL commands for the student's database.
- DML (Data Manipulation Language):
- INSERT INTO Students VALUES (...)
- UPDATE Students SET name = 'John' WHERE id = 101
- DELETE FROM Students WHERE id = 101
- SELECT * FROM Students
- DCL (Data Control Language):
- GRANT SELECT ON Students TO User1
- REVOKE UPDATE ON Students FROM User1
13.a (i) Discuss the main characteristics of the database approach and how it differs from the traditional file system.
- Characteristics:
- Data Abstraction
- Data Independence
- Efficient Query Processing
- Security & Integrity
- Concurrency Control
- Differences:
- Reduces Redundancy
- Enforces Data Integrity
- Supports Transactions
(ii) What are the three levels of abstraction in DBMS?
- Physical Level: How data is stored.
- Logical Level: What data is stored and relationships.
- View Level: How users interact with data.
14.a Illustrate multi-value dependency and fourth normal form (4NF) with an example.
- Multi-Value Dependency (MVD): If A ->-> B, A ->-> C, but B and C are independent.
- 4NF: A relation is in 4NF if it is in BCNF and contains no MVDs.
- Example:
- Student (ID, Course, Hobby) -> If courses and hobbies are independent, MVD exists.
- To achieve 4NF, separate into Student-Course and Student-Hobby tables.
15.a Describe in detail:
(i) Non-loss decomposition:
- Splitting a relation into two or more relations without losing information using natural joins.
(ii) Lossy decomposition:
- Data is lost when decomposing a table, happening when no common key is preserved.