Database Management Systems
6 previous year questions.
High-Yield Trend
Chapter Questions 6 MCQs
Official Solution
Database Normalization
Normalization is the process of organizing data in a database to eliminate redundancy and ensure data integrity. The primary goal is to reduce the chances of anomalies when inserting, updating, or deleting data. The process involves dividing a database into tables and using relationships to maintain the integrity of the data.
First Normal Form (1NF):
Data is organized into tables with no repeating groups. Each column must contain atomic (indivisible) values. Example:
| Student ID | Courses |
|---|---|
| 1 | Math, Science |
| 2 | English, History |
In 1NF, the above table is converted to:
| Student ID | Course |
|---|---|
| 1 | Math |
| 1 | Science |
| 2 | English |
| 2 | History |
Second Normal Form (2NF):
In 2NF, the table must be in 1NF and all non-key attributes must be fully functionally dependent on the primary key. This eliminates partial dependency. Example:
A table with a composite key (Student ID, Course) would require separate tables for student information and courses to eliminate redundancy.
Third Normal Form (3NF):
In 3NF, the table must be in 2NF, and there must be no transitive dependency (i.e., non-key attributes should not depend on other non-key attributes). This ensures that each column is only dependent on the primary key.
Conclusion:
Normalization helps in organizing data to minimize redundancy and ensure data integrity. By following 1NF, 2NF, and 3NF, databases become more efficient and maintainable.
Official Solution
Data Retrieval: SQL allows for easy retrieval of data from one or more tables using the SELECT statement. It supports filtering, sorting, and aggregation of data.
Data Manipulation: SQL provides commands like INSERT, UPDATE, and DELETE to add, modify, and remove data from tables.
Data Definition: SQL allows for the creation and modification of database structures with commands like CREATE, ALTER, and DROP.
Data Integrity: SQL supports constraints like primary keys, foreign keys, unique, and check constraints, ensuring data integrity and enforcing business rules.
Joins: SQL allows the combination of data from multiple tables using JOIN operations, such as INNER JOIN, LEFT JOIN, and RIGHT JOIN.
Transaction Control: SQL supports transaction control with commands like COMMIT, ROLLBACK, and SAVEPOINT, ensuring data consistency and atomicity.
Conclusion:
SQL is a powerful and versatile language for managing relational databases, offering features that support efficient data retrieval, manipulation, integrity, and control.
Official Solution
Data Integrity: RDBMS enforces data integrity through constraints like primary keys, foreign keys, and unique constraints, ensuring that the data is accurate and consistent.
Data Security: RDBMS provides security features to protect data, including user authentication, access control, and encryption, ensuring that only authorized users can access the data.
Ease of Use: SQL (Structured Query Language) provides a standardized and easy-to-learn method for querying, updating, and managing data.
Scalability: RDBMSs can handle large amounts of data, offering support for high-volume transactions and the ability to scale as needed.
Flexibility and Maintenance: With a relational model, data can be easily modified and updated. RDBMSs also offer backup and recovery options, ensuring data can be restored in case of failure.
Conclusion:
RDBMS provides several advantages such as data integrity, security, scalability, and flexibility, making it a powerful tool for managing structured data in businesses and applications.
Official Solution
Features of RDBMS:
- Data is stored in tables with rows and columns.
- Supports SQL queries for data manipulation and retrieval.
- Ensures data integrity through constraints such as primary keys, foreign keys, and unique keys.
- Supports normalization to reduce data redundancy.
Examples of RDBMS:
- MySQL
- PostgreSQL
- Oracle Database
- Microsoft SQL Server
Conclusion:
RDBMS is a powerful and efficient system for managing large datasets, ensuring data integrity, and supporting complex queries in a variety of applications.
Official Solution
Types of Databases: - Relational Database: Data is stored in tables with rows and columns, and relationships between data are established using keys. Example: MySQL, PostgreSQL.
- NoSQL Database: Designed for unstructured or semi-structured data and is more flexible in terms of schema design. Example: MongoDB, Cassandra.
- Hierarchical Database: Data is organized in a tree-like structure. Example: IBM's Information Management System (IMS).
- Object-Oriented Database: Data is stored as objects, similar to how it is handled in object-oriented programming. Example: db4o.
Components of a Database: - Tables: Data is stored in tables consisting of rows and columns.
- Queries: SQL or other query languages are used to retrieve and manipulate data.
- Indexes: Used to optimize the retrieval of data.
Conclusion:
A database is a system used to store and manage data efficiently, with different types to cater to specific data structures and retrieval needs.
Official Solution
Databases are designed to store various types of data in an organized manner. The data can include text, images, audio, video, and files. Step 2: Analyzing the options.
- (A) Image: Images can be stored in a database as binary data or as references (links) to image files.
- (B) Text and files: Text and files can also be stored in databases as records or files.
- (C) Audio or video: Audio and video can be stored in databases in formats such as BLOB (Binary Large Object).
- (D) All of these: This is correct. A database can store all types of data, including images, text, files, and multimedia like audio and video. Step 3: Conclusion.
The correct answer is (D) All of these, as databases are capable of storing various types of data. Final Answer: The correct answer is (D) All of these.