CBSE Class 12 Informatics Practices Database Fundamentals MySQL Revision Tour Worksheet

Read the CBSE Class 12 Informatics Practices Database Fundamentals MySQL Revision Tour Worksheet below. Find downloadable Class 12 Informatics Practices worksheets tailored for 2026-27, focusing on Database Fundamentals MySQL Tour. Prepared by expert teachers, these printable exercises comply with modern evaluation standards set by NCERT, CBSE, and KVS.

Download Class 12 Informatics Practices Database Fundamentals MySQL Tour Printable Sheet

Use this Informatics Practices practice paper to evaluate your Database Fundamentals MySQL Tour skills. Built for Class 12 students, it offers essential questions and clear answers so you can practice daily and perform better in school tests and final examinations.

Download Worksheet: Database Fundamentals MySQL Tour (Class 12 Informatics Practices)

CBSE Class 12 Informatics Practices Database Fundamentals Mysql Revision Tour. Students can download these worksheets and practice them. This will help them to get better marks in examinations. Also refer to other worksheets for the same chapter and other subjects too. Use them for better understanding of the subjects.

UNIT 3

CHAPTER 13: DATABASE FUNDAMENTALS - MYSQL REVISION TOUR

Database: Collection of logically related data stored in a structure format.

DBMS: Software used to manage databases is called Data Base Management System (DBMS).

RDBMS: A DBMS used to manage Relational Databases is called an RDBMS (Relational Data

Base Management System). Some popular RDBMS software available are: Oracle, MySQL,

Sybase, and Ingress.

Benefits of using a DBMS are:

a. Redundancy can be controlled b. Inconsistency can be avoided

c. Data can be shared d. Security restrictions can be applied.

MySQL: It is an Open Source RDBMS Software. It is available free of cost.

Relation/Table: A table refers to a two dimensional representation of data arranged in columns

(also called fields or attributes) and rows (also called records or tuples).

Key: A column or a combination of columns which have some specific characteristics in a relation

e.g. are Primary Key, Candidate Key and Foreign Key etc.

Primary Key: The group of one or more attribute(s) used to uniquely identify each row/tuple of a

relation/table is called its Primary Key.

Candidate Key: A group of columns which can be set as the primary key of a relation is called a

candidate key because it is one of the candidates available to be the primary key of the relation.

Alternate Key: A candidate key of a table which is not set as primary key is called its Alternate Key.

Degree is the number of columns/attributes in the table.

Cardinality is the number of rows/tuples in a table.

SQL (Structured Query Language): It is the language used to manipulate and manage databases

and tables within them using an RDBMS. There are following four types of SQL commands:

1. DDL (Data Definition Language): Deals with the Structure (create, remove, or modify) of

databases and tables e.g. CREATE, DROP, ALTER.

2. DML (Data Manipulation Language): Used to manipulate data/ values within tables e.g.

INSERT, UPDATE, DELETE.

3. DCL (Data Control Language): Used to control the access to the databases and tables e.g.

GRANT, REVOKE.

4. TCL(Transaction Control Language): used to manage and control the transaction e.g.

COMMIT , ROLLBACK, SAVEPOINT

Some Commonly used DDL Command are as follows:-

SNo Command, Syntax and Purpose

1 Command : Create Database

Syntax: Create database ;

Purpose: Creates a database with specified name

2 Command : Create Table

Syntax: Create Table

 

( , Data Type1,, Data Type2);

Purpose: Creates a table with specified name

 

3 Command : Alter Table

Syntax: Alter Table

Add Data Type1;

 

Alter Table

 

Drop ;

 

Alter Table

 

Modify ;

 

Purpose: Modify the strcture of a table

4 Command : Use

Syntax: Use ;

Purpose: Open the specified database for use

5 Command : Select Database( )

Syntax: : Select Database( );

Purpose: Show the name of current Database

6 Command : Show tables;

Syntax: : Show tables ;

Purpose: Show a list of tables in the current database

7 Command : Show databases;

Syntax: : Show databases;

Purpose: Show a list of databases

8 Command : Insert

Syntax : Insert Into

 

