0% found this document useful (0 votes)
20 views6 pages

RDBMS Exam Answers Final

The document provides an overview of key concepts in Relational Database Management Systems (RDBMS), including definitions of databases, generalization, integrity constraints, and various file organization methods. It discusses the advantages of DBMS over file-based systems, data manipulation language (DML), deadlocks and their prevention, and the structure of distributed databases. Additionally, it outlines relational algebra operations that form the basis of SQL for data manipulation and retrieval.
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)
20 views6 pages

RDBMS Exam Answers Final

The document provides an overview of key concepts in Relational Database Management Systems (RDBMS), including definitions of databases, generalization, integrity constraints, and various file organization methods. It discusses the advantages of DBMS over file-based systems, data manipulation language (DML), deadlocks and their prevention, and the structure of distributed databases. Additionally, it outlines relational algebra operations that form the basis of SQL for data manipulation and retrieval.
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/ 6

RDBMS Examination Paper Answers

PART - A (Short Answer Type)

1. Database
A database is an organized collection of data that allows easy access, management,
and updating. Databases help store large amounts of data efficiently. They can be
relational, hierarchical, or object-oriented. Examples include MySQL, Oracle, and
MongoDB.

2. Generalization
Generalization is an abstraction technique that merges multiple lower-level entities
into a higher-level entity. For example, 'Car' and 'Bike' can be generalized into
'Vehicle.' It is useful in ER modeling to reduce redundancy.

3. Integrity Constraint
Integrity constraints are rules ensuring data consistency in a database. Examples
include: Primary Key (ensures unique identification), Foreign Key (maintains referential
integrity), and Check Constraint (restricts data values).

4. Heap File
A heap file is an unordered collection of records stored in a database. It allows fast
insertion but slow retrieval since records are stored randomly.

5. Dual Table
The DUAL table in SQL is a special table used for operations where no actual table is
needed. Example: SELECT SYSDATE FROM DUAL; retrieves the current system date in
Oracle.

6. Group by Queries
The GROUP BY clause in SQL groups rows with the same column values and performs
aggregate functions. Example: SELECT department, COUNT(*) FROM employees GROUP
BY department;

7. Client-Server Computing
A client-server model consists of clients requesting services from a central server. It is
used in web applications, email systems, and cloud storage like Google Drive.

8. Database Security
Database security involves measures to protect data from unauthorized access,
corruption, or loss. Methods include user authentication, encryption, and access control.
PART - B (Essay Answer Type)

9. Advantages of DBMS over File-Based System


A Database Management System (DBMS) provides several advantages over traditional
file-based systems:

1. **Data Redundancy Reduction**: In a file-based system, the same data is stored in


multiple files, leading to redundancy. DBMS minimizes redundancy by maintaining a
single database.

2. **Data Integrity and Consistency**: A DBMS enforces integrity constraints,


ensuring consistent and accurate data.

3. **Security**: DBMS provides access control mechanisms, user authentication, and


encryption to protect data from unauthorized access.

4. **Concurrent Access and Transaction Management**: Multiple users can access


the database simultaneously without conflicts, thanks to concurrency control
techniques.

5. **Data Recovery and Backup**: A DBMS supports automated backups and


recovery mechanisms, ensuring data safety during failures.

Example: In banking systems, DBMS ensures that account balances are consistent
across multiple transactions, preventing anomalies.

10. File Organization Methods


File organization determines how data is stored and accessed efficiently in a
database. The main types include:

1. **Heap File Organization**: Data is stored randomly without any specific order.
Suitable for temporary data storage.

2. **Sequential File Organization**: Records are stored sequentially, making retrieval


efficient for sorted data but slow for random access.

3. **Indexed File Organization**: Uses an index to locate records quickly. Examples


include B-Tree and Hash Indexing.
4. **Hashed File Organization**: Uses a hash function to compute the address where
records are
stored, ensuring fast retrieval.

Example: An airline reservation system may use indexed file organization to quickly
locate flight records by passenger ID.

11. Data Manipulation Language (DML)


DML is a subset of SQL used to manipulate data in a database. The main commands
include:

1. **SELECT**: Retrieves data from tables.


Example: `SELECT * FROM employees WHERE department = 'Sales';`

2. **INSERT**: Adds new records.


Example: `INSERT INTO employees (id, name, salary) VALUES (101, 'John', 50000);`

3. **UPDATE**: Modifies existing records.


Example: `UPDATE employees SET salary = 60000 WHERE id = 101;`

4. **DELETE**: Removes records.


Example: `DELETE FROM employees WHERE id = 101;`

DML enables users to interact with data efficiently, making it a crucial part
of database management.

12. Deadlocks and Prevention


A deadlock occurs when two or more transactions wait indefinitely for resources held by
each other, causing a system halt.

**Causes of Deadlocks:**
- Circular Wait: Each transaction waits for a resource held by another.
- Hold and Wait: Transactions hold some resources while waiting for others.

**Deadlock Prevention Techniques:**


1. **Wait-Die Scheme**: Older transactions wait; younger transactions abort.
2. **Wound-Wait Scheme**: Older transactions force younger ones to release resources.
3. **Timeout-Based Prevention**: Transactions are aborted if they wait beyond a
specified time.

Example: In an online shopping cart system, deadlocks may occur if one process
locks inventory while another locks payment processing. Using timeout-based
prevention can resolve such issues.
13. Structure of Distributed Databases
A distributed database is a collection of multiple interconnected databases spread
across different locations. It improves reliability, availability, and performance.

**Types of Distributed Databases:**


1. **Homogeneous DDBMS**: All databases use the same DBMS.
2. **Heterogeneous DDBMS**: Different DBMSs are used across locations.

**Components of a Distributed Database:**


- **Data Replication**: Copies of data are stored at multiple locations to enhance
availability.
- **Data Fragmentation**: Data is divided into smaller pieces and stored across different
sites.
- **Middleware**: Facilitates communication between different databases.

Example: A multinational company may use a distributed database where each branch
maintains its customer records while sharing critical data globally.
Relational Algebra and its Operations
Relational Algebra is a procedural query language that forms the foundation of SQL
and is used to manipulate and retrieve data from relational databases. It operates on
relations (tables) and produces new relations as results.
Types of Relational Algebra Operations:
1. Selection (σ)
o Used to filter rows based on conditions.
o Example: σ (salary > 50000) (Employee) retrieves employees earning more
than 50,000.
2. Projection (π)
o Selects specific columns from a relation.
o Example: π (name, age) (Employee) retrieves only the name and age
columns.
3. Union ( ∪ )
o Combines two relations and removes duplicates.
o Example: A ∪ B merges two sets of employees.
4. Intersection ( ∩ )
o Returns common records between two relations.
o Example: A ∩ B gives employees common in both sets.
5. Difference ( - )
o Finds records in one relation but not in another.
o Example: A - B returns employees in A but not in B.
6. Cartesian Product ( × )
o Combines all records from two relations.
o Example: Employee × Department lists all employee-department
combinations.
7. Join Operations
o Combines related tuples from different relations.
o Example: Employee ⨝ Department joins employees with their respective
departments.
8. Division ( ÷ )
o Used for queries involving "for all" conditions.
o Example: Finding students who have taken all required courses.
Conclusion:
Relational Algebra provides a mathematical framework for querying relational
databases. It serves as the theoretical foundation for SQL query processing.

You might also like