Report of Pupilpod

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 20

PupilPod - A Student Database Management Project

INTRODUCTION

Database:

In simple words data can be facts related to any object in consideration. Database is a
systematic collection of data. Databases support storage and manipulation of data. Databases
make data management easy. Let's discuss few examples.

1. An online telephone directory would definitely use database to store data pertaining to
people, phone numbers, other contact details, etc.
2. Your electricity service provider is obviously using a database to manage billing , client
related issues, to handle fault data, etc. Your electricity service provider is obviously
using a database to manage billing , client related issues, to handle fault data, etc.
3. Let's also consider the facebook. It needs to store, manipulate and present data related to
members, their friends, member activities, messages, advertisements and lot more.

Database Management System (DBMS) is a collection of programs which enables its


users to access database, manipulate data, reporting / representation of data. Charles
Bachmen's Integrated Data Store (IDS) is said to be the first DBMS in history. With time
database technologies evolved a lot while usage and expected functionalities of databases
have been increased immensely.

Types of DBMS

Fig. 1.1 Types of DBMS

There are 4 major types of DBMS. Let's look into them in detail.

1.1. Hierarchical

Dept. of IS&E,AMCEC Page1


PupilPod - A Student Database Management Project

This type of DBMS employs the "parent-child" relationship of storing data. This type of
DBMS is rarely used nowadays. Its structure is like a tree with nodes representing
records and branches representing fields. The windows registry used in Windows XP is
an example of a hierarchical database. Configuration settings are stored as tree structures
with nodes.

1.2. Network DBMS


This type of DBMS supports many-to many relations. This usually results in complex
database structures. RDM Server is an example of a database management system that
implements the network model.

1.3. Relational DBMS


This type of DBMS defines database relationships in form of tables, also known as
relations. Unlike network DBMS, RDBMS does not support many to many
relationships. Relational DBMS usually have pre-defined data types that they can
support. This is the most popular DBMS type in the market. Examples of relational
database management systems include MySQL, Oracle, and Microsoft SQL Server
database.

1.4. Object Oriented DBMS


This type supports storage of new data types. The data to be stored is in form of objects.
The objects to be stored in the database have attributes (i.e. gender, ager) and methods
that define what to do with the data. PostgreSQL is an example of an object oriented
relational DBMS.

Databases have evolved since their inception in the 1960s, beginning with hierarchical
and network databases, through the 1980s with object-oriented databases, and today with
SQL and NoSQL databases and cloud databases. Since DBMSs comprise a significant
market, computer and storage vendors often take into account DBMS requirements in their
own development plans.

Dept. of IS&E,AMCEC Page2


PupilPod - A Student Database Management Project

Databases and DBMSs can be categorized according to the database model(s) that they
support (such as relational or XML), the type(s) of computer they run on (from a server
cluster to a mobile phone), the query language(s) used to access the database (such as SQL or
XQuery), and their internal engineering, which affects performance, scalability, resilience,
and security.

Physically, database servers are dedicated computers that hold the actual databases and
run only the DBMS and related software. Database servers are usually multiprocessor
computers, with generous memory and RAID disk arrays used for stable storage. RAID is
used for recovery of data if any of the disks fail. Hardware database accelerators, connected
to one or more servers via a high-speed channel, are also used in large volume transaction
processing environments. DBMSs are found at the heart of most database applications.
DBMSs may be built around a custom multitasking kernel with built-in networking support,
but modern DBMSs typically rely on a standard operating system to provide these functions.
Over the past decade, other specialized fields have been developed like information
visualization and scientific visualization more concerned with "the visualization of three
dimensional phenomena (architectural, meteorological, medical, biological, etc.) where the
emphasis is on realistic renderings of volumes, surfaces, illumination sources, and so forth,
perhaps with a dynamic (time) component".

Today's IT departments that need to process unstructured data or data sets with a highly
variable structure may wish to consider a NoSQL DBMS. Applications that require high-
speed transactions and rapid response rates, or that perform complex analytics on data in real
time or near-real time, can benefit from an in-memory DBMS. And, in some cases, IT
departments will want to consider combining multiple database technologies for some
processing needs.

Dept. of IS&E,AMCEC Page3


PupilPod - A Student Database Management Project

Applications:

Databases are used to support internal operations of organizations and to underpin online
interactions with customers and suppliers (see Enterprise software).

Databases are used to hold administrative information and more specialized data, such as
engineering data or economic models. Examples of database applications include computerized
library systems, flight reservation systems, computerized parts inventory systems, and many
content management systems that store websites as collections of WebPages in a database.