( ,….,values

 

(

Purpose: Insert Data into the table

9 Command : Select

Syntax: Select * Column name, Expression,Column name From table Name Where

Condition Order by Column Name Asc/Desc ;

Purpose: To reterive selected data from the table

10 Command : Describe

Syntax: : Desc

 

;

 

Purpose: Show structure of table

11 Command : Update

Syntax: : Update

 

Set =Value

Where ;

Purpose: Update or Modify the data in tables

Following are the clauses which can be used with select command

SNo CLAUSE EXPLANATION

1 DISTINCT Used to display distinct values from a column of a table

2 WHERE Used to specify the condition based on which rows of a table are dispalyed

3 BETWEEN Used to define the range of values within which the column values must fall to

make a condition true. It include both upper and lower values.

4 IN Used to select values that natch any values in a lsit of specified values

5 LIKE Used for pattern matching of string data using wildcard characters % and _

6 IS NULL/ NOT Used to select rows in which the specified column is NULL (or is NOT NULL)

 

 

Page 1

Database Fundamentals - MySQL Revision Tour

Database: A structured repository holding logically related data files.

DBMS (Database Management System): A software suite designed to maintain, define, and process databases.

RDBMS (Relational Database Management System): A specialized database manager built to operate on the relational model. Popular packages include Oracle, MySQL, Sybase, and Ingres.

Advantages of a DBMS:

  • Minimizes data duplication (redundancy)
  • Prevents structural inconsistencies
  • Enables multi-user sharing
  • Enforces data security and access restrictions

MySQL: A free, highly popular open-source relational database platform.

Relation / Table: A grid representation storing records in rows (tuples) and properties in columns (attributes or fields).

Key: A column or a set of columns used to categorize and enforce unique constraints on table records, such as primary, candidate, or foreign keys.

Primary Key: The minimum set of attributes uniquely identifying every record in a relation.

Candidate Key: Any minimal set of attributes that meets the criteria to serve as a primary key.

Alternate Key: A candidate key that was not chosen as the primary key.

Degree: The total count of columns in a table.

Cardinality: The total count of rows in a table.

SQL (Structured Query Language): A standardized programming language designed to manipulate, retrieve, and manage data within relational databases. Categories of commands:

  1. DDL (Data Definition Language): Handles schema structure definitions (e.g., CREATE, ALTER, DROP).
  2. DML (Data Manipulation Language): Deals with accessing and changing table rows (e.g., INSERT, UPDATE, DELETE, SELECT).
  3. DCL (Data Control Language): Controls authorization and security access rights (e.g., GRANT, REVOKE).
  4. TCL (Transaction Control Language): Manages relational transactions (e.g., COMMIT, ROLLBACK, SAVEPOINT).

Commonly Used DDL Commands:

 
S.No.Command & SyntaxPurpose
1Command: Create Database
Syntax: CREATE DATABASE <Database Name>;
Creates a new database with the specified name.
2Command: Create Table
Syntax: CREATE TABLE <Table Name> (<Column Name1> Data_Type1, <Column Name2> Data_Type2, ...);
Creates a new table schema inside the active database.

 

Page 2

Commonly Used Database Commands (Continued):

S.No.Command & SyntaxPurpose
3Command: Alter Table
Syntax:
ALTER TABLE <Table Name> ADD <Column Name> Data_Type;
ALTER TABLE <Table Name> DROP <Column Name>;
ALTER TABLE <Table Name> MODIFY <Column Name> <New_Definition>;
Modifies the structural definition of an existing table.
4Command: Use
Syntax: USE <Database Name>;
Opens the selected database to run active queries.
5Command: Select Database()
Syntax: SELECT DATABASE();
Displays the name of the currently selected database.
6Command: Show Tables
Syntax: SHOW TABLES;
Lists all tables existing in the active database.
7Command: Show Databases
Syntax: SHOW DATABASES;
Lists all databases available on the DBMS.
8Command: Insert
Syntax: INSERT INTO <Table Name> (<Column1>, <Column2>, ...) VALUES (<Value1>, <Value2>, ...);
Inserts new records (tuples) into a table.
9Command: Select
Syntax: SELECT <Columns> FROM <Table Name> [WHERE Condition] [ORDER BY Column ASC|DESC];
Retrieves selected rows and column data from a table.
10Command: Describe
Syntax: DESC <Table Name>; or DESCRIBE <Table Name>;
Shows the schema, field types, and constraints of a table.
11Command: Update
Syntax: UPDATE <Table Name> SET <Column> = Value WHERE <Condition>;
Updates or modifies existing data values inside a table.

Clauses Used with the SELECT Command:

S.No.ClauseExplanation
1DISTINCTDisplays only unique, non-duplicate values from a specified column.
2WHEREApplies logical conditions to filter and display only specific rows.
3BETWEENDefines an inclusive range of values (including both boundary limits) to evaluate query parameters.
4INMatches values against a defined set or list of potential criteria.
5LIKEExecutes string pattern matching using wildcard operators (% for multiple characters, _ for a single character).
6IS NULL / IS NOT NULLFilters rows depending on whether a column contains missing (NULL) or populated values.

 

Page 3

S.No.ClauseExplanation
7ORDER BYArranges retrieved query results in ascending (ASC) or descending (DESC) order based on the specified column.

MySQL String Functions:

S.No.Function & SyntaxDescription
1LENGTH(str)Returns the size of a column or string measured in bytes.
2CONCAT(str1, str2, ...)Merges and returns the combined values of multiple string inputs.
3INSTR(str, substr)Returns the starting index of the first occurrence of a substring within a larger string.
4LOWER(str) or LCASE(str)Converts all characters of the input string into lowercase.
5UPPER(str) or UCASE(str)Converts all characters of the input string into uppercase.
6LEFT(str, n)Extracts the first n characters starting from the left of the string.
7RIGHT(str, n)Extracts the last n characters starting from the right of the string.

MySQL Numeric Functions:

S.No.Function & SyntaxDescription
1POWER(x, y) or POW(x, y)Computes and returns the value of x raised to the power of y.
2ROUND(x)Rounds the numeric value x to its nearest integer.
3ROUND(x, d)Rounds the numeric value x to d decimal places.
4TRUNCATE(x, d)Truncates the numeric value x directly to d decimal places without rounding.

 

Page 4

MySQL Date and Time Functions:

S.No.Function & SyntaxDescription
1CURDATE()Returns the current date in YYYY-MM-DD (or YYYYMMDD in a numeric context).
2NOW()Returns the current date and time in YYYY-MM-DD HH:MM:SS format.
3SYSDATE()Returns the current system date and time in YYYYMMDD HHMMSS.uuuuuu format.
4DATE(expr)Extracts the date portion of a date or datetime expression.
5MONTH(date)Returns the numeric month index (0 to 12) for the given date.
6YEAR(date)Returns the year value (0 to 9999) of the given date.
7DAYNAME(date)Returns the weekday name (e.g., 'Monday') for the specified date.
8DAYOFMONTH(date)Returns the day index of the month (0 to 31).
9DAYOFWEEK(date)Returns the day of week as a number (1 = Sunday, 2 = Monday, etc.).
10DAYOFYEAR(date)Returns the day index of the year (1 to 366).

Using SELECT as a Calculator and General Utility:

  • SELECT 5+68; or SELECT 5+68 FROM DUAL; - Computes basic arithmetic calculations directly or via the dummy table DUAL.
  • SELECT ECODE, SAL_AMT*12 FROM SALARY; - Computes an annual salary value by multiplying monthly salary amounts by 12.
  • SELECT CURDATE(); - Fetches the current operating system date.
  • SELECT SAL_AMT*12 AS "ANNUAL SALARY" FROM SALARY; - Uses an alias name "ANNUAL SALARY" to display computed monthly values as a formatted heading.
  • SELECT 22/7 AS PI; - Evaluates an arithmetic expression and aliases the header as PI.
  • SELECT NAME, BIRTH, DEATH FROM ABC; - Displays columns containing null values.
  • SELECT NAME, BIRTH, IFNULL(DEATH, "ALIVE") FROM ABC; - Uses the IFNULL() function to substitute "ALIVE" if the death date field is null.
  • SELECT EMPNAME, 'GETS THE SALARY PER MONTH' SAL_AMT FROM SALARY; - Inserts static text as a temporary column alongside column data inside the output.
  • SELECT * FROM EMPLOYEE WHERE ECODE<>2001; - Filters out the employee with a code of 2001 using a relational operator.
  • SELECT * FROM EMPLOYEE WHERE ECODE=2001 OR EMPNAME='RAVI KUMAR'; - Employs logical OR to match either condition.
  • SELECT * FROM EMPLOYEE WHERE ECODE=2001 AND EMPNAME='RAVI KUMAR'; - Employs logical AND to evaluate both criteria simultaneously.
  • SELECT * FROM EMPLOYEE WHERE (NOT ECODE=2001); - Employs logical negation to display records where employee code is not equal to 2001.
  • SELECT ECODE, EMPNAME FROM SALARY WHERE SAL_AMT BETWEEN 20000 AND 50000; - Implements the BETWEEN operator to check range inclusion.
  • SELECT ECODE, EMPNAME FROM SALARY WHERE SAL_AMT NOT BETWEEN 20000 AND 50000; - Finds records lying outside the specified numerical range.

 

Page 5

Intermediate Filtering and Functions:

  • SELECT * FROM EMPLOYEE WHERE CITY IN ('DELHI','MUMBAI','BANGALORE'); - Retrieves employees matching any city in the specified list.
  • SELECT * FROM EMPLOYEE WHERE EMPNAME LIKE 'A%'; - Matches names beginning with 'A'.
  • SELECT * FROM EMPLOYEE WHERE EMPNAME LIKE '----'; - Matches names containing exactly four characters.
  • SELECT * FROM EMPLOYEE WHERE EMPNAME LIKE '---%'; - Matches names containing at least three characters.
  • SELECT * FROM EMPLOYEE WHERE EMPNAME IS NULL; - Selects records with a missing name value.
  • SELECT * FROM EMPLOYEE ORDER BY EMPNAME; - Sorts the output alphabetically by employee name.
  • SELECT * FROM SALARY WHERE SAL_AMT > 50000 ORDER BY ECODE DESC; - Displays salaries greater than 50,000, sorted in descending order of employee code.
  • SELECT ECODE, SAL_AMT*12 "ANNUAL SALARY" FROM SALARY ORDER BY "ANNUAL SALARY"; - Sorts the rows using an annual salary alias.
  • SELECT CHAR(65); - Decodes ASCII code 65 into its corresponding character 'A'.
  • SELECT CONCAT(ECODE, EMPNAME) AS "CODENAME" FROM EMPLOYEE; - Merges two columns into a single alias column named "CODENAME".
  • SELECT RTRIM(EMPNAME) FROM EMPLOYEE; - Clears leading trailing spaces from the right side.
  • SELECT LTRIM(EMPNAME) FROM EMPLOYEE; - Clears leading whitespace from the left side.
  • SELECT TRIM(EMPNAME) FROM EMPLOYEE; - Clears whitespace from both ends.
  • SELECT ECODE, MOD(15,6) FROM DUAL; - Computes the modulus remainder (which is 3).
  • SELECT MOD(SAL_AMT,1000) FROM SALARY; - Computes the remainder of salary amount divided by 1000.
  • SELECT POWER(5,3) FROM DUAL; - Evaluates 5 cubed, yielding 125.
  • SELECT ROUND(15.193, 1) FROM DUAL; - Rounds the decimal to one place, returning 15.2.
  • SELECT CURDATE(); - Displays current system date.
  • SELECT DATE('2010-04-13 01:02:33'); - Extracts the date only '2010-04-13'.
  • SELECT MONTH('2010-04-13'); - Extracts the month index '04'.
  • SELECT YEAR('2010-04-13'); - Extracts the year '2010'.

Practice Exercises

Consider a database LOANS with the following table:

Table: LoanAccounts

AccNoCustNameLoanAmountInstallmentIntrateStartDateInterest
1R K Gupta3000003612.0019-07-2009NULL
2S P Sharma5000004810.0022-03-2008NULL
3K P Jain30000036NULL08-03-2007NULL
4M P Yadav8000006010.0006-12-2008NULL
5S P Sinha2000003612.5003-01-2010NULL
6P Sharma7000006012.5005-06-2008NULL
7K S Dhall50000048NULL05-03-2008NULL

 

Page 6

Write SQL commands for the tasks 1 to 35 and write the output for the SQL commands 36 to 40:

Question 1. Create the database LOANS.
Answer:
CREATE DATABASE LOANS;
In simple words: This command initializes and creates a fresh database container named LOANS in the database server.

Exam Tip: Remember to use the CREATE DATABASE statement to allocate storage structure in MySQL before attempting to make any tables.

 

Question 2. Use the database LOANS.
Answer:
USE LOANS;
In simple words: This command selects and activates the LOANS database so that subsequent table queries run within it.

Exam Tip: Executing the USE command is mandatory in SQL command line interface before executing operations on any specific tables.

 

Question 3. Create the table LoanAccounts and insert tuples in it.
Answer:
SQL Statement to Create Table:
CREATE TABLE LoanAccounts (
    AccNo INT PRIMARY KEY,
    CustName VARCHAR(30),
    LoanAmount DECIMAL(10,2),
    Installment INT,
    Intrate DECIMAL(5,2),
    StartDate DATE,
    Interest DECIMAL(10,2)
);


SQL Statement to Insert Sample Data (e.g., first row):
INSERT INTO LoanAccounts VALUES (1, 'R K Gupta', 300000, 36, 12.00, '2009-07-19', NULL);
In simple words: This setup creates a database table with columns for account numbers, names, loan totals, and details, then populates rows with the corresponding values.

Exam Tip: When defining date columns, use the DATE data type, and ensure date literal values are inserted using 'YYYY-MM-DD' format.

 

Question 4. Display the details of all the loans.
Answer:
SELECT * FROM LoanAccounts;
In simple words: This query fetches and displays every row and column of data currently saved inside the LoanAccounts table.

Exam Tip: The wildcard character (*) represents all columns of the selected table schema.

 

Question 5. Display the AccNo, CustName, and LoanAmount of all the loans.
Answer:
SELECT AccNo, CustName, LoanAmount FROM LoanAccounts;
In simple words: This displays only the account number, customer name, and loan amount columns for all rows, ignoring the other columns.

Exam Tip: Separate specific field projections with commas to show selected columns instead of using the wildcard selector.

 

Question 6. Display the details of all the loans with less than 40 instalments.
Answer:
SELECT * FROM LoanAccounts WHERE Installment < 40;
In simple words: This fetches all columns for rows where the installment count is strictly less than 40.

Exam Tip: Use the WHERE clause to apply conditional row filtering with relational operators.

 

Question 7. Display the AccNo and LoanAmount of all the loans started before 01-04-2009.
Answer:
SELECT AccNo, LoanAmount FROM LoanAccounts WHERE StartDate < '2009-04-01';
In simple words: This displays the account number and loan size for any account opened before April 1, 2009.

Exam Tip: Convert localized dates into standard 'YYYY-MM-DD' format when implementing date filter values in SQL queries.

 

Question 8. Display the IntRate of all the loans started after 01-04-2009.
Answer:
SELECT Intrate FROM LoanAccounts WHERE StartDate > '2009-04-01';
In simple words: This selects and shows only the interest rates of loans that began after April 1, 2009.

Exam Tip: Ensure that the correct column name (matching the schema, e.g., Intrate) is projected in your SELECT block.

 

Question 9. Display the details of all the loans whose rate of interest is NULL.
Answer:
SELECT * FROM LoanAccounts WHERE Intrate IS NULL;
In simple words: This displays every piece of information for any loan that has a missing or empty interest rate.

Exam Tip: Always use the specific IS NULL operator to evaluate empty entries; utilizing = NULL will fail to return any matching records.

 

Question 10. Display the details of all the loans whose rate of interest is not NULL.
Answer:
SELECT * FROM LoanAccounts WHERE Intrate IS NOT NULL;
In simple words: This returns complete rows of loans that contain a valid, non-empty interest rate.

Exam Tip: The IS NOT NULL criteria selects all rows where values have been populated in a nullable column.

 

Question 11. Display the amounts of various loans from the table LoanAccounts. A loan amount should appear only once.
Answer:
SELECT DISTINCT LoanAmount FROM LoanAccounts;
In simple words: This shows all unique loan values, making sure duplicate amounts do not show up twice on the list.

Exam Tip: The DISTINCT keyword is placed immediately after SELECT to suppress duplicate values inside the projected column.

 

Question 12. Display the number of instalments of various loans from the table LoanAccounts. An instalment should appear only once.
Answer:
SELECT DISTINCT Installment FROM LoanAccounts;
In simple words: This outputs all unique installment counts, hiding any duplicate numbers.

Exam Tip: Apply the DISTINCT modifier to display a simplified list of unique values within a numeric field.

 

Question 13. Display the details of all the loans started after 31-12-2008 for which the number of instalments are more than 36.
Answer:
SELECT * FROM LoanAccounts WHERE StartDate > '2008-12-31' AND Installment > 36;
In simple words: This displays all columns of loans that were opened after December 31, 2008, provided they also require more than 36 installments.

Exam Tip: Combine separate conditions using the logical AND operator to require that both constraints must evaluate to true.

 

Question 14. Display the CustName and LoanAmount for all the loans which do not have number of instalments 36.
Answer:
SELECT CustName, LoanAmount FROM LoanAccounts WHERE Installment <> 36;
In simple words: This displays customer names and loan totals for all entries where the installment counts are anything except 36.

Exam Tip: Use either the inequality operator <> or != to filter out records matching a specific value.

 

Question 15. Display the CustName and LoanAmount for all the loans for which the loan amount is less than 500000 or intrate is more than 12.
Answer:
SELECT CustName, LoanAmount FROM LoanAccounts WHERE LoanAmount < 500000 OR Intrate > 12.00;
In simple words: This shows names and loan totals for loans that are cheaper than 500,000, or have an interest rate higher than 12%.

Exam Tip: Use the logical OR operator when you want to retrieve rows that meet at least one of the defined criteria.

 

Question 16. Display the details of all the loans which started in the year 2009.
Answer:
SELECT * FROM LoanAccounts WHERE YEAR(StartDate) = 2009;
In simple words: This extracts and displays details for any loans where the starting date is within the year 2009.

Exam Tip: Alternatively, you can use range parameters like WHERE StartDate BETWEEN '2009-01-01' AND '2009-12-31' to target a specific calendar year.

 

Question 17. Display the details of all the loans whose LoanAmount is in the range 400000 to 500000.
Answer:
SELECT * FROM LoanAccounts WHERE LoanAmount BETWEEN 400000 AND 500000;
In simple words: This shows all columns for loans that are between 400,000 and 500,000, including the boundary amounts.

Exam Tip: The BETWEEN operator defines an inclusive range, which matches both the upper and lower limits specified.

 

Question 18. Display the details of all the loans whose rate of interest is in the range 11% to 12%.
Answer:
SELECT * FROM LoanAccounts WHERE Intrate BETWEEN 11.00 AND 12.00;
In simple words: This displays details for any loans where the interest rate is between 11% and 12% inclusive.

Exam Tip: Ensure that decimal values are evaluated directly in range queries without percent symbols.

 

Question 19. Display the CustName and LoanAmount for all the loans for which the number of instalments are 24, 36, or 48.
Answer:
SELECT CustName, LoanAmount FROM LoanAccounts WHERE Installment IN (24, 36, 48);
In simple words: This shows names and loan amounts for accounts where the installments are exactly 24, 36, or 48.

Exam Tip: The IN operator allows you to specify a set of target values, acting as a cleaner alternative to multiple OR conditions.

 

Question 20. Display the details of all the loans whose LoanAmount is in the range 400000 to 500000.
Answer:
SELECT * FROM LoanAccounts WHERE LoanAmount BETWEEN 400000 AND 500000;
In simple words: This displays complete database records for loans with sizes ranging from 400,000 to 500,000.

Exam Tip: You can also write this query using relational comparison operators like WHERE LoanAmount >= 400000 AND LoanAmount <= 500000.

 

Question 21. Display the details of all the loans whose rate of interest is in the range 11% to 12%.
Answer:
SELECT * FROM LoanAccounts WHERE Intrate BETWEEN 11.00 AND 12.00;
In simple words: This query displays information for loans with interest rates between 11% and 12%.

Exam Tip: Ensure the column name used matches the database schema definition (e.g., Intrate instead of InterestRate).

 

Question 22. Display the AccNo, CustName, and LoanAmount for all the loans for which the CustName ends with 'Sharma'.
Answer:
SELECT AccNo, CustName, LoanAmount FROM LoanAccounts WHERE CustName LIKE '%Sharma';
In simple words: This lists details for accounts where the customer's name ends with 'Sharma'.

Exam Tip: Use the wildcard percent symbol (%) at the beginning of your pattern string (e.g., '%Sharma') to match any preceding characters.

 

Question 23. Display the AccNo, CustName, and LoanAmount for all the loans for which the Cust_Name ends with 'a'.
Answer:
SELECT AccNo, CustName, LoanAmount FROM LoanAccounts WHERE CustName LIKE '%a';
In simple words: This prints details for accounts where the customer's name ends with the lowercase or uppercase letter 'a'.

Exam Tip: In standard installations, SQL pattern matching with LIKE is case-insensitive, so '%a' matches names ending with both 'a' and 'A'.

 

Question 24. Display the AccNo, CustName, and LoanAmount for all the loans for which the Cust_Name contains 'a'.
Answer:
SELECT AccNo, CustName, LoanAmount FROM LoanAccounts WHERE CustName LIKE '%a%';
In simple words: This fetches details for records where the letter 'a' is present anywhere within the customer's name.

Exam Tip: Placing percent wildcards on both sides of a character string (e.g., '%a%') checks for substring matches anywhere inside the field.

 

Page 7

 

Question 25. Display the AccNo, CustName, and LoanAmount for all the loans for which the Cust_Name does not contain 'P'.
Answer:
SELECT AccNo, CustName, LoanAmount FROM LoanAccounts WHERE CustName NOT LIKE '%P%';
In simple words: This query displays details for loans where the customer's name does not include the letter 'P' anywhere.

Exam Tip: Combine the logical negation operator NOT alongside the pattern matching operator LIKE (e.g., NOT LIKE '%P%') to exclude matching substrings.

 

Question 26. Display the AccNo, CustName, and LoanAmount for all the loans for which the CustName contains 'a' as the second last character.
Answer:
SELECT AccNo, CustName, LoanAmount FROM LoanAccounts WHERE CustName LIKE '%a_';
In simple words: This displays details for accounts where the second-to-last letter of the customer's name is the letter 'a'.

Exam Tip: Employs the underscore wildcard (_) to represent exactly one single character, allowing you to match a specific position relative to the end of a string.

 

Question 27. Display the details of all the loans in the ascending order of their LoanAmount.
Answer:
SELECT * FROM LoanAccounts ORDER BY LoanAmount ASC;
In simple words: This displays all columns, sorted in order from the smallest loan amount to the largest.

Exam Tip: The ORDER BY clause sorts query rows in ascending order (ASC) by default if a sort direction is not explicitly specified.

 

Question 28. Display the details of all the loans in the descending order of their StartDate.
Answer:
SELECT * FROM LoanAccounts ORDER BY StartDate DESC;
In simple words: This shows complete loan details, sorted from the newest starting date to the oldest.

Exam Tip: Specify the DESC modifier inside your ORDER BY clause to sort date or numerical columns in descending order.

 

Question 29. Display the details of all the loans in the ascending order of their LoanAmount and within LoanAmount in the descending order of their StartDate.
Answer:
SELECT * FROM LoanAccounts ORDER BY LoanAmount ASC, StartDate DESC;
In simple words: This query first sorts loans from smallest to largest by amount. If multiple loans have the exact same amount, it sorts those specific loans from newest to oldest.

Exam Tip: Specify multiple columns in the ORDER BY clause, separated by commas, to apply nested sorting logic to query results.

 

Question 30. Change the interest rate 11.50% for all the loans for which interest rate is NULL.
Answer:
UPDATE LoanAccounts SET Intrate = 11.50 WHERE Intrate IS NULL;
In simple words: This updates the table, setting the interest rate to 11.5% for any loan where the interest field was previously blank.

Exam Tip: Use the UPDATE statement with the SET keyword to modify column values, and target rows using WHERE ... IS NULL.

 

Question 31. Increase the interest rate by 0.5% for all the loans for which the loan amount is more than 400000.
Answer:
UPDATE LoanAccounts SET Intrate = Intrate + 0.5 WHERE LoanAmount > 400000;
In simple words: This updates the table, adding 0.5% to the existing interest rate for all loans that are larger than 400,000.

Exam Tip: Use assignment math (such as Intrate = Intrate + 0.5) inside your UPDATE set statement to increment existing cell values.

 

Question 32. For each loan replace Interest with (LoanAmount*IntRate*Instalments) 12*100.
Answer:
UPDATE LoanAccounts SET Interest = (LoanAmount * Intrate * Installment) / 1200;
In simple words: This calculates the simple interest value for each loan based on the amount, interest rate, and months, then saves the result in the interest column.

Exam Tip: Since installments are monthly, the simple interest formula is expressed as \( P \times R \times T / 100 \), which translates to dividing the product by 1200 in the query.

 

Question 33. Delete the records of all the loans whose start date is before 2007.
Answer:
DELETE FROM LoanAccounts WHERE StartDate < '2007-01-01';
In simple words: This deletes any rows from the table where the loan started before January 1, 2007.

Exam Tip: Use the DELETE FROM command to remove rows, and apply precise date range filters to avoid deleting unintended records.

 

Question 34. Delete the records of all the loans of 'K.P. Jain'.
Answer:
DELETE FROM LoanAccounts WHERE CustName = 'K P Jain';
In simple words: This removes any rows associated with the customer name 'K P Jain' from the table.

Exam Tip: Be careful to match spaces and exact spellings within single quotes when writing filter values for text columns.

 

Question 35. Add another column Category of type CHAR(1) in the Loan table.
Answer:
ALTER TABLE LoanAccounts ADD Category CHAR(1);
In simple words: This modifies the table schema to append a new column named Category that stores a single text character.

Exam Tip: Use the ALTER TABLE statement with the ADD clause to dynamically append columns to an existing table schema.

 

Solved CBSE Questions:

 

Question 1. Mrs. Sharma is the class teacher of Class 'XII A' She wants to create a table 'Student' to store details of her class.
(i) Which of the following can be the attributes of Student table?
a) RollNo b) "Amit" c) Name d) 25
(ii) Name the Primary key of the table 'Student'. State reason for choosing it.
Answer:
(i) The valid attributes for the Student table are:
a) RollNo and c) Name.
(The entries "Amit" and 25 are data values/literals rather than schema column fields).

