Uploaded by GUGGILLA ANILKUMAR

DBMS3

advertisement
G.ANIL KUMAR
180031050
S-1
Student Performance Analysis
A good Automating Student Performance Analysis system will automate user’s activities,
processes and practices, as well as increase their ability to handle a greater capacity of
events. This is an efficient Automating Student Performance Analysis system software
project that serves the functionality of an event manager. The event manager is the
person who plans and executes the event, taking responsibility for the creative, technical
and logistical elements. This includes overall event design, C, Java and Extra Curricular
Activities. The system allows only registered users to login and new users are allowed to
register on the application. The project provides most of the basic functionality required
for an event. It allows the user to select from a list of event types. Once the user enters
an event type the system then allows the user to select the date and time of event, place
and the event equipment’s. All this data is logged in the database and the user is given a
receipt number for his booking. This data is then sent to the admin and they may interact
with the client as per his requirements and his contact data stored in the database.
Data types and its description
1.Integer: one optional sign character (+ or -) followed by at least one digit (0-9). Leading
and trailing blanks are ignored. No other character is allowed.
2.Varchar: It is used to store alpha numeric characters. In this data type we can set the
maximum number of characters up to 8000 ranges by defaults SQL server will set the size
to 50 characters range.
3.Date: The DATE data type accepts date values. No parameters are required when
declaring a DATE data type. Date values should be specified in the form: YYYY-MMDD. However, Point Base will also accept single digits entries for month and day values.
4.Time: The TIME data type accepts time values. No parameters are required when declaring
TIME data type. Date values should be specified in the form: HH:MM: SS. An optional
fractional value can be used to represent nanoseconds
Tables used in this Project:
1) User Registration
2) User Login
3) Event Booking
4) Event Manager Login
5) Events
Code:
I)Creation of User Registration table
CREATE TABLE UserRegistration(
FirstName varchar(255) NOT NULL,
LastName varchar(255) NOT NULL,
Email_Id varchar(255) NOT NULL,
College_Name varchar(255) NOT NULL,
College_Id int NOT NULL,
Age int NOT NULL,
Address varchar(255) NOT NULL,
City varchar(255) NOT NULL,
Password varchar(255) NOT NULL
);
II)creation of User Login Table
CREATE TABLE UserLogin(
Reg_Id varchar(225) NOT NULL,
Password varchar(255) NOT NULL
);
III)Creation of Event Booking Table
CREATE TABLE EventBooking(
Sl_NO int NOT NULL,
Reg_Id varchar(225) NOT NULL,
Event_Type varchar(255) NOT NULL,
Event_Name varchar(255) NOT NULL,
EVent_Venue varchar(255) NOT NULL,
Event_Equipments varchar(255) NOT NULL,
Event_Date Date,
Contact_Number int NOT NULL
);
IV)Creation of Event Manager Login Table
CREATE TABLE EventManagerLogin(
Email_Id varchar(225) NOT NULL,
Password varchar(225) NOT NULL
);
V)Creation of Events Table
CREATE TABLE Events(
Event_Type varchar(255) NOT NULL,
Event_Name varchar(255) NOT NULL,
EVent_Venue varchar(255) NOT NULL,
Event_Equipments varchar(255) NOT NULL,
Event_Date Date,
Contact_Number int NOT NULL
);
Insertion of Data into the tables
INSERT INTO UserRegistration VALUES ('Anil Kumar', 'Guggilla',
'[email protected]', 'K.L.U', '180031050', '20', 'Vaddeswaram', 'Guntur',
'AnilKumar_12');
INSERT INTO UserRegistration VALUES ('Manikanta', 'Parnam', '[email protected]',
'K.L.U', '180031051', '19', 'Krishnalanka', 'vijayawada', 'Manikanta_12');
INSERT INTO UserRegistration VALUES ('Siddhardha', 'G', '[email protected]',
'K.L.U', '180031052', '18', 'Mirchiyard', 'Guntur', 'Siddhardha_12');
INSERT INTO UserRegistration VALUES ('Venkat', 'Kolusu', '[email protected]',
'K.L.U', '180031053', '20', 'Kolanakonda', 'Guntur', 'Venkat_12');
INSERT INTO UserRegistration VALUES ('Nithin', 'D', '[email protected]', 'K.L.U',
'180031054', '20', 'Tadepalli', 'Vijayawada', 'Nithin_12');
INSERT INTO UserLogin VALUES ('1', 'AnilKumar_12');
INSERT INTO UserLogin VALUES ('2', 'Manikanta_12');
INSERT INTO UserLogin VALUES ('3', 'Siddhardha_12');
INSERT INTO UserLogin VALUES ('4', 'Venkat_12');
INSERT INTO UserLogin VALUES ('5', 'Nithin_12');
INSERT INTO EventBooking VALUES ('101', '1', 'Technical', 'Flipit', 'c-ground floor lab',
'computers with internet', '2020/10/22', '6303525045');
INSERT INTO EventBooking VALUES ('102', '2', 'Creative', 'Drawing', 'c-lobby', 'Drawing sheets
along with pencils and colour pencils', '2020/10/21', '6303525944');
INSERT INTO EventBooking VALUES ('103', '3', 'Nontechnical', 'Singing', 'R&D Auditorium',
'Mics', '2020/10/22', '6303528944');
INSERT INTO EventBooking VALUES ('104', '4', 'Technical', 'Flutter_workshop', 'Peacock Hall',
'computers with internet', '2020/10/20', '8465047517');
INSERT INTO EventBooking VALUES ('105', '5', 'Nontechnical', 'Dancing', 'K.L.U_street', 'Music
speakers', '2020/10/21', '6356489789');
INSERT INTO EventManagerLogin VALUES ('[email protected]', 'Techie_!2');
INSERT INTO EventManagerLogin VALUES ('[email protected]', 'Samantha_!2');
INSERT INTO EventManagerLogin VALUES ('[email protected]', 'Siddhu_!2');
INSERT INTO Events VALUES ('Technical', 'Flipit', 'c-ground floor lab', 'computers with internet',
'2020/10/22', '6303525045');
INSERT INTO Events VALUES ('Creative', 'Drawing', 'c-lobby', 'Drawing sheets along with
pencils and colour pencils', '2020/10/21', '6303525944');
INSERT INTO Events VALUES ('Nontechnical', 'Singing', 'R&D Auditorium', 'Mics', '2020/10/22',
'6303528944');
INSERT INTO Events VALUES ('Technical', 'Flutter_workshop', 'Peacock Hall', 'computers with
internet', '2020/10/20', '8465047517');
INSERT INTO Events VALUES ('Nontechnical', 'Dancing', 'K.L.U_street', 'Music speakers',
'2020/10/21', '6356489789');
Screen shots of Excecution of Tables
SELECT * FROM UserRegistration;
SELECT * FROM UserLogin;
SELECT * FROM EventBooking;
SELECT * FROM EventManagerLogin;
SELECT * FROM Events;
Screen shots of Excecution of Queries:
1.Find the minimum and maximum age of the users who need to conduct the event
SELECT MIN(Age) from UserRegistration;
SELECT MAX(Age) from UserRegistration;
2.Join the Passwords and serial numbers of the users based on the registration id they have
using Inner Join
SELECT EventBooking.Sl_NO, UserLogin.Password
FROM UserLogin
INNER JOIN EventBooking ON UserLogin.Reg_Id=EventBooking.Reg_Id;
3.Join the Passwords and serial numbers of the users based on the registration id they have
using Left Join
SELECT UserLogin.Password, EventBooking.Sl_NO
FROM EventBooking
LEFT JOIN UserLogin ON EventBooking.Reg_Id = UserLogin.Reg_Id
ORDER BY UserLogin.Password;
4.Display all the email ids of users and eventmanagers
SELECT Email_Id FROM UserRegistration
UNION
SELECT Email_Id FROM EventManagerLogin
ORDER BY Email_Id;
5.Count how many number of event mangers mail id’s are present
SELECT COUNT(Email_Id)
FROM EventManagerLogin;
6.Find the User’s age average ?
SELECT AVG(Age)
FROM UserRegistration;
7.Count how many different types of events are present arranged in an order
SELECT COUNT(Sl_NO), Event_Type
FROM EventBooking
GROUP BY Event_Type;
8.Find what are the types of events greater than one
SELECT COUNT(Sl_NO), Event_Type
FROM EventBooking
GROUP BY Event_Type
HAVING COUNT(Sl_NO) > 1 ;
]
FINAL OUTPUT FOR TOTAL CODE:
Download