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

SQL Project

The document outlines the design of a database for an institution to store student details and marks for performance evaluation. It includes tasks such as creating a 'Students' table with specific constraints and a 'Marksheet' table to track scores and rankings. Additionally, it provides SQL queries for creating the tables and inserting values into them.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

SQL Project

The document outlines the design of a database for an institution to store student details and marks for performance evaluation. It includes tasks such as creating a 'Students' table with specific constraints and a 'Marksheet' table to track scores and rankings. Additionally, it provides SQL queries for creating the tables and inserting values into them.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

School Ranking Analysis.

Description
Consider an institution that wants to store the students’ details and their marks records to track their
progress. The database would contain the students’ information, marks of the students with the rank
that can be viewed, updated, and evaluated for the performance evaluation.

Objective:
The design of the database helps to easily retrieve thousands of student records.

Task to be performed:
 Write a query to create a students table with appropriate data types for student id, student first
name, student last name, class, and age where the student last name, student first name, and
student id should be a NOT NULL constraint, and the student id should be in a primary key.

Solution:

Create Database Institution;

Use Institution;

CREATE TABLE Students

(Studentid Int primary Key NOT NULL,

StudentFirstName Varchar(50) NOT NULL,

studentLastName Varchar(50) NOT NULL,

class Int,

Age Int);

 Write a query to create a marksheet table that includes score, year, ranking, class, and student id.

Solution:

Use Institution;

CREATE TABLE Marksheet (Score INT, Year Int, Ranking VARCHAR (20), Class INT, Student_Id INT);

 Write a query to insert values in students and marksheet tables.

Solution:
INSERT INTO Students (StudentID, StudentFirstName, StudentLastName, Class, Age)

INSERT INTO Marksheet (Score, Year, Ranking, Class, StudentID)

You might also like