Unit 2: Database Management System (DBMS) – Class 10 SEE Computer Science Notes
Importantedunotes.com
Back to Computer Notes

Welcome to the ultimate guide on Database Management System (DBMS). This is Unit 2 for Class 10 Computer Science students preparing for their SEE board exams.

In this guide, you will explore the depths of database architectures, differentiate between raw data and structured information, write efficient SQL statements, master keys, and obtain a fully resolved set of CDC textbook exercises.

1. Comprehensive Theory of Database Management System (DBMS)

2.1 Introduction to Databases

In today’s digital world, databases play an essential role in almost every computer system. Whether we are booking a flight ticket, logging into a social media account, watching videos on a streaming app, or sending instant messages, databases are quietly working in the background to manage the flow of data.

A database is a systematic, organized collection of data stored and managed electronically so that it can be accessed, retrieved, updated, and protected easily and efficiently.

In our daily lives, we encounter countless situations where we need to store and retrieve information:

Schools: keep structured records of students’ names, attendance, exam marks, and addresses.
Mobile phones: save contact lists, SMS histories, call logs, and personal settings.
Hospitals: catalog patient charts, doctor schedules, and medical histories.

A database works like a “digital cupboard”—it keeps everything in perfect order, secure, and safe from getting lost, corrupted, or mixed up.

Let’s Think!

Why might a school want to store student records in a computerized database rather than a traditional paper file or a basic, flat Excel sheet?

Paper Files: Susceptible to physical damage (fire, water, aging), highly insecure, extremely slow to search manually, and duplicates space.
Excel Sheets: Lacks multi-user concurrency, does not enforce relational data integrity (allowing text in numeric columns), handles large datasets poorly, and suffers from redundant data duplication.

How Databases Are Used Around Us

Area How Databases Are Used
Social Media Stores user profiles, posts, media uploads, likes, shares, comments, and follower lists.
Online Shopping Keeps real-time product catalogs, pricing structures, stock levels, orders, and customer reviews.
Banking Safely manages accounts, secure transactions, account balances, and security logs.
Healthcare Stores patient records, lab test results, prescriptions, and medical histories.
Cloud Databases Companies like Google and Amazon run online database services that can be accessed from anywhere.

Note on Cloud Databases: Cloud databases have surged in popularity because they operate over the Internet. They eliminate the need for physical, on-site server hardware, automatically scale with business growth, and offer high availability.

2.2 Data, Database, and Database Management System (DBMS)

A. Data vs. Information

To understand database design, we must first distinguish between raw inputs and processed outputs:

Data: A collection of raw, unorganized, and unprocessed facts, figures, values, images, symbols, or text. On its own, data lacks meaning, context, or utility.
Information: The clear, organized, and processed result obtained after structuring or analyzing data. It provides meaning, helps us understand things better, and assists in decision-making.

$$\text{Data} \xrightarrow{\text{Processing / Structuring}} \text{Information}$$

Concept Example: If the raw numbers “80, 85, 90” are marks, they are data (we do not know who scored them, in what subject, or when). Once processed, the statement: “The student scored an average of 85 marks in the final term” is information.

Technical Comparison: Data vs. Information

Aspect Data Information
Definition Raw, unprocessed, and unorganized facts or figures. Processed, structured, and organized data with a clear meaning.
Form Isolated numbers, text, symbols, images, etc. Analyzed, formatted data presented in context.
Meaning No clear meaning or baseline value on its own. Meaningful, actionable, and useful for understanding.
Example “2082, 95, Binay” “Binay scored 95 marks in 2082 BS, and is one of the top performers.”

B. Evolution of Storage: Traditional File System vs. Modern DBMS

Before computerization, data was maintained using manual or flat file configurations.

Traditional File System: Refers to a system where data is stored and managed manually, often using physical storage methods like paper files, ledgers, or physical cabinets. In computers, it refers to separate, disjointed spreadsheets or text files.
Modern DBMS: Uses digital database technology to centralize data storage, allowing multi-user access while maintaining structural relationships, consistency, and automated backup routines.

Structural Comparison Table

Feature Traditional File System Database Management System (DBMS)
Data Storage Dispersed across independent paper ledgers or isolated flat files. Centralized within a unified, highly structured digital database system.
Data Redundancy High; same data is frequently repeated in different files. Minimized and tightly controlled through database normalization.
Data Consistency Low; updating data in one place does not update it in others, causing conflicts. High; centralized updates ensure consistent data across the entire system.
Security Minimal; files can be easily mislaid, stolen, or damaged. Robust; features user access levels, encryption, and password locks.
Data Searching Slow, manual, and tedious process. Lightning-fast retrieval using optimized query languages.

