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)
- Part A — Multiple Choice Questions
- Part B — Short Answer Questions
- Q.1Define data and information.
- Q.2What is a database? Give four examples of databases.
- Q.3What is a DBMS? Give four examples of DBMS.
- Q.4What is a data type? Name some data types available in MySQL.
- Q.5What is a table in a database?
- Q.6What do you mean by primary key and foreign key?
- Q.7Why is a primary key used in a table?
- Q.8Define DDL and DML.
- Q.9Name some DDL and DML statements.
- Q.10Write the code to display all data from the table "Book".
- Part C — Long Answer Questions
- Q.1Define a database. Explain its importance and list any three real-life applications of a database.
- Q.2Describe the following data types with suitable examples: int, varchar, datetime, and currency.
- Q.3Differentiate between a database and a DBMS.
- Q.4Explain why primary keys and foreign keys are important.
- Q.5What is MySQL? Write its main features and uses.
- Q.6Explain how tables, queries, and reports are related in MySQL.
- 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
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.
Q.2What is a database? Give four examples of databases.
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.
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.
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?
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.
+--------------------------------------------------+
| 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.
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.
Q.8Define DDL and DML.
DDL and DML are the two primary sub-languages within SQL used to manage different layers of a database.
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).
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.
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:
- 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.
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 | +-----------------------------+-----------------------------+
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.
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.
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.
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.
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.
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. |
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.
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.
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.
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) | +-------------------+ +-------------------+
Q.5What is MySQL? Write its main features and uses.
+-------------------------------------------------------------+ | MYSQL RDBMS | +-------------------------------------------------------------+ | ✦ High Speed ✦ Open Source ✦ Scalable ✦ SQL | +-------------------------------------------------------------+
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.
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.
Q.6Explain how tables, queries, and reports are related in MySQL.
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.
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.
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.
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.
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.
The CREATE statement is used to build a brand new table structure from scratch, defining its name, columns, data types, and primary key constraints.
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.
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.
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
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.




- 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.