General-purpose and special-purpose DBMSs

A general-purpose DBMS may introduce unnecessary overhead. Therefore, many


systems use a special-purpose DBMS. A common example is an email system that performs
many of the functions of a general-purpose DBMS such as the insertion and deletion of messages
composed of various items of data or associating messages with a particular email address; but
these functions are limited to what is required to handle email and don't provide the user with all
of the functionality that would be available using a general-purpose DBMS.

Application software can often access a database on behalf of end-users, without


exposing the DBMS interface directly. Application programmers may use a wire protocol
directly, or more likely through an application programming interface. Database designers and
database administrators interact with the DBMS through dedicated interfaces to build and
maintain the applications' databases, and thus need some more knowledge and understanding
about how DBMSs operate and the DBMSs' external interfaces and tuning parameters.

Dept. of IS&E,AMCEC Page4


PupilPod - A Student Database Management Project

SYSTEM SPECIFICATION

Hardware Requirements:

The following are the minimum Hardware Requirements

Processor : Intel Core i5

RAM : Minimum of 2GB

Hard Disk : Minimum of 50GB

Software Requirements:

Operating System : Windows 8(64 bit)

Development Environment : Microsoft Visual Studio 2013

Scripting Language : ASP.NET 4.5

Web Server : Internet Information Service(IIS)

Browser : Google Chrome, Firefox, IE

User Requirements:

The web application work based on the login details of the students and the faculty. The
operations can only be done after the student/faculty are logged in and hence it is a role based
access web application.

As a student

 Keep track of his attendance.


 Keep track of his internal marks.
 Update his / her data

Dept. of IS&E,AMCEC Page5


PupilPod - A Student Database Management Project

As a faculty

 Enter internal marks of student for each internals


 Enter attendance record of each individual student
 Modify internal marks post revaluation
 Initiate bulk SMS feature to notify students about their progress in their academics

Dept. of IS&E,AMCEC Page6


PupilPod - A Student Database Management Project

DESIGN

Description:

ASP.NET is an open-source server-side web application framework designed for web


development to produce dynamic web pages. It was developed by Microsoft to allow
programmers to build dynamic web sites, web applications and web services.

ASP.NET Web pages, known officially as Web Forms, are the main building blocks for
application development in ASP.NET. There are two basic methodologies for Web Forms, a web
application format and a web site format. Web applications need to be compiled before
deployment, while web sites structures allows the user to copy the files directly to the server
without prior compilation. Web forms are contained in files with a ".aspx" extension; these files
typically contain static (X)HTML markup or component markup. The component markup can
include server-side Web Controls and User Controls that have been defined in the framework or
the web page.

For example, a textbox component can be defined on a page as <asp:textbox id='myid'


runat='server'>, which is rendered into a html input box. Additionally, dynamic code, which
runs on the server, can be placed in a page within a block <% -- dynamic code -- %>, which is
similar to other Web development technologies such as PHP, JSP, and ASP. With ASP.NET
Framework 2.0, Microsoft introduced a new code-behind model that lets static text remain on the
.aspx page.

Code-behind model:

Microsoft recommends dealing with dynamic program code by using the code-behind
model, which places this code in a separate file or in a specially designated script tag. Code-
behind files typically have names like "MyPage.aspx.cs" or "MyPage.aspx.vb" while the page
file is MyPage.aspx (same filename as the page file (ASPX), but with the final extension
denoting the page language).

Dept. of IS&E,AMCEC Page7


PupilPod - A Student Database Management Project

In the web application format, the pagename.aspx.cs is a partial class that is linked to the
pagename.designer.cs file. The designer file is a file that is auto-generated from the ASPX page
and allows the programmer to reference components in the ASPX page from the CS page
without having to declare them manually, as was necessary in ASP.NET versions before version
2.

ASP.NET's code-behind model marks a departure from Classic ASP in that it encourages
developers to build applications with separation of presentation and content in mind. In theory,
this would allow a Web designer, for example, to focus on the design markup with less potential
for disturbing the programming code that drives it. This is similar to the separation of the
controller from the view in model–view–controller (MVC) frameworks.

Functions Used:

 Page_Load( )
ASP.NET has a feature called "AutoEventWireup" - this feature allows you to create
methods that have the EventHandler signature with names like Page_Load and the
runtime will wire up the event from the parent page to the method in your class.
Basically the runtime does this on your behalf:
this.Load += this.Page_Load;

 master_Page_PreLoad()
Page has loaded ViewState for all controls. protected void Page_PreLoad(object
sender, EventArgs e) is the function definition.

 SqlDataAdapter()

