Important Questions
Class Test 1 – Question Bank
(Database Management System, MSBTE K-Scheme)
2 Marks Questions:
1 Define Data and Database.
2. Define DBMS and give two advantages.
3. Define Entity and Attribute.
4. Define a Data Model. List types of data models used in DBMS.
5. Define Primary Key and Foreign Key.
6. List any four applications of DBMS.
7. List any four symbols used in ER diagram.
8. Define normalization.
9. Define insertion and deletion anomaly.
10. Define candidate key and super key.
4 Marks Questions:
1. Explain how a DBMS is better than a File Processing System..
2. Describe data abstraction in DBMS with a neat diagram.
3. Draw and explain overall structure of DBMS.
4. State and explain types of keys with suitable examples.
5. Describe Domain Integrity Constraint with syntax and example.
6. Describe Referential Integrity Constraint with syntax and example.
7. Explain two tier and three tier architecture of DBMS.
8. Draw ER diagram for a hospital management system.
9. Describe any four Codd’s rules.
10. Explain Second Normal Form (2NF) and Third Normal Form (3NF) with example.
1 Define Data and Database.
Answer:
Data:
Data refers to raw facts and figures that are collected and have no meaning by themselves until processed.
Database:
A database is an organized collection of related data stored electronically for easy access, management, and retrieval.
2. Define DBMS and give two advantages.
Answer:
Definition:
A Database Management System (DBMS) is software that stores, manages, and facilitates access to databases efficiently.
Two advantages:
-
Reduces data redundancy and inconsistency.
-
Provides data security and controlled access.
3. Define Entity and Attribute.
Answer:
Entity:
An entity is a real-world object or thing in a database that can be distinctly identified and stored, such as a person, place, event, or object.
Attribute:
An attribute is a property or characteristic of an entity that describes or defines it, such as name, age, or ID.
4. Define a Data Model. List types of data models used in DBMS.
Answer:
Definition:
A Data Model is a conceptual framework that defines how data is organized, stored, and manipulated in a database.
Types of Data Models used in DBMS:
-
Hierarchical Model
-
Network Model
-
Relational Model
5. Define Primary Key and Foreign Key.
Answer:
Primary Key:
A primary key is a unique attribute or a set of attributes in a table that uniquely identifies each record in that table. It cannot have NULL values.
Foreign Key:
A foreign key is an attribute or a set of attributes in one table that refers to the primary key in another table, establishing a relationship between the two tables.
6. List any four applications of DBMS.
Answer:
Applications of DBMS:
-
Banking systems
-
Airline reservation systems
-
University management systems
-
Inventory management systems
7. List any four symbols used in ER diagram.
Answer:
Rectangle – Represents an Entity
-
Ellipse (Oval) – Represents an Attribute
-
Diamond – Represents a Relationship
-
Double Ellipse – Represents a Multivalued Attribute
8. Define normalization.
Answer:
Normalization (in DBMS):
Normalization is the process of organizing data in a database to reduce redundancy and improve data integrity by dividing tables into smaller, related tables and defining relationships between them.
9. Define insertion and deletion anomaly.
Answer:
Insertion Anomaly:
It is a problem that occurs when certain data cannot be inserted into the database without the presence of other data.
Deletion Anomaly:
It is a problem that occurs when deleting some data unintentionally causes the loss of additional, related data.
10. Define candidate key and super key.
Answer:
Candidate Key: A minimal set of attributes that uniquely identifies tuples in a relation.
Super Key: A set of attributes that uniquely identifies tuples, may have extra attributes.
4 Marks Questions:
1. Explain how a DBMS is better than a File Processing System.
Answer:
2. Describe data abstraction in DBMS with a neat diagram.
Answer:
Data Abstraction in DBMS
Data abstraction is the process of hiding the internal details of the database and showing only the essential features to the user. It simplifies interaction by dividing the database system into three levels:
-
Physical Level: How data is physically stored in the database.
-
Logical Level: What data is stored and the relationships between data.
-
View Level: What part of the database is visible to a specific user.
3. Draw and explain overall structure of DBMS.
Answer:
Diagram:
Explanation:
-
User Interface: Enables users to interact with the database.
-
Query Processor: Converts queries into low-level instructions.
-
Storage Manager: Manages data storage and retrieval.
-
Buffer Manager: Handles data transfer between disk and memory.
-
File Manager: Manages disk space and files.
-
Physical Database: Stores the actual data on disk.
4. State and explain types of keys with suitable examples.
Answer:
Types of Keys:
-
Primary Key: Uniquely identifies each record in a table. Example:
Student_IDin Student table. -
Candidate Key: Possible keys that can uniquely identify records; one is chosen as Primary Key. Example:
EmailandStudent_ID. -
Foreign Key: Refers to Primary Key in another table to create a relationship. Example:
Student_IDin Enrollment table. -
Composite Key: Combination of two or more attributes to uniquely identify a record. Example:
Student_ID+Course_IDin Course_Enrollment table.
5. Describe Domain Integrity Constraint with syntax and example.
Answer:
Domain Integrity Constraint:
Domain Integrity Constraint ensures that the values stored in a column of a database table are valid and fall within a defined domain (set of permissible values). It restricts the type, format, and range of data for that column.
Syntax:
column_name data_type [CONSTRAINT constraint_name] CHECK (condition)
Example:
CREATE TABLE Students (
StudentID INT,
Age INT CHECK (Age BETWEEN 18 AND 30)
);
In this example, the Age column is restricted to values between 18 and 30, enforcing domain integrity.
6. Describe Referential Integrity Constraint with syntax and example.
Answer:
Referential Integrity Constraint:
It ensures that a foreign key in a table must match a primary key value in another table or be NULL, maintaining data consistency.
Syntax:
FOREIGN KEY (foreign_key_column) REFERENCES parent_table(primary_key_column);
Example:
CREATE TABLE Employee (
EmpID INT PRIMARY KEY,
DeptID INT,
FOREIGN KEY (DeptID) REFERENCES Department(DeptID)
);
7. Explain two tier and three tier architecture of DBMS.
Answer:
Two-Tier Architecture:
Consists of client and server layers. The client directly interacts with the database server. It is simple but less scalable and secure.
Three-Tier Architecture:
Consists of presentation (client), application (middle), and database (server) layers. The middle layer handles business logic, improving scalability, security, and maintainability.
8. Draw ER diagram for a hospital management system.
Answer:
9. Describe any four Codd’s rules.
Answer:
Four Codd’s Rules in DBMS:
-
Information Rule: All data is stored in tables.
-
Guaranteed Access Rule: Every data item can be accessed using table name, primary key, and column name.
-
Null Values Rule: DBMS must support nulls to represent missing data.
-
Catalog Rule: The database catalog is stored as tables and accessible through the same query language.
10. Explain Second Normal Form (2NF) and Third Normal Form (3NF) with example.
Answer:
Second Normal Form (2NF):
A relation is in 2NF if it is in 1NF and all non-key attributes are fully dependent on the entire primary key, eliminating partial dependency.
Example:
In a table with (StudentID, CourseID, StudentName, CourseName) where the primary key is (StudentID, CourseID), StudentName depends only on StudentID (partial dependency). To convert to 2NF, split into:
-
Student(StudentID, StudentName)
-
Enrollment(StudentID, CourseID, CourseName)
Third Normal Form (3NF):
A relation is in 3NF if it is in 2NF and there is no transitive dependency; non-key attributes depend only on the primary key.
Example:
In (StudentID, StudentName, Department, DepartmentHead), DepartmentHead depends on Department (non-key attribute), causing transitive dependency. To convert, split into:
-
Student(StudentID, StudentName, Department)
-
Department(Department, DepartmentHead)