(ii) Primary Key: RollNo
Reason: Every student in a class is assigned a unique roll number, ensuring it can uniquely identify each row in the table, whereas names can be shared by multiple students.
In simple words: The columns are RollNo and Name because they describe categories of information. The primary key is RollNo because roll numbers are unique for every single student.

Exam Tip: Primary keys must be unique and contain non-null values; always look for identification numbers like RollNo or AdmissionNo to use as the primary key.

 

Question 2. While creating the table Employee, Mr. John forgot to include the field EMPNO, now how to insert the EMPNO field with integer data type and 10 size into the Employee table?
Answer: To add the missing column, use this query:
ALTER TABLE Employee ADD EMPNO INT(10);
In simple words: Use the ALTER TABLE command to modify the existing table and append the EMPNO column with a size of 10.

Exam Tip: Remember to use the ADD keyword alongside the column name and data type specification to add columns to an existing schema.

 

Question 3. While creating the table Student last week, Ms. Sharma forgot to include the column GamePlayed. Now write a command to insert the Gameplayed column with VARCHAR data type and 30 size into the Student table?
Answer: Run this statement to add the column:
ALTER TABLE Student ADD GamePlayed VARCHAR(30);
In simple words: This command modifies the Student table schema to add the GamePlayed column, letting you store text entries of up to 30 characters.

