0% found this document useful (0 votes)
4 views

CLASS XA_XB

The document outlines a practical project on SQL queries for the AISSE Exam 2025 in Information Technology. It includes acknowledgments, an introduction to DDL and DML, and various SQL commands for creating, inserting, selecting, updating, and deleting records in a STUDENT table. The conclusion emphasizes the capabilities of SQL commands in managing database objects and data manipulation.

Uploaded by

tyrantiisumit
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

CLASS XA_XB

The document outlines a practical project on SQL queries for the AISSE Exam 2025 in Information Technology. It includes acknowledgments, an introduction to DDL and DML, and various SQL commands for creating, inserting, selecting, updating, and deleting records in a STUDENT table. The conclusion emphasizes the capabilities of SQL commands in managing database objects and data manipulation.

Uploaded by

tyrantiisumit
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

AISSE EXAM 2025

PRACTICAL PROJECT WORK

INFORMATION TECHNOLOGY
(Subject Code: 402)

QUERIES

NAME :
AISSE ROLL NO :
TABLE OF CONTENTS

SLN TOPIC PAGE

1. ACKNOWLEDGEMENT 1

2. INTRODUCTION 2

3. SQL QUERIES 3

4. CONCLUSION 5
ACKNOWLEDGEMENT

I would like to extend my special thanks of gratitude to our Vice Principal Mrs Deepa Rai Rakali
Ma’am for providing me this golden opportunity to work on this project on Queries and our
Subject Teacher Mr P K Das Sir for helping me to complete this project under his guidance.

NAME:

-1-
INTRODUCTION

In a database we can define the structure of the data and manipulate the data using some
commands. There are two types of languages for this task. They are:
1. DDL (Data Definition Language)
2. DML (Data Manipulation Language)

DATA DEFINITION LANGUAGE (DDL)


A Data Definition Language or Data Description Language (DDL) is a standard for commands
that define the different structures in a database. DDL statements are used to create, modify, and
remove database objects such as tables, indexes, and users. Some common DDL statements are
CREATE, ALTER, and DROP.

DATA MANIPULATION LANGUAGE (DML)


A data manipulation language (DML) is a language that enables users to access and manipulate
data in a database. The goal is to provide efficient human interaction with the system.
Data manipulation involves the following points:
 Retrieval of information from the database - SELECT statement
 Insertion of new information into the database - INSERT statement
 Deletion of information in the database - DELETE statement
 Modification of information in the database - UPDATE statement

A query language is a part of DML involving information retrieval only. The terms DML and
query language are often used synonymously.

A popular data manipulation language is Structured Query Language (SQL). This is used to
retrieve and manipulate data in a relational database. Data manipulation language comprises the
SQL data change statements, which modify stored data but not the schema or database objects.

DML can be classified into the following two categories:


i) Procedural: Here the user specifies what data is needed and how to get it
ii) Nonprocedural: Here the user only specifies what data is needed.

-2-
SQL QUERIES
1. Create a table STUDENT with the following structure:

FieldName Datatype Size/Constraint


ADMNO INTEGER PRIMARY KEY
STUDNAME VARCHAR 25
COURSE VARCHAR 10
FEES INTEGER
ADMDATE DATE

CREATE TABLE STUDENT


(ADMNO INTEGER PRIMARY KEY,
STUDNAME VARCHAR(25),
COURSE VARCHAR(10),
FEES INTEGER,
ADMDATE DATE);

2. Insert the following 5 records in the table STUDENT


1001, RAMESH SHARMA, MCA, 30000, 2020-06-21
1002, SANTOSH AGARWAL, BCA, 25000, 2020-06-21
1003, ANIMESH MUKHERJEE, MCA, 30000, 2020-06-23
1004, SANTOSH SINHA, PGDCA, 20000, 2020-07-02
1005, JAYANTA RAY, BCA, 25000, 2020-07-03

INSERT INTO STUDENT VALUES (1001, ‘RAMESH SHARMA’, ‘MCA’, 30000, ‘2020-06-21’);
INSERT INTO STUDENT VALUES (1002, ‘SANTOSH AGARWAL’, ‘BCA’, 25000, ‘2020-06-21’);
INSERT INTO STUDENT VALUES (1003, ‘ANIMESH MUKHERJEE’, ‘MCA’, 30000, ‘2020-06-23’);
INSERT INTO STUDENT VALUES (1004, ‘SANTOSH SINHA, ‘PGDCA’, 20000, ‘2020-07-02’);
INSERT INTO STUDENT VALUES (1005, ‘JAYANTA RAY’, ‘BCA’, 25000, ‘2020-07-03’);

