ADBMS-Paper 1 - Answers
ADBMS-Paper 1 - Answers
- Let’s assume that you have a three classes called TECHNICIAN, JANITOR, MANAGER.
Three of them are employees inside the company. So we can make a super class out of
them as an EMPLOYEE. That’s called Generalization.
- Specialization is kinda opposite of generalization. Lets assume you have a class called
EMPLOYEE and there are different types of employees in your organization. Then you
can create sub classes using the EMPLOYEE parent class. That’s called specialization.
ii)
iii)
QUESTION 03
1)
• Normalization helps in reducing data redundancy by organizing data in a way that avoids storing
the same information in multiple places.
• Organize data in a relational database efficiently.
• Normalization helps prevent anomalies, such as update anomalies, where updating data in one
place may lead to inconsistencies if the same data is stored elsewhere in the database.
• By breaking down large tables into smaller, related tables, normalization helps maintain data
integrity by enforcing relationships between tables through foreign key constraints.
• Well-normalized databases often lead to improved query performance because data is stored
more efficiently, and relationships are well-defined.
2)
Functional dependencies (FDs) describe the relationship between two sets of attributes in a relational
database. If a functional dependency exists between two sets of attributes, it means that knowing the
values of one set uniquely determines the values of the other set.
Lets assume a relation with attributes A and B. If, for every value of A, there is only one corresponding
value of B, we can say that B is functionally dependent on A and write it as A → B.
3)
Fully Functional Dependencies (FFD):
For example, consider a relation with attributes EmployeeID, ProjectID, and ProjectManager. If
ProjectManager is fully functionally dependent on both EmployeeID and ProjectID, it means that
knowing both EmployeeID and ProjectID uniquely determines ProjectManager, and removing either
attribute from the set would break this dependency.
Lets assume there is a relation with attributes StudentID, CourseID, and ProfessorName. If
ProfessorName depends on CourseID, and CourseID depends on StudentID, then there is a transitive
functional dependency from StudentID to ProfessorName.
4) 3NF
BCNF
A relation is in BCNF if, for every non-trivial functional dependency, the determinant is a superkey.
QUESTION 04
……………………………………………………………….OR ………………………………………………………………..
i)
CREATE TRIGGER trg_CheckReorder
AFTER UPDATE ON Items_InHand
FOR EACH ROW
BEGIN
IF NEW.Items_Available <= NEW.ROL THEN
INSERT INTO Purchase_Details (Item_Code, Item_Name)
VALUES (NEW.Item_Code, NEW.Name);
END IF;
END;
……………………………………………….……………………….. OR…………………………………………………
ii)