Sikshya Plus Get appGet the app free
Class 10 · Computer Science

Database Management System (Chapter 2) – Class 10 Computer Science Notes and Solutions

Complete solutions and answers for “Database Management System (Chapter 2)”, a chapter in Class 10 Computer Science (SEE exam preparation). This page covers Part A — Multiple Choice Questions, Part B — Short Answer Questions and Part C — Long Answer Questions.

  • Free, no login needed
  • 31 min read
  • Updated 1 July 2026

Chapter at a glance

This chapter covers the fundamentals of Database Management Systems, including database concepts, data types, tables, primary and foreign keys, and SQL commands. It provides a comprehensive overview of database management, from data storage to data retrieval and manipulation. The chapter also discusses the importance of databases in real-life applications, such as banking, e-commerce, and airlines.

  • Database Management System
  • Data Types
  • Tables
  • Primary and Foreign Keys
  • SQL Commands
  • Database Importance
  • Real-life Applications
  • Database Design

Exam focus: Students should focus on understanding database concepts, data types, and SQL commands, as well as the importance of databases in real-life applications, to perform well in exams.

Key formulas and definitions

  • CREATE TABLE table_name (column1 datatype, column2 datatype,...)
  • SELECT * FROM table_name
  • INSERT INTO table_name (column1, column2,...) VALUES (value1, value2,...)
  • UPDATE table_name SET column1 = value1 WHERE condition
  • DELETE FROM table_name WHERE condition
On this page (20 sections)
  1. Part A — Multiple Choice Questions
  2. Part B — Short Answer Questions
  3. Q.1Define data and information.
  4. Q.2What is a database? Give four examples of databases.
  5. Q.3What is a DBMS? Give four examples of DBMS.
  6. Q.4What is a data type? Name some data types available in MySQL.
  7. Q.5What is a table in a database?
  8. Q.6What do you mean by primary key and foreign key?
  9. Q.7Why is a primary key used in a table?
  10. Q.8Define DDL and DML.
  11. Q.9Name some DDL and DML statements.
  12. Q.10Write the code to display all data from the table "Book".
  13. Part C — Long Answer Questions
  14. Q.1Define a database. Explain its importance and list any three real-life applications of a database.
  15. Q.2Describe the following data types with suitable examples: int, varchar, datetime, and currency.
  16. Q.3Differentiate between a database and a DBMS.
  17. Q.4Explain why primary keys and foreign keys are important.
  18. Q.5What is MySQL? Write its main features and uses.
  19. Q.6Explain how tables, queries, and reports are related in MySQL.
  20. Q.7Give examples of the CREATE, ALTER, and DROP commands.

Solutions and answers

📝

Part A — Multiple Choice Questions

Choose the correct answer from the four options provided