C. Database Management System (DBMS)

A DBMS is specialized application software designed to store, manage, and organize data efficiently and securely. It acts as an intermediary link between database users and the raw database files.

Popular Examples of DBMS Software:

MySQL: An open-source relational database engine, widely used in web applications.
Oracle Database: A highly secure, powerful, commercial RDBMS designed for large enterprise environments and banking sectors.
Microsoft SQL Server: A popular commercial DBMS developed by Microsoft, commonly used in business systems.
PostgreSQL: An advanced, open-source object-relational database system known for its reliability.
MongoDB: A non-relational “NoSQL” database designed to manage vast volumes of unstructured data.
SQLite: A lightweight, self-contained database engine used extensively in mobile devices.

Recent Trends and Technologies in DBMS:

Cloud Databases: Hosted on cloud platforms (AWS, Google Cloud). They offer elastic scaling and flexibility without requiring physical servers.
NoSQL Databases: Non-relational databases (like MongoDB and Cassandra) designed to handle unstructured or semi-structured data.
In-Memory Databases: Systems (like Redis or SAP HANA) that store data in the primary RAM rather than on disks, enabling ultra-fast retrieval.
Distributed Databases: Databases distributed across multiple physical locations to improve speed, performance, and fault tolerance.

Features of a DBMS:

Data Storage: Arranges data into structural tables (rows and columns) where each piece of information has a specific slot.
Data Retrieval: Allows users to find and fetch precise entries instantly using SQL.
Data Manipulation: Supports operations like inserting, updating, and deleting records.
Data Integrity: Enforces rules (e.g., preventing text in a birthdate or phone number field).
Redundancy Control: Eliminates duplicate records by centralizing storage.
Security: Controls permissions, ensuring sensitive data is only viewed or edited by authorized accounts.
Data Backup & Recovery: Automatically backs up data to ensure recovery in case of system crashes.

Summary of DBMS Benefits & Challenges:

Benefits: Easy and efficient storage, reduction in data duplication, consistency across all departments, multi-user concurrent access, and automatic backups.

Challenges: Requires technical knowledge to manage, high software licensing and hardware costs, security risks if misconfigured, and performance can slow down without proper indexing.

D. Relational Database Management System (RDBMS)

A Relational Database Management System (RDBMS) is a specific type of DBMS that organizes data into tables composed of rows and columns. What makes it “relational” is its ability to connect different tables together using common, shared data fields, eliminating the need to repeat information.

2.3 SQL Data Types

Data types define the specific kind of data that can be stored in each column of a database table, preventing entry errors and optimizing storage.

1. Numeric Data Types

INT: Stores standard whole numbers without decimal points (e.g., Roll Numbers, IDs).
DECIMAL(p, s): Stores exact decimal numbers. The parameter $p$ is the total digits allowed (precision), and $s$ is the digits allowed after the decimal point (scale). Ideal for financial transactions (e.g., DECIMAL(10, 2)).
FLOAT: Stores approximate decimal values. It uses less memory but is less precise than DECIMAL.
SMALLINT & BIGINT: SMALLINT stores a smaller range of integers to conserve space, while BIGINT handles massive numbers (e.g., global transaction IDs).

2. Character (Text) Data Types

CHAR(n): Stores fixed-length text strings. It always reserves exactly $n$ characters. If the input is shorter, the system pads it with spaces.
VARCHAR(n): Stores variable-length text strings up to $n$ characters. It is highly memory-efficient because it shrinks to use only the exact space required.
TEXT: Used for storing large paragraphs or blocks of text.

3. Date and Time Data Types

DATE: Stores calendar dates in a standard YYYY-MM-DD format.
TIME: Stores durations or clock hours in an HH:MM:SS format.
DATETIME: Combines both date and time (YYYY-MM-DD HH:MM:SS).
TIMESTAMP: Records temporal milestones and automatically adjusts to timezone changes upon modifications.

4. Boolean Data Type

BOOLEAN: Stores either TRUE (represented numerically as 1) or FALSE (represented as 0).

2.4 Tables, Fields, and Records

In an RDBMS, a Table is the primary building block. It is a structured grid used to store related data in a clean format.

A. Fields (Columns / Attributes)

A Field is a vertical column in a database table that represents a specific property or attribute of the entity. Each field stores one specific type of data for all records in the table.

Example: In a Students table, Student_ID, Name, Class, and Date of Birth are fields:

Student_ID Name Class Date of Birth
101 Aarosh Pokharel 10 2010-03-12
102 Subigya Nepal 10 2011-07-25
103 Aarambha Gharti 9 2013-11-10

B. Records (Rows / Tuples)

A Record is a single horizontal row that contains a complete, cohesive set of data for one specific entity in the table.

Example: A single record in the student database:

S_ID Name Class Date of Birth
101 Diwakar Bhandari 10 2010

2.5 Relational Keys and Relationships

In a relational database, Keys are rules applied to columns. They uniquely identify rows and establish logical links across multiple tables.

1. Types of Keys

A. Primary Key (PK): A field (or combination) that uniquely identifies each record. It cannot contain duplicate values, cannot be NULL, and each table is strictly limited to exactly one primary key.

StudentID (PK) Name Class Age
101 Dipak 10 15
102 Rita 10 14
103 Gaurav 9 14

B. Foreign Key (FK): A field in one table that references the Primary Key column of a different table. It acts as a link to enforce consistency.

Example: Table Students (StudentID is PK) and Table Library (StudentID is FK):

BookID BookTitle StudentID (Foreign Key)
B_01 Nepali History 201
B_02 Harkabad 201
B_03 Learn Python 202

C. Composite Key: A primary key created by combining two or more columns to uniquely identify a record. This is used when no single column can guarantee uniqueness on its own.

StudentID Subject Marks
301 Nepali 85
301 Social 92
302 Computer 95

Analysis: Neither StudentID nor Subject is unique on its own. Combining them forms a Composite Key.

2. Types of Database Relationships

A. One-to-One ($1:1$): Each record in the first table is connected to exactly one record in the second table (e.g., A Person and their unique Passport).

B. One-to-Many ($1:M$): A single record in the first table is linked to multiple records in the second table (e.g., A Customer can place many Orders, but each Order belongs to only one customer).

C. Many-to-Many ($M:M$): Multiple records in the first table relate to multiple records in the second table. This requires a third “junction table” (e.g., Students and Courses).

2.6 Introduction to MySQL & Structured Query Language (SQL)

MySQL is a highly popular, open-source Relational Database Management System (RDBMS) that uses SQL (Structured Query Language) to manage and manipulate data.

SQL is divided into three distinct sub-languages:

DDL (Data Definition Language): Defines, alters, and manages the structure of database objects (e.g., tables, databases). Auto-committing and irreversible once executed.
DML (Data Manipulation Language): Manages the actual records stored in those structures (e.g., inserting, selecting, updating, and deleting rows). Non-auto committing (can be rolled back).
DCL (Data Control Language): Manages security and user permissions (e.g., GRANT, REVOKE).

MySQL Constraints

Constraint Functional Technical Description
PRIMARY KEY Combines unique and NOT NULL validation. Ensures no duplicates or empty slots in the column.
FOREIGN KEY Links one table to another, ensuring referential integrity.
NOT NULL Prevents a column from accepting blank inputs.
UNIQUE Guarantees all values in that column are completely different.
CHECK Evaluates conditions before allowing data insertion (e.g., age > 18).
DEFAULT Fills a column with a predefined value if no input is provided.

Exercise 1: Choose the correct answer from the given options

Select an option to view the correct answer and justification.