DataAdapter will acts as a Bridge between DataSet and database. This dataadapter
object is used to read the data from database and bind that data to dataset. Dataadapter
is a disconnected oriented architecture.

 SqlCommand() & SqlConnection()

Dept. of IS&E,AMCEC Page8


PupilPod - A Student Database Management Project

SqlConnection and SqlCommand are classes of a connected architecture and found in


the System.Data.SqlClient namespace. The SqlConnection class makes the
connection with the database. Further this connection (database connection) is used
by the SqlCommand to work with that database. The SqlCommand class is used to
execute the SQL statements.

 DataSet()
The DataSet, which is an in-memory cache of data retrieved from a data source, is a
major component of the ADO.NET architecture.

Dept. of IS&E,AMCEC Page9


PupilPod - A Student Database Management Project

IMPLEMENTATION AND CODING

User Defined Functions:


In our project we have defined some of the functions.

 GetInternals()
Connections to the database is done where the stored procedure
"usp_getInternalsDetails" is called to get the results of the student accepting the
semester & USN as the parameters for the internal marks to be retrieved.

 Add_Attendance()
"usp_InsertStudentAttendance" is being used which would insert Subject & USN
into the table. The entered details are the entries for which the student bearing a
particular USN is absent.

 Calendar1_DayRender( )
<ASP.Calendar> is used to render a calendar with all the necessary input on how the
calendar should appear is added in the .aspx page. While in code-behind, the query is
executed to get the attendance of the student. The date for which the student is absent
is shown in red with the subjects added while his / her presence is recorded in green.

 LogIn()

Accepts the username & password provided for each student / faculty member to
login to their accounts. The SQL connections are made before running the queries.

 Logout_Click()

Closes the session and redirects the users to the homepage i.e. Default.aspx

Dept. of IS&E,AMCEC Page10


PupilPod - A Student Database Management Project

 Enter_Internals()
Helps in entering the internal assessment marks for each & every student. The stored
procedure "usp_insertInternalsDetails" is called that accepts Subject, Semester,
USN & Marks as its parameters and will be added into the "Internals" table on
successful execution.

 Modify_Internals()
Accepts Subject, Semester, USN & Marks as its parameters and modifies the internals
table if there's a possibility of changing internals marks post revaluation.

Dept. of IS&E,AMCEC Page11


PupilPod - A Student Database Management Project

SOURCE CODE

 Check whether the user is logged in. Here our session variable is "name"

if (Session["name"] == null)
{
Response.Redirect("Default.aspx");
}

 "DefaultConnection" is our SQL connection that will be made to the database. It


contains the database name, username, password & the server where the database is
stored.
SqlConnection constr = new
SqlConnection(ConfigurationManager.ConnectionStrings["DefaultConnection"].Conne
ctionString);

 <ASP:Calendar> is the client side ASP calendar view that is used to display the
calendar in the front-end. Default, the current month calendar will be displayed.
<asp:Calendar ID="Attendance" runat="server" BackColor="White"
BorderColor="Black" Font-Names="Verdana"
Font-Size="9pt" ForeColor="Black" Height="450px" NextPrevFormat="ShortMonth"
Width="100%" ondayrender="Calendar1_DayRender" BorderStyle="Solid"
CellSpacing="1">
<DayHeaderStyle Font-Bold="True" Font-Size="10pt" ForeColor="#333333"
Height="8pt" />
<DayStyle BackColor="#ADFF2F" />
<NextPrevStyle Font-Bold="True" Font-Size="14pt" ForeColor="white" />
<OtherMonthDayStyle ForeColor="#f4f4f4" />
<SelectedDayStyle BackColor="#333399" ForeColor="White" />
<TitleStyle BackColor="green" Font-Bold="True" Font-Size="20pt"
ForeColor="White" BorderStyle="Solid" />
<TodayDayStyle BackColor="#999999" ForeColor="White" />
</asp:Calendar>

Dept. of IS&E,AMCEC Page12


PupilPod - A Student Database Management Project

 Redirect to the homepage once the user clicks on logout button.

Session["name"] = null;
Response.Redirect("Default.aspx");

 Call for stored procedure to get the internal marks. Accepts USN & Semester as its
parameters with the datatypes mentioned explicitly.
SqlCommand getinternals = new SqlCommand("usp_getInternalsDetails", constr);
getinternals.CommandType = CommandType.StoredProcedure;
getinternals.Parameters.Add("@USN", SqlDbType.NVarChar).Value =
Session["name"].ToString();
getinternals.Parameters.Add("@Semester", SqlDbType.Int).Value = Semester.Text;

 Call for stored procedure "usp_insertInternalsDetails" is made with parameters