Exam Tip: Be careful with capitalization; table and column names in queries must match the names defined in the question.

 

Question 4. Sujata has created a table in MySQL. Later on she found that the width of name column is not sufficient for entering some long names. She wants to increase the width of the name column. Which command she should give to do this.
Answer: Use the modify clause inside the alter table statement:
ALTER TABLE Student MODIFY Name VARCHAR(100);
(Assuming the table name is Student and the target column name is Name, this command increases its capacity to 100 characters).
In simple words: You can expand a column's width using the ALTER TABLE ... MODIFY command, specifying the new larger capacity size.

Exam Tip: Use MODIFY instead of ADD or CHANGE when you need to change data types or sizes of existing columns without renaming them.

 

Question 5. While creating a table "MobDet", Kavita forgot to set primary key for the table. Write the statement to set the column MobileNo as the primary key of the table.
Answer: Add the primary key constraint using:
ALTER TABLE MobDet ADD PRIMARY KEY (MobileNo);
In simple words: Use the alter statement to modify the MobDet table structure and set the MobileNo column as its primary key.

Exam Tip: The ADD PRIMARY KEY clause applies primary constraints to existing database columns.

 

Question 6. Write a command to add a NOT NULL constraint on fees column of a student table.
Answer: Modify the column's constraint definition using:
ALTER TABLE student MODIFY fees INT(4) NOT NULL;
In simple words: This modifies the fees column definition in the student table to ensure that it cannot be left empty.

