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
You are on page 1/ 2
Assignment – 3(AI-502)
Question: 1: Database Design - Normalization and Functional Dependencies
Design a database for a university management system. The system stores information about students, courses, and professors. Assume the following attributes for each table: Student: Student_ID, Student_Name, Date_of_Birth, Course_Enrolled, Professor_Assigned Professor: Professor_ID, Professor_Name, Department, Course_Taught Course: Course_ID, Course_Name, Professor_ID, Course_Credit The following functional dependencies hold: Student_ID -> Student_Name, Date_of_Birth, Course_Enrolled Professor_ID -> Professor_Name, Department Course_ID -> Course_Name, Professor_ID, Course_Credit Tasks: 1. Normalize the above schema to 3NF and identify the candidate keys for each relation. 2. List all the functional dependencies in each normalized table. 3. Explain the lossless join and dependency preservation properties in your decomposition process. 4. Discuss the issues with multivalued dependencies and how they can be handled.
Question: 2: Normalization - BCNF and Decomposition
Given the following relation: R(A, B, C, D) with the functional dependencies: A -> B, C B -> D C -> D Tasks: 1. Identify the candidate keys for the relation. 2. Normalize the relation to Boyce-Codd Normal Form (BCNF) and show the decomposition process. 3. Prove that the decomposition is lossless. 4. Discuss whether the decomposition preserves all functional dependencies. If not, provide the necessary changes.
Question: 3: Query Optimization - Select, Project, and Join Operations
Consider the following two relations: Employee(Emp_ID, Emp_Name, Emp_Salary, Dept_ID) Department(Dept_ID, Dept_Name) You are tasked with optimizing the following query: SELECT Emp_Name, Dept_Name FROM Employee E, Department D WHERE E.Dept_ID = D.Dept_ID AND E.Emp_Salary > 50000; Tasks: 1. Explain the relational algebra representation of the above SQL query. 2. Discuss the heuristic-based optimization techniques that could improve the performance of the query. 3. Provide the steps involved in optimizing the query using cost-based optimization. 4. Evaluate the impact of the different join algorithms (Nested Loop Join, Sort-Merge Join, Hash Join) on query performance.
Question: 4: Query Optimization - Cost Estimation and Join Algorithms
You are given the following relations: Orders(Order_ID, Customer_ID, Order_Date, Amount) Customers(Customer_ID, Customer_Name, Address) You need to optimize the following SQL query: SELECT Customer_Name, Order_Date, Amount FROM Orders O, Customers C WHERE O.Customer_ID = C.Customer_ID AND Amount > 1000; Tasks: 1. Show the relational algebra representation for the above SQL query. 2. Explain how the select, project, and join operations can be optimized. 3. Compare and contrast the join algorithms (Nested Loop, Merge Join, and Hash Join) in terms of time complexity and their use cases for large datasets.
Question: 5: Multivalued Dependencies and Problems with Null Values
Consider the following relation: Student_Course_Professor(Student_ID, Student_Name, Course_ID, Professor_ID, Professor_Name) with the following multivalued dependencies: Student_ID ->-> Course_ID, Professor_ID Course_ID ->-> Professor_ID Tasks: 1. Explain what a multivalued dependency (MVD) is and identify the MVDs in the relation. 2. Normalize the relation to Fourth Normal Form (4NF) and explain the decomposition process. 3. Discuss the problems that can arise when dealing with null values in relational databases and how dangling tuples can affect data integrity. 4. How can NULL values be handled during normalization, and what strategies can be adopted to minimize their impact on database design? Question: 6 - what are the steps to be followed to convert a relation in 3NF to BCNF Question: 7 - Explain optimization method Heuristic Based Cost Estimation Based