Subject, Semester, USN, internals selected, internal marks. Datatypes are to be
entered explicitly.
SqlCommand insertinternals = new SqlCommand("usp_insertInternalsDetails",
constr);
insertinternals.CommandType = CommandType.StoredProcedure;
insertinternals.Parameters.Add("@Subject", SqlDbType.NVarChar).Value =
Subject.Text;
insertinternals.Parameters.Add("@Semester", SqlDbType.Int).Value =
Int32.Parse(Semester.Text);
insertinternals.Parameters.Add("@USN", SqlDbType.NVarChar).Value =
studentUSN.Text;
insertinternals.Parameters.Add("@InternalsCount", SqlDbType.NVarChar).Value =
internalsselected;
insertinternals.Parameters.Add("@Marks", SqlDbType.Int).Value =
Int32.Parse(InternalMarks.Text);
int j = insertinternals.ExecuteNonQuery();

 Call for stored procedure "usp_InsertStudentAttendance" is made with parameters


Subject, USN selected from dropdown & default value is 1 which means only
absentees are to be added.
SqlCommand insertattendance = new SqlCommand("usp_InsertStudentAttendance",
constr);
insertattendance.CommandType = CommandType.StoredProcedure;
insertattendance.Parameters.Add("@Subject", SqlDbType.NVarChar).Value =
Subject.Text;

Dept. of IS&E,AMCEC Page13


PupilPod - A Student Database Management Project

insertattendance.Parameters.Add("@USN", SqlDbType.NVarChar).Value =
USNSelectID.SelectedItem.Text;
insertattendance.Parameters.Add("@IsAbsent", SqlDbType.NVarChar).Value = 1;
int k = insertattendance.ExecuteNonQuery();

Dept. of IS&E,AMCEC Page14


PupilPod - A Student Database Management Project

SNAPSHOTS

Fig 1. Welcome Screen

Fig 2. Login Screen Popup Window

Dept. of IS&E,AMCEC Page15


PupilPod - A Student Database Management Project

Fig 3. My Accounts page of student bearing USN 1AM15IS020, calendar with absent entry
along with internal assessment marks of 5th semester is displayed.

Fig 4. Faculty Latha has logged in to her account and has marked the student bearing
1AM15IS022 as absent.

Dept. of IS&E,AMCEC Page16


PupilPod - A Student Database Management Project

Fig 5. Faculty Latha has retrieved the marks of student bearing the USN 1AM15IS053.

Fig 6. Faculty Latha can select USN from the above displayed dropdown and once the submit button is clicked, the
student bearing the selected USN will be marked absent

Dept. of IS&E,AMCEC Page17


PupilPod - A Student Database Management Project

Fig 7. Faculty Latha can enter USN, enter marks & select which internal marks it is to enter the same data in
internals table bearing the entered USN.

Dept. of IS&E,AMCEC Page18


PupilPod - A Student Database Management Project

CONCLUSION
Using MSSQL we hereby created a student database management system. This project
witnesses the usages of various stored procedures and little chunks of code that would help us in
retrieving, inserting and modifying the data of any student at any point of time. This project
implements MSSQL database as the database management tool where the stored procedures &
trigger is written. The ASP.NET is used as for development of the project because of client-
server interactions are to be made. Microsoft Visual Studio is used as the development
environment & IIS is the server to host this web application on the server side. The project is
compiled in .NET 4.5 version.

The project successfully shows the login for both student & faculty. As a student he / she
can retrieve the data while as a faculty he / she can enter, modify & update student's details at
any point of time.

Thus we can create programs with higher complexity using the various inbuilt functions
in ASP.NET.

Dept. of IS&E,AMCEC Page19


PupilPod - A Student Database Management Project

REFERENCES

 Beginning ASP.NET 4.5: in C# and VB by Imar Spaanjaars


 Professional ASP.NET 4.5 in C# and VB by Christian Wenz, Jason N. Gaylord,
Pranav Rastogi, Scott Hanselman, and Todd Miranda
 Fast ASP.NET Websites by Dean Alan Hume
 ASP.NET: The Complete Reference by Matthew MacDonald

ONLINE REFERENCES

 https://msdn.microsoft.com/en-us/
 https://www.aspsnippets.com/
 https://www.dotnetperls.com
 http://www.c-sharpcorner.com/

Dept. of IS&E,AMCEC Page20

You might also like