1 Which of the following best defines a database?
a A collection of random files
b A collection of related data organized for easy access ✓
c A set of printed documents
d A list of computer programs
Explanation: A database is structured specifically to hold related data so it can be managed, updated, and accessed efficiently. Unlike random files, a database enforces relationships and constraints that ensure consistency.
2 Why is a database important in computing?
a It decorates the computer
b It helps store and manage data efficiently ✓
c It helps in virus protection
d It is used only for internet browsing
Explanation: Databases form the backbone of most applications by providing a reliable and organized way to handle large volumes of data.
3 Which of the following represents the correct order of data processing?
a Database → Data → Information
b Data → Information → Knowledge ✓
c Information → Data → Database
d Data → Database → Knowledge
Explanation: Raw Data is processed into meaningful Information, which is then understood and applied as Knowledge. This is the classic DIK (Data–Information–Knowledge) hierarchy.
4 What is the main function of a DBMS?
a To draw pictures
b To manage data in a database ✓
c To connect to the internet
d To play games
Explanation: DBMS stands for Database Management System; its core job is to create, retrieve, update, and manage data in a structured and secure manner.
5 Which of the following is NOT a data type?
a int
b varchar
c float
d browser ✓
Explanation: int (integer), varchar (variable character), and float (floating-point number) are common data types. A browser is software used to access the internet, not a data type.
6 Which data type is suitable for storing text values like a person's name?
a int
b varchar ✓
c date
d float
Explanation: varchar stands for variable character, which is used for text strings of varying lengths like names or addresses.
7 The data type 'datetime' is used to store:
a Whole numbers
b Decimal numbers
c Dates and times ✓
d Currency values
Explanation: As the name implies, datetime combines both date and time values into a single field (e.g., '2026-05-31 22:30:00').
8 Which data type should be used for storing money values?
a char
b currency or decimal ✓
c int
d date
Explanation: decimal or specialized currency types prevent rounding errors, making them ideal for precise financial transactions.
9 In a database table, a row represents:
a A data type
b A single record ✓
c A field name
d A column definition
Explanation: Each horizontal row in a table represents a complete unit of related data, known as a record (or tuple).
10 In a table, a column represents:
a A data record
b A field or attribute ✓
c A file name
d A report
Explanation: Columns represent specific traits or characteristics (fields/attributes) shared by all records in that table (e.g., "Age" or "Email").
11 What is a Primary Key?
a A field that stores text values
b A field that uniquely identifies each record ✓
c A field that connects two tables
d A duplicate field
Explanation: A primary key must contain unique values and cannot contain null values, ensuring every single row can be uniquely identified.
12 What is a Foreign Key?
a A key from another database
b A field that links two tables together ✓
c A duplicate primary key
d A password key
Explanation: A foreign key is a column (or group of columns) that points to a primary key in another table, establishing a relationship between them.
13 In MySQL, a table is used to:
a Store data in rows and columns ✓
b Display images
c Write programs
d Create files
Explanation: MySQL is a relational database management system where data is structured fundamentally into tabular rows and columns.
14 What is a query in MySQL?
a A question asked to a database to get specific information ✓
b A computer virus
c A programming language
d A database file
Explanation: A query is a request written in SQL that asks the database to retrieve, filter, or manipulate data based on specific criteria.
15 Which SQL command is used to create a new table?
a INSERT
b SELECT
c CREATE ✓
d UPDATE
Explanation: The CREATE statement is a DDL command used to build new database objects, including tables, from scratch.
16 Which SQL statement is used to modify the structure of an existing table?
a ALTER ✓
b DELETE
c INSERT
d SELECT
Explanation: The ALTER command changes the structural definition of a table — such as adding, removing, or modifying columns — without deleting existing data.
17 Which SQL command deletes a table completely from the database?
a REMOVE
b DROP ✓
c DELETE
d CLEAR
Explanation: The DROP command permanently removes the entire table structure and all data inside it from the database.
18 What is the purpose of the SELECT statement?
a To insert data
b To delete data
c To view data from a table ✓
d To create a table
Explanation: SELECT is the most commonly used DML command. It queries and retrieves data from one or more tables.
19 Which SQL command adds new records into a table?
a ADD
b INSERT ✓
c UPDATE
d SELECT
Explanation: The INSERT statement adds one or more new rows of data into an existing table.
20 Which SQL command changes existing data in a table?
a MODIFY
b ALTER
c UPDATE ✓
d REPLACE
Explanation: The UPDATE statement modifies existing data values within rows, typically using a WHERE clause to target specific records.
21 The DELETE command in SQL is used to:
a Remove the whole table
b Remove specific records from a table ✓
c Remove the database
d Remove a column only
Explanation: DELETE removes individual rows (records) from a table. To remove the entire table structure, you would use DROP instead.
22 Which of the following is correct SQL syntax to create a table named "Students"?
a CREATE Students TABLE (...);
b CREATE TABLE Students (...); ✓
c TABLE CREATE Students (...);
d NEW TABLE Students (...);
Explanation: The correct SQL syntax follows the pattern CREATE TABLE table_name (column definitions);
23 Which of the following queries displays all records from a table named "Books"?
a SELECT * FROM Books; ✓
b SHOW ALL Books;
c DISPLAY Books;
d GET * FROM Books;
Explanation: SELECT * FROM Books; uses the asterisk wildcard to select all columns and all rows from the Books table.
24 Which SQL command changes a column name or data type?
a UPDATE
b MODIFY
c ALTER TABLE ✓
d CHANGE
Explanation: ALTER TABLE is used to change the structural definition of an existing table, including renaming or changing data types of columns.
25 What does the asterisk (*) symbol mean in SQL SELECT statements?
a Select only one record
b Select all columns ✓
c Multiply all numbers
d Delete all rows
Explanation: In SQL, the asterisk * serves as an all-inclusive wildcard that tells the DBMS to return every column defined in the target table.
26 Which of the following is a valid SQL statement to insert data?
a INSERT INTO Students VALUES ('Sita', 15); ✓
b ADD INTO Students ('Sita', 15);
c INSERT DATA Students ('Sita', 15);
d NEW INTO Students VALUES ('Sita', 15);
Explanation: The correct syntax follows INSERT INTO table_name VALUES (value1, value2, ...);
27 Which query updates the age of a student named "Ravi" to 16?
a UPDATE Students SET Age=16 WHERE Name='Ravi'; ✓
b CHANGE Students Age=16;
c MODIFY Students SET Age=16;
d SET Age=16 IN Students WHERE Name='Ravi';
Explanation: The correct pattern is UPDATE table_name SET column=value WHERE condition;. The WHERE clause ensures only Ravi's record is updated.
28 Which SQL statement removes all records from a table named "Marks"?
a DELETE * FROM Marks;
b REMOVE FROM Marks;
c DELETE FROM Marks; ✓
d CLEAR Marks;
Explanation: DELETE FROM Marks; without a WHERE clause deletes every row in the table. Note: TRUNCATE TABLE Marks; achieves the same effect more efficiently.
29 Which command is part of DDL?
a SELECT
b INSERT
c UPDATE
d CREATE ✓
Explanation: CREATE is a Data Definition Language (DDL) command used to define database structures. SELECT, INSERT, and UPDATE are DML commands.
30 Which of the following correctly describes the difference between DDL and DML?
a DDL manages data, DML manages structure
b DDL changes structure, DML manipulates data ✓
c Both are the same
d DDL is used only in Oracle
Explanation: DDL (Data Definition Language) deals with the structure/schema of the database (e.g., CREATE, ALTER, DROP), while DML (Data Manipulation Language) deals with the actual data inside those structures (e.g., SELECT, INSERT, UPDATE, DELETE).
✏️

Part B — Short Answer Questions

Detailed explanations in 150–200 words — ideal for exam preparation

Q.1Define data and information.

Data and information are two distinct phases of processing within computing. Data refers to raw, unorganized, unanalyzed, and unstructured facts, figures, symbols, or observations. Because it lacks context, raw data does not carry any specific meaning on its own and cannot be used directly for strategic decision-making. Examples of data include isolated numbers like "45", individual words like "Sita", or random test scores.

Conversely, Information is data that has been systematically processed, organized, structured, and presented in a meaningful context. When raw data undergoes sorting, calculation, or contextual filtering, it transforms into information, which is highly useful for human understanding and decision-making. For instance, if the isolated data points "Sita" and "45" are combined to state, "Sita scored 45 marks in her Computer Science exam," it becomes structured information.

💡 Key Relationship
While data serves as the foundational input for any database application system, information serves as the final, functional output. In modern database management systems, raw data is continuously collected and parsed through software algorithms to yield actionable information that enterprises rely on for daily operations.
Raw Data
Unorganized facts
→
Processing
Sorting & context
→
Information
Meaningful output

Q.2What is a database? Give four examples of databases.

📖 Definition
A database is an organized, systematic, and structured collection of related data stored electronically in a computer system. The fundamental purpose of a database is to allow for the efficient storage, quick retrieval, smooth modification, and secure management of vast amounts of information.

Rather than keeping data in scattered, physical file folders or detached digital text files, a database consolidates data into structured formats like tables containing rows and columns. This structural arrangement minimizes data redundancy, prevents inconsistencies, and ensures that multiple users can access the information simultaneously without errors.

Databases power almost all modern applications, ranging from small local programs to global enterprise platforms. Four prominent examples of modern database systems are:

  • MySQL — A widely popular, open-source relational database management system used heavily in web development.
  • Oracle Database — A highly secure, robust, and scalable multi-model database system widely adopted by large corporations.
  • Microsoft SQL Server — A relational database engine developed by Microsoft, standard in enterprise Windows environments.
  • MongoDB — A popular NoSQL database that stores data in flexible, JSON-like documents rather than traditional tables.

Q.3What is a DBMS? Give four examples of DBMS.

📖 Definition
A Database Management System (DBMS) is specialized software that acts as an interface between the end-user, application programs, and the underlying physical database. The main purpose of a DBMS is to provide users with a systematic, safe, and convenient environment to create, define, retrieve, update, delete, and manage data.

Without a DBMS, users would have to write complex low-level code directly to the computer's storage media just to read or modify files. A DBMS handles optimization, controls concurrent user access, enforces data security protocols, and manages backup and recovery utilities.

By abstracting the physical storage details, a DBMS allows developers and administrators to work with intuitive logical concepts like tables, keys, and schemas. It ensures data integrity by enforcing rules such as primary keys and foreign keys.

Four common examples of DBMS software widely used in the computing industry are:

  • MySQL — An open-source relational DBMS used globally for web applications.
  • Oracle DBMS — An enterprise-grade, highly scalable relational management system.
  • Microsoft Access — A user-friendly, desktop-based DBMS designed for small-scale applications.
  • PostgreSQL — An advanced, open-source object-relational DBMS known for extensibility and standards compliance.

Q.4What is a data type? Name some data types available in MySQL.

📖 Definition
A data type is a fundamental attribute or classification assigned to a column in a database table. It explicitly informs the database management engine what category of data can be validly stored within that specific column.

Defining a data type is crucial because it ensures data integrity by preventing illegal data entry — such as trying to save letters inside a mathematical column — and optimizes physical storage space on disk. Furthermore, it dictates which operations (such as arithmetic additions or string concatenations) can be safely performed on those values.

MySQL offers a rich collection of data types divided into numeric, string, and date/time categories. Some of the most frequently used data types available in MySQL include:

  • INT — Used for storing standard whole numbers or integers without decimal places.
  • VARCHAR — Used for variable-length alphanumeric text strings, such as names or descriptions.
  • FLOAT / DECIMAL — Used for fractional or real decimal values, ideal for scientific data or financial records.
  • DATE / DATETIME — Used for tracking calendar entries, capturing dates, or combined timestamp values.

Q.5What is a table in a database?

📖 Definition
In a relational database, a table is the fundamental building block of data storage, organized in a highly structured layout consisting of horizontal rows and vertical columns. A table, also technically referred to as a "relation," is designed to store data about a single, specific topic or entity, such as "Students," "Employees," or "Books."

Each vertical column in a table represents a unique field or attribute. Every column is explicitly defined with a distinct name and a specific data type that restricts the type of entry it can accept. For example, a column named Age will only accept numeric inputs.

On the other hand, each horizontal row, also known as a record or tuple, represents a single, complete, and unique instance of data belonging to that entity. If a table stores data for five thousand students, it will contain exactly five thousand individual rows.

🔗 Relationship Note
Tables are deeply interconnected within relational systems using keys, allowing complex data relationships to form across the entire schema while keeping individual files highly organized and clean.
+--------------------------------------------------+
|              STUDENTS TABLE                       |
+------------+------------+---------+---------------+
| StudentID  | Name       | Age     | Email         |
| (PK, INT)  | (VARCHAR)  | (INT)   | (VARCHAR)     |
+------------+------------+---------+---------------+
| 1          | Sita       | 15      | sita@mail.com |  ← Row (Record)
| 2          | Ram        | 16      | ram@mail.com  |  ← Row (Record)
| 3          | Hari       | 14      | hari@mail.com |  ← Row (Record)
+------------+------------+---------+---------------+
        ↑ Column (Field)    ↑ Column  ↑ Column

Q.6What do you mean by primary key and foreign key?

A primary key and a foreign key are constraints used to maintain structure, uniqueness, and relational links between tables in a database.

🔑 Primary Key
A primary key is a designated column or a combination of columns that uniquely identifies every individual row or record within a table. By design, a primary key cannot contain duplicate values, and it can never contain null (empty) values. This ensures that every single record can always be precisely targeted and retrieved.
🔗 Foreign Key
A foreign key is a column or group of columns in one table that references the primary key of another table. The purpose of a foreign key is to establish a direct logical relationship and safeguard referential integrity between the two tables. While a primary key preserves internal uniqueness, a foreign key binds the tables together, preventing actions that would destroy links between records.

For example, a StudentID field acts as the primary key in a "Students" table, but when that same StudentID is placed into an "Enrollments" table, it functions as a foreign key linking the records together.

Q.7Why is a primary key used in a table?

A primary key is essential in a relational database table for several critical structural reasons:

  • Guarantees Unique Identification: A primary key column forces every single row inside a table to be distinct. It completely eliminates data duplication, which would otherwise lead to massive processing confusion (such as two bank accounts sharing an identical number but belonging to different people).
  • Prevents Null Values: Because a primary key cannot accept empty values, it ensures that every record entered into the system is a legitimate entity that can be explicitly targeted, updated, or safely deleted.
  • Boosts Retrieval Speed: Database engines automatically build clustered indexes over primary key columns. This index works like an index at the back of a book, allowing the DBMS to perform lightning-fast lookup operations, search queries, and sorting algorithms, rather than scanning the entire table line by line from disk.
⚠️ Remember
Without a primary key, it would be extremely difficult to update or delete one specific record out of thousands without accidentally altering another identical row. Always define a primary key when designing your tables!

Q.8Define DDL and DML.

DDL and DML are the two primary sub-languages within SQL used to manage different layers of a database.

🏗️ DDL — Data Definition Language
DDL consists of structural commands used to design, modify, and manage the actual blueprint or schema of the database. DDL commands deal exclusively with database containers — like tables, databases, views, and indexes — rather than the data stored inside them. When you run a DDL command, you are physically changing the architectural layout of your system.
📊 DML — Data Manipulation Language
DML consists of operations used to manage and manipulate the actual data records resting inside the structures created by DDL. DML allows users to interact with user data on a daily basis without modifying the overarching table design itself.

For example, changing a column's name requires DDL because it alters the structure, whereas altering a user's address requires DML because it updates the record. Together, these sub-languages allow complete database lifecycle management.

Q.9Name some DDL and DML statements.

SQL is broadly segregated into structural statements and data management statements, categorized under Data Definition Language (DDL) and Data Manipulation Language (DML).

🏗️ DDL Statements (Data Definition Language)

These statements are utilized by database administrators and developers to construct and modify the skeleton or layout of database objects. The most prominent DDL statements include:

  • CREATE — Used to build new databases, schemas, or tables from scratch.
  • ALTER — Used to modify the structural design of an existing table, such as adding or dropping a column.
  • DROP — Used to permanently delete entire tables or databases from the disk.
  • TRUNCATE — Used to completely remove all records from a table while keeping its structure intact.
📊 DML Statements (Data Manipulation Language)

These statements are used by developers and users to interact with individual entries stored inside the tables. The primary DML statements include:

  • INSERT — Used to add new rows or records into an existing table.
  • SELECT — Used to query, read, and retrieve data from tables.
  • UPDATE — Used to modify existing data values within rows.
  • DELETE — Used to remove specific rows based on specific conditions.

Q.10Write the code to display all data from the table "Book".

To retrieve and display all the records and all corresponding columns from a table named Book in an SQL-compliant database like MySQL, you must execute a standard query utilizing the SELECT statement paired with the asterisk (*) wildcard symbol.

The exact SQL code required is written as follows:

SQL
SELECT * FROM Book;
🔍 Code Explanation
  • SELECT — This is the fundamental Data Manipulation Language (DML) keyword that commands the database engine to fetch and retrieve data records out of the storage tables.
  • * — In SQL syntax, the asterisk serves as an all-inclusive wildcard indicator. It specifically instructs the DBMS engine to select every single column or field defined within the target table layout, preventing the user from having to list out every column name manually.
  • FROM Book — The FROM clause explicitly identifies the specific source table, which in this case is the table named Book.
  • ; — The semicolon serves as the standard statement terminator in SQL, signaling to the query processor that the command is complete and ready to execute.
📚

Part C — Long Answer Questions

Comprehensive explanations in 300–500 words for maximum understanding

Q.1Define a database. Explain its importance and list any three real-life applications of a database.

📖 Definition
A database is an organized, logical, and structured repository designed to electronically store, manage, update, and retrieve data using a computer system. Unlike a chaotic pool of files, a database relies on specialized schemas to structure data into entities, tables, rows, and columns, ensuring information is consistently stored and highly accessible.
⭐ Importance of a Database

The importance of databases in modern computing and business cannot be overstated. Before digital databases, organizations relied on physical paper filing systems or flat-world digital files, both of which suffered from severe limitations. Databases solve these critical bottlenecks through several distinct advantages:

  • Reduction of Data Redundancy: Traditional systems duplicate data across multiple files, wasting space. A database centralizes records, minimizing duplicates and saving substantial storage costs.
  • Enforcement of Data Integrity: Through specific rules called constraints (such as data types, primary keys, and check conditions), a database ensures that only clean, valid, and accurate information is entered into the system.
  • Concurrent User Control: In the modern digital world, thousands of users often need to access the exact same dataset simultaneously. Databases handle this effortlessly, using concurrency protocols to prevent file locking and overwriting errors.
  • Data Security and Backup: Databases feature robust security models that restrict access based on user roles, protecting private assets from unauthorized entry. Furthermore, automated backup and recovery mechanisms safeguard data against catastrophic hardware crashes.
+-----------------------------------------------------------+
|                      MODERN DATABASE                      |
+-----------------------------+-----------------------------+
|  ✦ Zero Redundancy          |  ✦ Enforced Data Integrity  |
|  ✦ Concurrent User Access   |  ✦ High-Level Security      |
|  ✦ Automated Backups        |  ✦ Fast Query Performance   |
+-----------------------------+-----------------------------+
🌍 Real-Life Applications

Databases function behind the scenes across nearly every digital sector:

  • Banking and Financial Services: Every account balance, fund transfer, deposit, and credit card swipe is processed via highly secured databases. These systems require total precision and transactional consistency to ensure money is never lost or incorrectly recorded during a transfer.
  • E-Commerce Platforms (e.g., Amazon): Online stores use databases to maintain catalogs of millions of items, track inventory stock levels, store customer shipping profiles, process order histories, and drive personalized recommendation algorithms.
  • Airlines and Railway Reservation Systems: Booking a flight ticket relies on global databases that manage flight schedules, aircraft seating capacities, passenger logs, and real-time seat availability. This prevents seats from being double-booked by two different passengers at the same instant.

Q.2Describe the following data types with suitable examples: int, varchar, datetime, and currency.

Data types define the nature of data that can occupy a table column, establishing strict limits on operations and memory storage. Below is a detailed analysis of four fundamental data types.

1️⃣ INT (Integer Data Type)

The INT data type is used to store whole numbers that do not contain any fractional or decimal components. It accommodates both negative and positive mathematical values. Relational engines allocate fixed bytes of memory (typically 4 bytes) for an integer column, making it highly optimized for arithmetic operations, indexing, and loops.

💡 Example
It is ideal for storing metrics like student ages, counts, or unique identification numbers.
SQL
Age INT; -- Valid entry: 16, 25, 40 (Invalid: 16.5)
2️⃣ VARCHAR (Variable Character Data Type)

VARCHAR stands for variable-length character string. It is the go-to data type for saving non-numeric textual information, such as letters, words, sentences, spaces, or alphanumeric codes. The key advantage of VARCHAR(M) is its memory efficiency: if you define a column as VARCHAR(100) but only type a name that is 10 letters long, the database only consumes space for those 10 characters plus a tiny metadata byte, rather than wasting all 100 slots.

💡 Example
Highly suitable for names of people, physical home addresses, or email descriptions.
SQL
StudentName VARCHAR(50); -- Valid entry: 'Sita Sharma'
3️⃣ DATETIME Data Type

The DATETIME data type is engineered to store a combined value representing both a specific calendar date and a clock time. It captures a precise snapshot of a moment in time. MySQL displays this data type using the standard YYYY-MM-DD HH:MM:SS format (Year-Month-Day Hour:Minute:Second). It is vital for logging events and auditing actions.

💡 Example
Perfect for recording when an order was placed online or tracking user login timestamps.
SQL
EnrollmentTime DATETIME; -- Valid entry: '2026-05-31 22:30:00'
4️⃣ CURRENCY / DECIMAL Data Type

While some databases feature an explicit CURRENCY data type, standard SQL databases like MySQL rely on the DECIMAL(P, S) type to handle money values safely. Unlike floating-point data types (FLOAT), which can introduce tiny rounding discrepancies due to binary conversions, DECIMAL preserves fixed-point precision. It lets developers lock in exactly how many digits can appear before and after the decimal point.

💡 Example
Mandatory for financial transactions, product prices, tax rates, and account balances.
SQL
ProductPrice DECIMAL(10, 2); -- Valid entry: 499.99 (Up to 10 total digits, 2 for decimals)

Q.3Differentiate between a database and a DBMS.

While the terms "database" and "DBMS" are frequently used interchangeably in informal tech conversations, they represent two entirely different concepts within data management architectures. Understanding their differences is key to mastering database architecture.

Feature / Criteria Database DBMS
Core Definition A passive repository or collection of structured data files sitting on a digital storage drive. The active software application layer used to create, manage, control, and query that database.
Nature It is the actual content or raw asset being stored (the data container itself). It is the program or tool suite used to interact with that content.
Primary Function To safely hold and organize records across logical tables, rows, and columns. To provide access control, enforce constraints, optimize queries, and handle backups.
User Interaction Users cannot interact with a raw database directly without a software mediator. Users use commands (like SQL) through the DBMS interface to manipulate the data.
Examples An enterprise's payroll ledger, student record tables, or inventory schemas. Oracle Database, MySQL, Microsoft SQL Server, PostgreSQL, or Microsoft Access.
🏗️ Detailed Architectural Relationship

To visualize this clearly, think of a database as a physical library building. The library contains a massive collection of books, records, and documents organized neatly onto specific bookshelves. The building and the books inside it represent the Database — it is a storage space holding raw assets.

Conversely, the DBMS represents the library's automated management staff, cataloging software, security guards, and index cards. If you want to read a specific book or add a new book to a shelf, you do not just run into the building and tear through the shelves randomly; you hand a formal request to the librarian. The librarian validates your identity, checks the catalog index, extracts the exact book efficiently, tracks when you return it, and ensures nobody damages the pages.

💡 Key Takeaway
When an application needs information, it passes an SQL statement to the DBMS software. The DBMS parses the syntax, checks user permissions, fetches the specific rows from the physical database file on the hard drive, and returns it cleanly to the user. Without a database, a DBMS has no purpose; without a DBMS, a database is just an unreadable block of raw binary files on a drive.

Q.4Explain why primary keys and foreign keys are important.

In relational database design, data must remain highly organized, structured, and free of contradictions across dozens of separate tables. Primary keys and foreign keys act as the core structural anchors that enforce stability, prevent data corruption, and unlock the true capabilities of relational data architectures.

🔑 Importance of Primary Keys

A primary key enforces entity integrity at the table level. Its absolute importance stems from three critical areas:

  • Guarantees Unique Identification: A primary key column forces every single row inside a table to be distinct. It completely eliminates data duplication, which would otherwise lead to massive processing confusion (such as two bank accounts sharing an identical number but belonging to different people).
  • Prevents Null Values: Because a primary key cannot accept empty values, it ensures that every record entered into the system is a legitimate entity that can be explicitly targeted, updated, or safely deleted.
  • Boosts Retrieval Speed: Database engines automatically build clustered indexes over primary key columns. This arrangement lets search algorithms locate a single record out of millions in milliseconds, bypassing the need to read through the entire hard disk sequentially.
🔗 Importance of Foreign Keys