3. Display all records from table STUDENT

SELECT * FROM STUDENT;

Output:
ADMNO STUDNAME COURSE FEES ADMDATE
1001 RAMESH SHARMA MCA 30000 2020-06-21
1002 SANTOSH AGARWAL BCA 25000 2020-06-21
1003 ANIMESH MUKHERJEE MCA 30000 2020-06-23
1004 SANTOSH SINHA PGDCA 20000 2020-07-02
1005 JAYANTA RAY BCA 25000 2020-07-03

4. Display the records from table STUDENT whose COURSE is either ‘BCA’ or ‘MCA’

SELECT * FROM STUDENT WHERE COURSE IN (‘BCA’, ‘MCA’);

Output:
ADMNO STUDNAME COURSE FEES ADMDATE
1001 RAMESH SHARMA MCA 30000 2020-06-21
1002 SANTOSH AGARWAL BCA 25000 2020-06-21
1003 ANIMESH MUKHERJEE MCA 30000 2020-06-23
1005 JAYANTA RAY BCA 25000 2020-07-03

-3-
5. Display the records from table STUDENT whose STUDNAME starts with ‘SANTOSH’

SELECT * FROM STUDENT WHERE STUDNAME LIKE ‘SANTOSH%’;

Output:
ADMNO STUDNAME COURSE FEES ADMDATE
1002 SANTOSH AGARWAL BCA 25000 2020-06-21
1004 SANTOSH SINHA PGDCA 20000 2020-07-02

6. Display all records from table STUDENT after sorting on STUDNAME

SELECT * FROM STUDENT ORDER BY STUDNAME;

Output:
ADMNO STUDNAME COURSE FEES ADMDATE
1003 ANIMESH MUKHERJEE MCA 30000 2020-06-23
1005 JAYANTA RAY BCA 25000 2020-07-03
1001 RAMESH SHARMA MCA 30000 2020-06-21
1002 SANTOSH AGARWAL BCA 25000 2020-06-21
1004 SANTOSH SINHA PGDCA 20000 2020-07-02

7. Change the value of STUDNAME ‘JAYANTA RAY’ to ‘JAYANTA KR. ROY’ in table
STUDENT

UPDATE STUDENT
SET STUDNAME = ‘JAYANTA KR ROY’
WHERE STUDNAME = ‘JAYANTA RAY’;

Result inside Table:


ADMNO STUDNAME COURSE FEES ADMDATE
1001 RAMESH SHARMA MCA 30000 2020-06-21
1002 SANTOSH AGARWAL BCA 25000 2020-06-21
1003 ANIMESH MUKHERJEE MCA 30000 2020-06-23
1004 SANTOSH SINHA PGDCA 20000 2020-07-02
1005 JAYANTA KR RAY BCA 25000 2020-07-03

8. Increase the FEES of COURSE ‘MCA’ by 10000 in table STUDENT


UPDATE STUDENT
SET FEES = FEES + 10000
WHERE COURSE = ‘MCA’;
Result inside Table:
ADMNO STUDNAME COURSE FEES ADMDATE
1001 RAMESH SHARMA MCA 40000 2020-06-21
1002 SANTOSH AGARWAL BCA 25000 2020-06-21
1003 ANIMESH MUKHERJEE MCA 40000 2020-06-23
1004 SANTOSH SINHA PGDCA 20000 2020-07-02
1005 JAYANTA KR RAY BCA 25000 2020-07-03
9. Remove the record whose ADMNO is 1001 from table STUDENT
DELETE FROM STUDENT WHERE ADMNO = 1002;

Result inside Table:


ADMNO STUDNAME COURSE FEES ADMDATE
1001 RAMESH SHARMA MCA 30000 2020-06-21
1003 ANIMESH MUKHERJEE MCA 30000 2020-06-23
1004 SANTOSH SINHA PGDCA 20000 2020-07-02
1005 JAYANTA RAY BCA 25000 2020-07-03

-4-
CONCLUSION
The scope of the SQL commands provide the capability to create a wide variety of database
objects like TABLES, VIEWS etc using the various DDL commands such as
CREATE, ALTER, and DROP commands.

These database objects can then be inserted with data using the DML command INSERT. The
data can be manipulated using a wide variety of other DML commands such
as SELECT, DELETE, and UPDATE.

-5-

You might also like