a. Which of the following is NOT a function of a DBMS?
i. Data storage
ii. Data retrieval
iii. Word processing
iv. Data manipulation
Correct Answer: iii. Word processing.
Justification: A DBMS specializes in storing, retrieving, and manipulating data. Word processing is handled by document editors like Microsoft Word.
b. Which type of key uniquely identifies each record in a table?
i. Foreign Key
ii. Composite Key
iii. Primary Key
iv. Candidate Key
Correct Answer: iii. Primary Key.
Justification: A primary key guarantees that every single row in a table is unique, with no duplicate or NULL values allowed.
c. What is the primary purpose of a foreign key?
i. To store only text data.
ii. To uniquely identify each record in its own table.
iii. To establish and enforce relationships between tables.
iv. To combine multiple fields into one.
Correct Answer: iii. To establish and enforce relationships between tables.
Justification: A foreign key links to a primary key in another table, creating logical relational connections and maintaining referential integrity.
d. In a one-to-many relationship between teachers and classes, which statement is true?
i. Each teacher teaches only one class, and each class has only one teacher.
ii. Each teacher can teach multiple classes, and each class has only one teacher.
iii. Each teacher teaches only one class, and each class can have multiple teachers.
iv. Each teacher can teach multiple classes, and each class can have multiple teachers.
Correct Answer: ii. Each teacher can teach multiple classes, and each class has only one teacher.
Justification: In a 1:M relationship, a parent record (Teacher) can relate to multiple children (Classes), but each child relates back to only one parent.
e. Which SQL command is used to add new rows to a table?
i. SELECT
ii. UPDATE
iii. INSERT
iv. DELETE
Correct Answer: iii. INSERT.
Justification: The INSERT INTO statement is a Data Manipulation Language (DML) command used to add new records into a table.
f. Which SQL command is used to modify existing data in a table?
i. SELECT
ii. UPDATE
iii. INSERT
iv. DELETE
Correct Answer: ii. UPDATE.
Justification: The UPDATE command modifies and updates cell values in existing rows in a database table.
g. Which SQL clause is used to specify conditions for data retrieval?
i. SELECT
ii. FROM
iii. WHERE
iv. ORDER BY
Correct Answer: iii. WHERE.
Justification: The WHERE clause evaluates conditional constraints, filtering the exact records retrieved by a query.
h. What does the SQL LIKE clause help you do?
i. Perform extract matches.
ii. Search for patterns in data.
iii. Sort the data.
iv. Define data types.
Correct Answer: ii. Search for patterns in data.
Justification: The LIKE clause leverages SQL wildcard symbols (% and _) to facilitate partial pattern-matching.
i. Which SQL data type is used for storing only date values (e.g., YYYY-MM-DD)?
i. TIME
ii. DATETIME
iii. TIMESTAMP
iv. DATE
Correct Answer: iv. DATE.
Justification: The DATE type is exclusively structured to store calendar dates in a YYYY-MM-DD template without time zones or clock hours.
j. Which SQL data type is suitable for storing names and addresses, allowing for variable length?
i. CHAR
ii. TEXT
iii. INT
iv. VARCHAR
Correct Answer: iv. VARCHAR.
Justification: VARCHAR(n) dynamically allocates only the required storage space up to a maximum of $n$ characters, making it highly memory-efficient.
k. What is the primary difference between CHAR(n) and VARCHAR(n) data types?
i. CHAR stores only numeric data, while VARCHAR stores text.
ii. CHAR has a fixed length, while VARCHAR has a variable length up to n characters.
iii. VARCHAR is used for dates, while CHAR is for text.
iv. There is no significant difference between them.
Correct Answer: ii. CHAR has a fixed length, while VARCHAR has a variable length up to n characters.
Justification: CHAR(n) always allocates exactly $n$ characters by padding short strings with empty spaces, whereas VARCHAR(n) dynamically adjusts to the input length.

Exercise 2: Write short answers to these questions

a) Define data and information. 2 Marks
Data refers to raw, unorganized, and unprocessed facts, figures, and symbols that lack explicit meaning on their own (e.g., the number 85).
Information is data that has been structured, organized, and processed to convey clear context and meaning (e.g., “Aarosh scored 85 marks”).

b) What is primary key? 2 Marks
A Primary Key is a field or combination of fields that uniquely identifies each individual record in a database table. It must contain unique values and is strictly prohibited from containing empty (NULL) values.

c) What is the foreign key? 2 Marks
A Foreign Key is a column in a database table that references the primary key column of another table. It serves as a relational link to connect the tables and enforce referential consistency.

d) Define fields and rows. 2 Marks
Field (Column): A vertical segment representing a specific attribute or property of an entity (e.g., Name).
Row (Record): A horizontal entity representing a complete, cohesive set of related field values for one specific item instance.

e) Differentiate database and DBMS. 2 Marks
A Database is the actual organized collection of structured data files stored electronically on disk.
A DBMS (Database Management System) is the specialized application software (e.g., MySQL, Oracle) used to create, query, administer, and secure that database.

f) Describe RDBMS. 2 Marks
A Relational Database Management System (RDBMS) is a type of DBMS that organizes data into grids called tables. These tables are mathematically linked (related) using shared keys (Primary and Foreign Keys), which prevents redundant data storage.

