Section A — 1 Mark Questions
1. Define a Database Management System. [1 Mark]
Answer: A DBMS is a software system designed to store, retrieve, define, and manage data in a database.
2. What is the primary purpose of a database system? [1 Mark]
Answer: The primary purpose is to provide an efficient and convenient environment for storing and retrieving database information while ensuring data integrity and security.
3. Name one common application of a DBMS. [1 Mark]
Answer: Banking systems for managing customer accounts and transactions.
4. What is a data model? [1 Mark]
Answer: A collection of conceptual tools for describing data, data relationships, and data semantics.
5. What does the 'D' in DBMS stand for? [1 Mark]
Answer: Database.
6. Define Physical Data Independence. [1 Mark]
Answer: The ability to modify the physical schema without changing the logical schema.
7. What is an attribute in a relational model? [1 Mark]
Answer: An attribute represents a property or characteristic of an entity.
8. What is a constraint in a database? [1 Mark]
Answer: A rule that restricts the values that can be stored in a column or table.
9. What is the role of a Database Administrator? [1 Mark]
Answer: To manage the database, perform backups, and ensure data security.
10. Define logical data independence. [1 Mark]
Answer: The ability to change the logical schema without modifying the application programs.
11. What is a schema? [1 Mark]
Answer: The overall design or structure of the database.
12. What does an ER model represent? [1 Mark]
Answer: It represents data as entities and relationships between them.
13. What is a 'tuple' in a table? [1 Mark]
Answer: A tuple is a single row in a table representing a record.
14. Give an example of a Not Null constraint. [1 Mark]
Answer: Ensuring a field like 'EmployeeID' must always contain a value.
15. What is a primary key? [1 Mark]
Answer: A field that uniquely identifies each record in a table.
16. What is redundant data? [1 Mark]
Answer: Duplicate information stored in a database that leads to inconsistency.
17. What is an instance of a database? [1 Mark]
Answer: The collection of information stored in the database at a particular moment in time.
18. What is a foreign key? [1 Mark]
Answer: A field that links two tables together by referencing the primary key of another table.
19. Name one type of data model. [1 Mark]
Answer: Relational Model.
20. What is the main benefit of using a DBMS instead of file systems? [1 Mark]
Answer: Elimination of data redundancy and inconsistency.
Section B — 2/3 Mark Questions
1. Explain the concept of Data Independence. [2 Marks]
Answer: Data independence refers to the immunity of user applications to changes made in the definition and organization of data. It is categorized into physical and logical data independence.
2. Briefly describe the 3-level architecture of a DBMS. [3 Marks]
Answer: The architecture includes the Physical Level (how data is stored), the Logical Level (what data is stored and relationships), and the View Level (how users perceive the data).
3. What is the difference between a schema and an instance? [2 Marks]
Answer: A schema is the static design or blueprint of the database, whereas an instance is the actual data stored in the database at a specific point in time.
4. Explain the 'Unique' constraint with an example. [2 Marks]
Answer: A unique constraint ensures that all values in a column are different. For example, an email address column in a user table must be unique for every user.
5. Discuss the importance of data integrity in DBMS. [3 Marks]
Answer: Data integrity ensures that data remains accurate and consistent throughout its lifecycle. It prevents unauthorized modifications and maintains correct relationships between data elements, which is vital for reliable database operations.
6. Compare the Relational model with the Entity-Relationship model. [3 Marks]
Answer: The ER model is used for conceptual design focusing on entities and relationships. The relational model is used for the logical implementation of the database using tables, rows, and columns.
7. List two common database applications. [2 Marks]
Answer: 1. Online Banking: Storing account details and transactions. 2. University Management: Storing student grades and course schedules.
8. What is a check constraint? Give an example. [2 Marks]
Answer: A check constraint validates that the data entered into a column meets a specific condition. For example, age column must have a value > 18.
9. How does a DBMS reduce data redundancy? [3 Marks]
Answer: A DBMS uses normalization techniques to organize data into tables, ensuring that information is not unnecessarily repeated. Centralized control allows data to be updated in one place, maintaining consistency across the whole system.
10. Define the role of the Query Processor. [2 Marks]
Answer: The query processor is responsible for parsing, optimizing, and executing user queries to retrieve or update data from the database.
Section C — 5 Mark Questions
1. Explain the components of a DBMS in detail. [5 Marks]
Answer:
Components Overview
A DBMS consists of several components that work together to manage data effectively.
Key Components
- Query Processor: Translates user queries into low-level instructions that the storage manager understands.
- Storage Manager: Acts as the interface between the data stored in the database and the queries/programs submitted. It manages the allocation of disk space and the retrieval of data.
- Data Dictionary: Stores metadata about the database, including the structure, constraints, and relationships.
- Transaction Manager: Ensures the database remains in a consistent state even in the event of system failures.
- Database Access Interface: Provides the mechanism for users and applications to interact with the database.
2. Describe the Three-Level Architecture of a Database System. [5 Marks]
Answer:
Introduction
The ANSI/SPARC architecture is a standard for database systems, dividing them into three levels to provide data independence.
Levels
- Physical Level: The lowest level, describing how data is actually stored on the storage medium.
- Logical Level: Describes what data is stored in the database and the relationships among that data.
- View Level: The highest level, describing only part of the entire database relevant to a particular user.
Importance
This separation allows users to interact with the system without needing to know the complexities of physical storage, ensuring that changing the physical storage does not break user applications.
3. Elaborate on the different types of data models used in a DBMS. [5 Marks]
Answer:
Definition
A data model is a high-level description of data and its structure, defining how data is organized and related.
Types of Models
- Relational Model: Uses tables (relations) to represent data and relationships. This is the most common model used in modern databases.
- Entity-Relationship (ER) Model: A conceptual model representing data as entities, attributes, and relationships. Often used in the early design phase.
- Hierarchical Model: Organizes data in a tree-like structure, where each record has a single parent.
- Network Model: An extension of the hierarchical model where records can have multiple parent records.
Conclusion
Choosing a model depends on the specific requirements of the application, such as query complexity and data structure.
4. Discuss the purpose and advantages of a Database Management System over file systems. [5 Marks]
Answer:
Purpose
The main purpose of a DBMS is to manage large amounts of shared data efficiently and securely.
Advantages over File Systems
- Reduced Redundancy: File systems often store the same data in multiple files, while DBMS centralizes data.
- Consistency: By reducing redundancy, the DBMS ensures that updates occur in one place, preventing data inconsistency.
- Security: A DBMS provides sophisticated mechanisms for access control and authentication.
- Data Sharing: Multiple users can access the same data simultaneously without conflict.
- Integrity: The DBMS enforces constraints, ensuring that only valid data is stored in the system.
5. Explain the various types of integrity constraints in a DBMS. [5 Marks]
Answer:
Introduction
Constraints are rules applied to data columns to ensure the accuracy and reliability of the information stored in the database.
Types of Constraints
- Primary Key: Ensures that each record is uniquely identifiable and prevents NULL values in the primary key column.
- Foreign Key: Ensures referential integrity by checking that the value in one table matches a valid primary key in another table.
- Unique Constraint: Prevents duplicate entries in a specific column or set of columns.
- Not Null Constraint: Ensures that a specific field cannot be left blank during a data entry process.
- Check Constraint: Validates that the data satisfies a specific logical condition (e.g., Salary > 0).
Application
These constraints are critical for maintaining high-quality data and preventing corruption at the database level.