Database_Exam_Answers
Database_Exam_Answers
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
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
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.