SCHOOL MANAGEMENT SYSTEM DATABASE PROJECT

                  1. SCHOOL MANAGEMENT SYSTEM DATABASE PROJECT
                  2. Entity Relationship diagram (ERD)
                  1. SQL Create table statements

CREATE TABLE student(id int auto_increment=TRUE primary_key=TRUE,name varchar(100), roll_no varchar(10), section_id int,class_id int)

CREATE TABLE fee (id int auto_increment=TRUE primary_key=TRUE, amountVarchar(100), student_id int)

CREATE TABLE teacher(id int auto_increment=TRUE primary_key=TRUE,name varchar(100))

CREATE TABLE salary(id int auto_increment=TRUE primary_key=TRUE,amount varchar(10), teacher_id, int)

CREATE TABLE class(id int auto_increment=TRUE primary_key=TRUE, namevarchar(30))

CREATE TABLE staff(iid int auto_increment=TRUE primary_key=TRUE, namevarchar(100), class_id int)

CREATE TABLE section(id int auto_increment=TRUE primary_key=TRUE,name varchar(100), subject varchar(50), teacher_id int)

                  1. SQL INSERT Statements

INSERT INTO class (name) values(‘Computer Science class’)

INSERT INTO class (name) values(‘Civil Engineering class’)

INSERT INTO class (name) values(‘Architecture class’)

INSERT INTO teacher (name, department) values(‘Dorcas James’,‘Comp Sci’)

INSERT INTO teacher (name, department) values(‘Stella Immaculate’,‘Mathematics’’)

INSERT INTO teacher (name, department) values(‘Sophie karen’,‘Physics’)

INSERT INTO salary(amount. teacher_id) values(‘100000’, 1 )

INSERT INTO salary(amount. teacher_id) values(‘12000’, 2 )

INSERT INTO salary(amount. teacher_id) values(‘11000’, 3 )

INSERT INTO section(name, subject, teacher_id) values (‘section 1’,‘Networking’, 1)

INSERT INTO section(name, subject, teacher_id) values (‘section 2’,‘Networking’, 2)

INSERT INTO section(name, subject, teacher_id) values (‘section 3’,‘Networking’, 3)

INSERT INTO student (name, roll_no, section_id, class_id) values(‘Benida’, 1, 1, 1)

INSERT INTO student (name, roll_no, section_id, class_id) values(‘Becky’, 2, 2, 2)

INSERT INTO student (name, roll_no, section_id, class_id) values(Bancy, 3, 3, 3)

INSERT INTO fee (amount, student_id) values (‘89000’, 1)

INSERT INTO fee (amount, student_id) values (‘78000’, 2)

INSERT INTO fee (amount, student_id) values (‘56000’, 3)

                  1. SQL QUERIES

SELECT name, roll_no from student

SELECT teacher.id, teacher.name, salary.amount from teacher INNERJOIN salary on teacher.id=salary.teacher_id where salary.amount &gt80000