While primary keys secure individual tables, foreign keys enforce referential integrity across the entire database network. They link separate tables together, and their importance is highlighted by the following features:

  • Establishes Logical Relationships: Foreign keys formally map how real-world objects interact. For instance, linking a CustomerID foreign key in an "Orders" table back to the primary key of a "Customers" table explicitly defines exactly which customer bought which product.
  • Prevents Orphaned Records: A foreign key strictly prohibits users from adding child records that do not have a matching parent record. For example, it prevents an employee from being assigned to a DepartmentID that does not even exist in the company's master departments table.
  • Enforces Cascading Actions: Foreign keys can be configured with rules like ON DELETE CASCADE. If a customer profile is deleted from the system, the foreign key mechanism can automatically clear out all associated orders, keeping the database clean and clear of broken data.
+-------------------+          +-------------------+
|   CUSTOMERS TABLE |          |    ORDERS TABLE   |
+-------------------+          +-------------------+
| CustomerID (PK)  | <========+| CustomerID (FK)  |
| Name              |          | OrderID (PK)     |
+-------------------+          +-------------------+
✅ Summary
Together, these keys transform detached data lists into an integrated, relational network, ensuring that updates to one part of the system never corrupt or break the rest of the application.

Q.5What is MySQL? Write its main features and uses.

📖 What is MySQL?
MySQL is one of the world's most popular, open-source Relational Database Management Systems (RDBMS). It relies on Structured Query Language (SQL) to interact with databases, organizing information into structured tables consisting of rows and columns. Originally developed by MySQL AB, it is currently owned and maintained by Oracle Corporation. It forms the data layer of the famous open-source "LAMP" software stack (Linux, Apache, MySQL, PHP/Python).
+-------------------------------------------------------------+
|                       MYSQL RDBMS                           |
+-------------------------------------------------------------+
|  ✦ High Speed    ✦ Open Source    ✦ Scalable   ✦ SQL        |
+-------------------------------------------------------------+
⭐ Main Features of MySQL

MySQL is highly regarded in the software engineering industry due to a robust feature set:

  • Relational Database Architecture: It keeps data contained in clean, separate tables rather than dumping all facts into a single messy file. This structure allows developers to declare strict primary keys, foreign keys, and indexes.
  • Open-Source Accessibility: MySQL is free to download, use, and modify under the GNU General Public License, allowing startups and independent developers to build production applications without paying expensive software licensing fees.
  • Exceptional Performance and Speed: It is highly optimized for fast read operations and rapid query responses, making it highly efficient for content delivery on the internet.
  • Cross-Platform Support: MySQL runs smoothly across almost all dominant operating systems, including Microsoft Windows, Linux, macOS, and various Unix platforms.
  • Strong Security and Access Controls: It includes an advanced privilege system that allows database administrators to lock down specific tables, ensuring only authorized host machines and users can access sensitive records.
🚀 Primary Uses of MySQL

MySQL is highly versatile and serves as the primary engine for several digital implementations:

  • Web Development and Content Management Systems (CMS): It serves as the default database for world-famous web applications and platforms like WordPress, Joomla, and Drupal. Every blog post, user comment, and password hash on these sites is stored inside a MySQL system.
  • E-Commerce Solutions: Massive online shopping platforms utilize MySQL to process real-time shopping cart transactions, update inventory counts, and track customer shipments safely.
  • Enterprise Applications and Large Tech Platforms: Tech giants like Facebook, Uber, Netflix, and YouTube use highly customized versions of MySQL to handle parts of their massive storage frameworks, proving its ability to scale gracefully under heavy user workloads.

In a MySQL relational database environment, tables, queries, and reports do not exist as isolated components. Instead, they form a highly integrated, step-by-step data processing pipeline. Each component relies directly on the output of the previous step to transform raw digital inputs into structured, human-readable business intelligence.

TABLES
Raw Storage
→
QUERIES
Filtered Data
→
REPORTS
Visual Output
1️⃣ Tables: The Storage Foundation

The lifecycle begins fundamentally with Tables. Tables serve as the raw data repository where all records are stored in a rigid structure of rows and columns. However, tables are passive containers. They simply hold raw data facts (such as thousands of customer purchase dates, prices, and names) without any formatting, summaries, or selective organization. A raw table is often too massive and cluttered for a human manager to read through effectively.

2️⃣ Queries: The Extraction Engine

To make sense of the vast datasets trapped inside tables, we use Queries. Written in SQL (such as SELECT statements with specific WHERE or GROUP BY filters), a query acts as an active search engine. It commands the MySQL DBMS to dig into the raw tables, sort the rows, filter out unnecessary information, and isolate the exact records needed. For instance, a query can ask: "Show me only the total sales figures from the month of May, sorted from highest to lowest value." The query processes the raw data from the tables and outputs a temporary, refined dataset.

3️⃣ Reports: The Final Presentation

Finally, the refined data produced by the query is handed off to form a Report. While a query's output is clean, it is still presented in a plain, unformatted tabular grid that looks like code. A report takes that exact query data and styles it for business presentation. It adds visual elements such as corporate company headers, page numbers, clean column layouts, color-coded summaries, and visual charts or graphs. Reports are designed to be printed out or emailed directly to managers and stakeholders to help them make strategic decisions.

📌 Summary of the Relationship
In short, Tables store the raw data, Queries extract and sort the specific data you need from those tables, and Reports format and style that extracted data into a beautiful, professional presentation for human review. One cannot exist without the others.

Q.7Give examples of the CREATE, ALTER, and DROP commands.

The CREATE, ALTER, and DROP statements form the core of Data Definition Language (DDL) in SQL. These commands are used to establish, modify, and delete the actual architecture and structural definitions of database objects like tables. Below are detailed, production-ready examples illustrating how each command functions in MySQL.

1️⃣ The CREATE TABLE Command

The CREATE statement is used to build a brand new table structure from scratch, defining its name, columns, data types, and primary key constraints.

📋 Scenario
Creating a table named Students to store student IDs, names, and ages.
SQL — CREATE TABLE
CREATE TABLE Students ( StudentID INT NOT NULL, FullName VARCHAR(50), Age INT, PRIMARY KEY (StudentID) );
💡 Explanation
This command tells the database to generate a new container named Students. It specifies that StudentID must be an integer and will serve as the unique identifier (Primary Key) for every record, while FullName handles text up to 50 characters, and Age holds simple whole numbers.
2️⃣ The ALTER TABLE Command

The ALTER statement is executed when a table already exists in the database, but you need to modify its structure — such as adding a missing column, dropping a column, or modifying a data type — without deleting the data already inside it.

📋 Scenario
Adding a new column named Email to the existing Students table.
SQL — ALTER TABLE
ALTER TABLE Students ADD Email VARCHAR(100);
💡 Explanation
This command instructs the MySQL engine to locate the existing Students layout and append a brand new column named Email that accepts character strings up to 100 slots long. All pre-existing student records remain perfectly safe, with their new email slots initially set to empty (NULL) until updated.
3️⃣ The DROP TABLE Command

The DROP statement is a highly powerful and permanent command used to completely remove an entire table structure, along with every single row of data inside it, from the database storage.

📋 Scenario
Deleting an outdated table named OldMarks that is no longer needed.
SQL — DROP TABLE
DROP TABLE OldMarks;
⚠️ Caution
The DROP command is irreversible. Once executed, the table and all its data are permanently deleted. Always ensure you have a backup before running this command!
↑

Frequently asked questions

What is Database Management System (Chapter 2) about?

This chapter covers the fundamentals of Database Management Systems, including database concepts, data types, tables, primary and foreign keys, and SQL commands. It provides a comprehensive overview of database management, from data storage to data retrieval and manipulation. The chapter also discusses the importance of databases in real-life applications, such as banking, e-commerce, and airlines.

Which topics are covered in Database Management System (Chapter 2)?

Class 10 Computer Science “Database Management System (Chapter 2)” covers: Database Management System; Data Types; Tables; Primary and Foreign Keys; SQL Commands; Database Importance; Real-life Applications; Database Design.

What should I focus on in Database Management System (Chapter 2) for the exam?

Students should focus on understanding database concepts, data types, and SQL commands, as well as the importance of databases in real-life applications, to perform well in exams.

What are the key formulas or definitions in Database Management System (Chapter 2)?

CREATE TABLE table_name (column1 datatype, column2 datatype,...); SELECT * FROM table_name; INSERT INTO table_name (column1, column2,...) VALUES (value1, value2,...); UPDATE table_name SET column1 = value1 WHERE condition; DELETE FROM table_name WHERE condition.

Where can I read the Class 10 Computer Science “Database Management System (Chapter 2)” solutions?

Right on this page. They are free and you do not need to sign up. For chapter quizzes and the AI tutor, install the Sikshya Plus app.

Study tips

Free for Class 9 to 12

Do not just read it. Practice it.

You have read the solutions for Database Management System (Chapter 2). Now test yourself, ask the AI tutor and keep your streak going.

Sikshya Plus chapter quiz screen with class, subject and difficulty options
Sikshya AI personal tutor chat inside the app
Sikshya Plus AI tools screen: question assistant, summarizer, translator, grammar checker
Chapter list with Past Q, materials, posts and books tabs
  • AI quizzes for this chapterTest yourself with instant feedback and explanations after every answer.
  • AI tutor, free, 24/7Stuck on a question? Ask in your own words and get a step-by-step explanation.
  • 14 AI tools in one appSummarizer, grammar checker, flashcards, essay help, math solver and more.
  • Past questions and notesPast papers and your own notes organized chapter by chapter.
Download free on Google Play Scan with your phone to install