g) Why is a DBMS considered more advantageous for managing large amounts of data compared to a simple spreadsheet? 2 Marks
A DBMS supports multiple users accessing data at the same time, enforces strict data integrity rules, controls data redundancy through normalization, provides robust access controls, and retrieves data instantly using structured queries—capabilities that spreadsheets handle poorly.

h) Describe the purpose of primary and foreign keys in a relational database. 2 Marks
The Primary Key ensures that every record remains distinct and uniquely identifiable. The Foreign Key establishes safe relationships between tables, ensuring that records do not become orphaned and referential integrity is preserved.

i) Explain the concept of a one-to-many relationship and provide a real-world example (different from the one in the text). 2 Marks
In a One-to-Many ($1:M$) Relationship, a single parent record in Table A is associated with multiple child records in Table B, but each child record in Table B relates back to only one parent in Table A.
Real-World Example: A Customer and their Orders. One customer can place many orders over time, but each order is placed by only one customer.

j) Briefly describe the roles of DDL and DML in SQL. 2 Marks
DDL (Data Definition Language): Manages the structural framework and layout of the database objects (e.g., CREATE, ALTER, DROP).
DML (Data Manipulation Language): Processes and manipulates the actual records within those structures (e.g., INSERT, SELECT, UPDATE, DELETE).

k) Explain the function of the WHERE clause in a SELECT statement. 2 Marks
The WHERE clause acts as a filter. It applies logical and conditional parameters to query statements, ensuring the database only retrieves rows that match the specific criteria.

l) What are SQL constraints? Why are they important for maintaining data integrity? 2 Marks
SQL constraints are validation rules applied to columns (e.g., UNIQUE, NOT NULL). They are vital because they block invalid, inaccurate, or duplicate data from being saved, keeping the database reliable and clean.

m) What is a composite key, and when might it be necessary to use one? 2 Marks
A Composite Key is a primary key that combines two or more columns to uniquely identify a record. It is necessary when no single column alone contains completely unique values across all rows (e.g., combining StudentID and Subject to record unique terminal exam scores).

Exercise 3: Write long answers to these questions

a) Define DBMS with its advantages. 4 Marks
A Database Management System (DBMS) is specialized software designed to store, manage, manipulate, and secure data files. It acts as an intermediary link between the user (or applications) and the physical database files.

Advantages of DBMS:
1. Redundancy Control: Tightly minimizes duplicate data entries through centralized storage, saving storage space.
2. Data Consistency: Centralized updates ensure that changes to data in one place update across the whole system, avoiding conflicting records.
3. Enhanced Security: Protects sensitive data from unauthorized access using secure user accounts, access levels, and encryption.
4. Concurrent Access: Allows multiple users to safely read, write, and edit data simultaneously without causing software conflicts.
5. Automated Backup & Recovery: Provides robust system operations to back up datasets and restore them if hardware fails.

b) What is the importance of primary key in db? List out its features. 4 Marks
The Primary Key is the most critical constraint in relational databases. It serves to maintain entity integrity by guaranteeing that every row can be uniquely identified. Without a primary key, it is impossible to link tables together reliably using foreign keys, as there would be no guaranteed target.

Features of a Primary Key:
– It uniquely identifies each record in the database table.
– It strictly cannot contain duplicate values in its column.
– It cannot accept empty or NULL values.
– A database table is allowed to have only one primary key.

c) Differentiate between DDL and DML. 4 Marks
DDL and DML are sub-languages of SQL that serve completely different purposes:
Feature Data Definition Language (DDL) Data Manipulation Language (DML)
Primary Role Manages the physical structure and schema layout of database objects. Processes and manages the actual data records stored within those structures.
Permanence Auto-Committing: Changes are saved permanently immediately upon execution. Transactional: Operations can be undone (rolled back) before a commit.
Target Elements Tables, databases, views, and indexes. Rows, records, and specific field values.
SQL Commands CREATE, ALTER, DROP, TRUNCATE, RENAME INSERT, SELECT, UPDATE, DELETE

d) Show difference between Table and Query. 4 Marks
Tables and Queries are distinct operational elements in relational database management:
Feature Table Query
Definition A structured grid of rows and columns used to physically store data. A structured question or command written in SQL used to interact with the database.
Function Acts as the foundational storage container holding the actual database records. Acts as an operational tool to retrieve, filter, manipulate, or delete those stored records.
Nature Static and structural (remains on disk until physically altered or dropped). Dynamic and temporary (runs on demand to output a temporary result-set).

