Assignment 6
Assignment 6
Course: CSE-414
Assignment-03
Date: 17-01-2024
ID: 21701013
Department: Computer Science and Engineering
Course: CSE-414
Submitted to: Dr. Rudra Pratap Deb Nath
Associate Professor
Department of Computer Science and Engineering
University of Chittagong
1
Contents
1 Question-01 2
2 Question-02 3
1
1 Question-01
Problem Statement:
2
2 Question-02
Problem Statement:
Description: Advantages and Disadvantages of Relation Creation Methods for Generalization Rela-
tionships:
1. Single Table:
Advantages:
Memory Efficient: Stores all data in a single table,potentially minimizing memory usage.
Efficient for Common Queries: Queries involving attributes shared by all classes are simple and effi-
cient.
Disadvantages:
Null Values: Can lead to many null values for subclass-specific attributes in rows representing other
subclasses.
Query Inefficiency: Queries on subclass-specific attributes require filtering based on the type at-
tribute, potentially impacting performance.
Update Anomalies: Updating shared attributes requires modifying the same data in every row, in-
creasing risk of inconsistencies.
3
2. Table for Each Subclass:
Advantages:
Data Normalization: Eliminates null values and redundancy, improving data integrity.
Disadvantages:
Increased Complexity: Requires more tables and joins, making the schema more complex and po-
tentially harder to manage.
Redundancy: Shared attributes are duplicated in each subclass table, leading to increased storage
requirements.
Join Overhead: Queries involving multiple subclasses require joins across several tables, impacting
performance.
Advantages:
Balance between Normalization and Redundancy: Eliminates null values while minimizing data du-
plication compared to separate subclass tables.
Efficient Queries: Offers good performance for both shared and subclass-specific attribute queries.
Disadvantages:
Joins for Shared Attributes: Still requires joins for queries involving shared attributes across the
superclass and subclass tables.
Memory Usage:Might use more memory than a single table due to separate superclass and subclass
tables.
Advantages:
Simple Queries: Individual class queries are highly efficient thanks to dedicated tables.
Disadvantages:
Redundancy and Update Anomalies: Highly redundant data across all tables, leading to increased
storage requirements and risks of update inconsistencies.
Complex Schema: Difficult to manage due to numerous tables and potential for inconsistency when
updating shared attributes.
4
Problem Statement: