0% found this document useful (0 votes)
17 views4 pages

DBMS Assignment 1

The document provides solutions to assignment questions for the Database Management Systems course (DCA2102). It covers key concepts such as cardinality types, integrity constraints, ACID properties of transactions, relational algebra operations, normalization forms, and fragmentation types with examples. Each section adheres to specified formatting and word count guidelines.

Uploaded by

sakshamshina160
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views4 pages

DBMS Assignment 1

The document provides solutions to assignment questions for the Database Management Systems course (DCA2102). It covers key concepts such as cardinality types, integrity constraints, ACID properties of transactions, relational algebra operations, normalization forms, and fragmentation types with examples. Each section adheres to specified formatting and word count guidelines.

Uploaded by

sakshamshina160
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Internal Assignment

Database Management Systems (DCA2102)

Set-I & Set-II Solutions


Below are the answers to the assignment questions for the course DCA2102. The answers
adhere to the formatting and word count guidelines provided.

Set-I

1. What do you mean by cardinality? What are the different types of Cardinalities in RDBMS?
Explain by giving suitable example.
Cardinality in the context of relational database management systems (RDBMS) refers to
the uniqueness of data values that exist in a particular column of a database table. It
describes the relationship between two tables or entities in terms of how many instances of
one entity are associated with the other.

Types of Cardinality:
1. **One-to-One (1:1)**: A single entity instance in one table is related to a single entity
instance in another table.
Example: A person can have only one passport.

2. **One-to-Many (1:N)**: A single entity instance in one table can be related to multiple
entity instances in another table.
Example: A teacher can teach multiple students.

3. **Many-to-Many (M:N)**: Multiple instances in one table are related to multiple instances
in another table.
Example: Students can enroll in multiple courses, and each course can have multiple
students.

2. What do you mean by Entity Integrity Constraint and Referential Integrity Constraint?
Explain by giving suitable example.
**Entity Integrity Constraint** ensures that each table has a primary key and that the value
of the primary key is unique and not null. This guarantees that every record in the table is
uniquely identifiable.
Example: In a Student table, the 'Student_ID' column serves as the primary key.

**Referential Integrity Constraint** ensures that foreign key values in a table must either
match primary key values in the referenced table or be null. This maintains consistency
between related tables.
Example: In an Enrollment table, the 'Course_ID' foreign key must match the 'Course_ID' in
the Courses table.
3. Explain the important properties of transactions that a DBMS must ensure to maintain data
in the face of concurrent access and system failures.
Transactions in DBMS must satisfy the ACID properties to ensure reliability and consistency
of data during concurrent access and in case of system failures:
1. **Atomicity**: Ensures that a transaction is treated as a single unit, which either
completes entirely or does not happen at all.
Example: In a fund transfer, the amount is debited from one account and credited to
another. If any part fails, the transaction is rolled back.

2. **Consistency**: Ensures that a transaction transforms the database from one consistent
state to another.
Example: After a transaction, the total balance in all accounts remains unchanged.

3. **Isolation**: Ensures that transactions are executed independently of one another.


Example: Two users booking the same ticket cannot interfere with each other.

4. **Durability**: Ensures that once a transaction is committed, the changes are permanent,
even in case of system failures.
Example: After updating a record, the changes persist even if the system crashes.

Set-II

1. Discuss different Operations in Relational Algebra? Explain each operation by giving suitable
example.
Relational Algebra is a procedural query language used to retrieve data from a database. It
consists of several operations:
1. **Selection (σ)**: Retrieves rows from a table that satisfy a given condition.
Example: σ(Age > 30)(Employee)

2. **Projection (π)**: Selects specific columns from a table.


Example: π(Name, Age)(Employee)

3. **Union (∪)**: Combines the results of two relations and removes duplicates.
Example: R1 ∪ R2

4. **Set Difference (-)**: Retrieves rows present in one relation but not in the other.
Example: R1 - R2

5. **Cartesian Product (×)**: Combines each row of one relation with every row of another.
Example: R1 × R2

6. **Join**: Combines rows from two tables based on a related column.


Example: Employee ⨝ Department
2. What do you mean by Normalization? What are the different Normal Forms? Explain by
giving suitable example.
Normalization is a process in database design that organizes data to reduce redundancy and
improve data integrity. It involves dividing large tables into smaller ones and defining
relationships between them. This eliminates inconsistencies and ensures efficient data
storage.

Different Normal Forms:


1. **First Normal Form (1NF)**: Ensures that each column contains atomic values, and
there are no repeating groups.
Example: A table with columns 'Subject1', 'Subject2' is transformed into separate rows for
each subject.

2. **Second Normal Form (2NF)**: Builds on 1NF by ensuring that all non-key attributes are
fully functionally dependent on the primary key.
Example: In a Student table, 'Course_Name' depends on 'Course_ID' rather than
'Student_ID'.

3. **Third Normal Form (3NF)**: Ensures that no transitive dependencies exist. Non-key
attributes must depend only on the primary key.
Example: If 'Department_Name' depends on 'Department_ID' and 'Employee_ID', it should
be moved to a separate table.

4. **Boyce-Codd Normal Form (BCNF)**: A stronger version of 3NF where every


determinant is a candidate key.

3. What do you mean by Fragmentation? What are the different types of Fragmentation?
Explain by giving suitable example.
Fragmentation in DBMS refers to the process of dividing a database into smaller pieces or
fragments to improve performance and ensure data distribution in distributed database
systems. It allows efficient query processing by storing related data close to its point of use.

Types of Fragmentation:
1. **Horizontal Fragmentation**: Divides a table into rows based on specific criteria. Each
fragment contains a subset of rows from the original table.
Example: A 'Customer' table is fragmented by region into 'North_Customers' and
'South_Customers'.

2. **Vertical Fragmentation**: Divides a table into columns. Each fragment contains a subset
of columns and a copy of the primary key to ensure reconstruction.
Example: An 'Employee' table is split into 'Employee_Personal_Details' and
'Employee_Job_Details'.
3. **Hybrid Fragmentation**: Combines horizontal and vertical fragmentation. Rows are
first divided horizontally, and then columns are divided vertically.
Example: A 'Product' table is fragmented by category (horizontal) and then split by
attributes like price and supplier (vertical).

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy