SARVODAYA SHAKTI
CO-EDNAGAR
VIDYALAYA No. 1
Class 12th Computer Science Project
Topic: SQL and Database
Submitted by:
Name: _______________________
Class: 12th
Session: 2024-2025
Certificate
This is to certify that __________________________ of class 12th has successfully completed the
project work titled "SQL and Database" in the subject of Computer Science during the academic
session 2024-2025. The project has been found satisfactory and in accordance with the guidelines
issued by the CBSE.
Signature of Teacher
__________________
Acknowledgement
I would like to express my sincere thanks to my Computer Science teacher ________________ for
her/his guidance and support in completing this project on "SQL and Database". I am also thankful
to my school principal and my classmates for their encouragement throughout the project.
Index
S.No Content Page No.
1 Certificate 1
2 Acknowledgement 2
3 SQL Coding Examples 3
4 Conclusion 5
SQL Coding Examples
1 Create a Database CREATE DATABASE School;
2 Create a Table CREATE TABLE Students (ID INT, Name VARCHAR(50), Age INT);
3 Insert into Table INSERT INTO Students VALUES (1, 'John', 16);
4 Select Data SELECT * FROM Students;
5 Where Clause SELECT * FROM Students WHERE Age > 15;
6 Update Data UPDATE Students SET Age = 17 WHERE ID = 1;
7 Delete Data DELETE FROM Students WHERE ID = 1;
8 Create Table with Primary Key CREATE TABLE Teachers (TID INT PRIMARY KEY, Name VARCHAR(50
9 Join Tables SELECT Students.Name, Teachers.Name FROM Students JOIN Teacher
10 Group By SELECT Age, COUNT(*) FROM Students GROUP BY Age;
11 Order By SELECT * FROM Students ORDER BY Name ASC;
12 Alter Table ALTER TABLE Students ADD Email VARCHAR(100);
13 Drop Table DROP TABLE Students;
14 Create View CREATE VIEW Teenagers AS SELECT * FROM Students WHERE Age B
15 Using IN Clause SELECT * FROM Students WHERE Age IN (15, 16, 17);
Conclusion
Through this project, I have gained a deeper understanding of SQL and database management. I
learned how to create and manipulate databases using SQL commands effectively. This hands-on
experience has strengthened my concepts and improved my problem-solving skills in database
handling.