e) What is the relationship in DBMS? Explain its types. 4 Marks
A Relationship is a logical, structured connection built between two or more tables using matching keys. It connects separate tables to prevent data duplication.

Types of Relationships:
1. One-to-One ($1:1$): Each record in Table A is connected to exactly one record in Table B, and vice versa (e.g., A Person and their unique Passport record).
2. One-to-Many ($1:M$): A single record in Table A links to multiple records in Table B, but each record in Table B links back to only one record in Table A (e.g., A Teacher and the multiple Classes they teach).
3. Many-to-Many ($M:M$): Multiple records in Table A can relate to multiple records in Table B (e.g., Students and Courses). Because RDBMS cannot execute this directly, a third junction table is required to link them.

f) What is a Query? List out its importance in DBMS. 4 Marks
A Query is a structured command written in SQL sent to a database to retrieve, insert, modify, or delete information.

Importance of Queries:
– Allows users to extract highly specific data instantly from massive datasets without manual searching.
– Powers rapid updates, corrections, or deletion of business records.
– Enforces automation, enabling applications to interact dynamically with the database.
– Safely processes complex mathematical calculations, data sorting, and filtering on the fly.

g) What is a report in the context of MySQL and what is its purpose? 4 Marks
In MySQL, a Report is the organized, structured presentation of raw data retrieved from one or more tables using SQL queries.

Purpose: The primary purpose of a report is to convert raw, complex, and fragmented datasets into readable, meaningful summaries. This empowers businesses, administrators, and users to analyze trends, understand system status, and make accurate, data-driven decisions.

h) Describe report with its features. 4 Marks
A database report takes query results and formats them into clean lists or aggregated summaries.

Features of Reports:
– Organized Presentation: Displays data cleanly in structured columns and rows.
– Data Filtering: Shows only the necessary records, stripping out irrelevant information.
– Summarization: Uses aggregate functions (like SUM, AVG, COUNT) to display statistical totals.
– Multi-Table Integration: Combines relational data from separate tables to provide a complete view.
– Timely Access: Can be generated instantly to reflect the real-time state of the database.

Exercise 4: Write down the SQL query for the following statement

a. Write an SQL query to create a new database named CompanyData.
CREATE DATABASE CompanyData;

b. Write an SQL query to create a table named Employees with the following columns: (EmployeeID as INT/primary key, FirstName as VARCHAR(50), LastName as VARCHAR(50), Salary as DECIMAL 10 digits/2 decimals)
CREATE TABLE Employees (
    EmployeeID INT PRIMARY KEY,
    FirstName VARCHAR(50),
    LastName VARCHAR(50),
    Salary DECIMAL(10,2)
);

c. Write an SQL query to add a new column named Email to the Employees table (VARCHAR 100).
ALTER TABLE Employees
ADD Email VARCHAR(100);

d. Write an SQL query to modify the Salary column in the Employees table to have a default value of 25000.
ALTER TABLE Employees
MODIFY COLUMN Salary DECIMAL(10,2) DEFAULT 25000;

e. Write an SQL query to rename the Employees table to StaffMembers.
ALTER TABLE Employees
RENAME TO StaffMembers;

f. Write an SQL query to insert a new record into the StaffMembers table with the following values: [ EmployeeID : 101, FirstName : Sampada, LastName : Bhattrai, Salary : 30000.50 ]
INSERT INTO StaffMembers (EmployeeID, FirstName, LastName, Salary)
VALUES (101, 'Sampada', 'Bhattrai', 30000.50);

g. Write an SQL query to retrieve all columns and all rows from the table. (Assuming the renamed table StaffMembers)
SELECT * FROM StaffMembers;

h. Write an SQL query to retrieve only the FirstName and Salary columns from the table.
SELECT FirstName, Salary FROM StaffMembers;

i. Write an SQL query to increase the salary of all employees by 10%.
UPDATE StaffMembers
SET Salary = Salary + (Salary * 0.10);

j. Write an SQL query to delete the employee with EmployeeID 103 from the table.
DELETE FROM StaffMembers
WHERE EmployeeID = 103;

k. Write an SQL query to delete all records from the Employees table (or StaffMembers), but keep the table structure intact.
DELETE FROM StaffMembers;

📚 Also Read: Class 10 SEE Notes

Computer Science Units

Other Subjects

Scroll to Top