Exam Tip: Applying constraints like NOT NULL requires re-declaring the data type (e.g., INT(4)) alongside the constraint name inside the MODIFY clause.

CBSE Class 12 Informatics Practices Worksheet: Database Fundamentals MySQL Tour

Daily Practice Questions for Class 12 Informatics Practices

Students can use the practice questions and answers provided above for Database Fundamentals MySQL Tour to prepare for their upcoming school tests. This resource is designed by expert teachers as per the latest 2026 syllabus released by CBSE for Class 12. We suggest that Class 12 students solve these questions daily for a strong foundation in Informatics Practices.

Database Fundamentals MySQL Tour Solutions & NCERT Alignment

Designed using the official NCERT book for Class 12 Informatics Practices as a primary reference, these practice sheets guarantee standard compliance. Reviewing our step-by-step solutions after completion sharpens your presentation skills for upcoming CBSE exams. Be sure to check out the included MCQ questions for Informatics Practices to review all core chapter highlights.

Class 12 Exam Preparation Strategy

Regular practice of this Class 12 Informatics Practices study material helps you to be familiar with the most regularly asked exam topics. If you find any topic in Database Fundamentals MySQL Tour difficult then you can refer to our NCERT solutions for Class 12 Informatics Practices. All revision sheets and printable assignments on studiestoday.com are free and updated to help students get better scores in their school examinations.

FAQs

Where can I download the 2026-27 CBSE printable worksheets for Class 12 Informatics Practices Database Fundamentals MySQL Tour?

You can download the latest chapter-wise printable worksheets for Class 12 Informatics Practices Database Fundamentals MySQL Tour for free from StudiesToday.com. These have been made as per the latest CBSE curriculum for this academic year.

Are these Database Fundamentals MySQL Tour Informatics Practices worksheets based on the new competency-based education (CBE) model?

Yes, Class 12 Informatics Practices worksheets for Database Fundamentals MySQL Tour focus on activity-based learning and also competency-style questions. This helps students to apply theoretical knowledge to practical scenarios.

Do the Class 12 Informatics Practices Database Fundamentals MySQL Tour worksheets have answers?

Yes, we have provided solved worksheets for Class 12 Informatics Practices Database Fundamentals MySQL Tour to help students verify their answers instantly.

Can I print these Database Fundamentals MySQL Tour Informatics Practices test sheets?

Yes, our Class 12 Informatics Practices test sheets are mobile-friendly PDFs and can be printed by teachers for classroom.

What is the benefit of solving chapter-wise worksheets for Informatics Practices Class 12 Database Fundamentals MySQL Tour?

For Database Fundamentals MySQL Tour, regular practice with our worksheets will improve question-handling speed and help students understand all technical terms and diagrams.