internship allocator

26
LAB ORIENTED PROJECT OC 301 A Project Report on A DATABASE OF SCREENING AND ALLOCATION OF INTERNSHIP PROGRAM by Akash Khaitan 08DDCS547 FST THE ICFAI UNIVERSITY DEHRADUN 2 ND SEMESTER-2010-11

Upload: akash-khaitan

Post on 08-Apr-2018

225 views

Category:

Documents


0 download

TRANSCRIPT

8/7/2019 Internship Allocator

http://slidepdf.com/reader/full/internship-allocator 1/26

LAB ORIENTED PROJECT

OC 301

A Project Report

on

A DATABASE OF SCREENING AND

ALLOCATION OF INTERNSHIP PROGRAM

by

Akash Khaitan

08DDCS547

FST

THE ICFAI UNIVERSITY

DEHRADUN

2ND SEMESTER-2010-11

8/7/2019 Internship Allocator

http://slidepdf.com/reader/full/internship-allocator 2/26

CERTIFICATE

Certified that the project work entitled, A DATABASE OF SCREENING AND

  ALLOCATION OF INTERNSHIP PROGRAM has been carried out by Mr 

 Akash Khaitan , I.D. No.08DDCS547  , during the II Semester, 2010 – 2011. It is

also certified that all the modifications suggested have been incorporated in the

report. The project report partially fulfills the requirement in respect of Lab

Oriented Project – OC 301

Signature of the Instructor Signature of the Student

Date:

Place: FST, ICFAI University

Dehradun

8/7/2019 Internship Allocator

http://slidepdf.com/reader/full/internship-allocator 3/26

Acknowledgement

I would like to thank my project guide Prof. Ranjan Mishra whose constant guidance,

suggestions and encouragement helped me throughout the work.

I would also like to thank Prof. Laxman Singh Sayana for his help in understanding some of the

concepts

I would also like to thank my family and friends, who have been a source of encouragement and

inspiration throughout the duration of the project. I would like to thank the entire CSE family for

making my stay at ICFAI University a memorable one.

8/7/2019 Internship Allocator

http://slidepdf.com/reader/full/internship-allocator 4/26

Table of Contents

Abstract VI

1 Introduction 1 2 Installation & Testing 2

3 Programming Languages 3-5

3.1  PHP & MYSQL 4

3.2 HTML & CSS 5

4 Database Analysis 6-9

4.1 Student Table 6

4.2 Company Table 6-7

4.3 Preference Table 7

4.4 Internship Station Allotment 8-9

4.5 Oliveria’s Algo 18

4.6 Right-left shift Blur Algo 18

4.7 Convoluting a region 19

4.8 Selecting/Sketching an Area 20

5 Application Features 10-17

5.1 Dynamic table creation 10

5.2 Interactive Login 10-11

5.3 Student Features 11

8/7/2019 Internship Allocator

http://slidepdf.com/reader/full/internship-allocator 5/26

5.4 Administrative Features 12-17

5.4.1 Add Company 13

5.4.2 Add Students 13-14

5.4.3 Edit Company 14-15

5.4.4 Edit Students 14-15

5.4.5 Company Lists 16

5.4.6 Allotment Lists 16-17

5.4.7 Allot Companies 17

6 Future Improvements VII

7 Discussion and Conclusion VIII

8 References IX

8/7/2019 Internship Allocator

http://slidepdf.com/reader/full/internship-allocator 6/26

vi

Abstract

This is basically a web project made using PHP and MYSQL. The main idea of the project is to

allocate internship stations to students, taking their preferences and CGPA and the reducing the

manual efforts. The project works on the principle that student having higher CGPA should be

allocated the internship station first followed by lesser one. It provides complete internship

management with an internship account for each student. The MYSQL is used to link database in

order to control the registration of users, adding companies by the internship administrator, etc.

Both PHP and MYSQL are open source languages and thus run freely on other platforms.

8/7/2019 Internship Allocator

http://slidepdf.com/reader/full/internship-allocator 7/26

1

1. Introduction

A Database of Screening and Allocation of Internship Program is a web application build

under PHP and MYSQL with the purpose to allot the internship station on the basis of CGPA

and preferences and thus reduce the manual efforts in doing the same.

The application displays list of companies to the students according to the year, CGPA and

branch of the student and allow them to fill preferences. Filling of preferences is followed by

submission of preferences.

The administrator adds companies according to the year in which it would provide internship

and thus manage the company for internship of more than one year. On a specified date after

receiving all the preferences from the users the administrator allots the internship for the

students.

PHP and MYSQL are open source languages and are thus selected for the purpose. The

database department is controlled by MYSQL and the logical department is controlled by

PHP.

The tables in the project are dynamic, that is are created during the run time.

The HTML is used for the forms, and the visual styled layout is controlled by CSS. Thus

Together all four combine together to make a project.

The project has been tested under the Ubuntu

8/7/2019 Internship Allocator

http://slidepdf.com/reader/full/internship-allocator 8/26

2

2. Installation & Testing

Before we begin telling about programming languages and other concepts we must first make

our self-ready by installing the required languages in our operating system.

Both the HTML and CSS are already present in Ubuntu. So now we need a MYSQL server,

Apache server to run PHP codes, and a linking of PHP with MYSQL

This all can be achieved by installing LAMP on UBUNTU.

LAMP consists of:

•  MYSQL SERVER

•  APACHE SERVER

•  PHP

•  PHPMYADMIN

The below single line command will install LAMP requirements.

$sudo apt-get install apache2 php4 mysql-client mysql-server phpmyadmin libapache2-mod-php4

libapache2-mod-auth-mysql php4-mysql

Testing Apache server, PHP and PHP-MYSQL LINK

Just type the below tow links in separate tabs in the web browser

http://localhost/testphp.php

http://localhost/phpmyadmin

If both show the graphical page, you are ready to use

8/7/2019 Internship Allocator

http://slidepdf.com/reader/full/internship-allocator 9/26

3

3. Programming Languages

This section will in brief describe the programming languages used for the completing the

project.

Below are the programming Languages used

•  PHP

•  MYSQL

•  HTML

•  CSS

3.1 PHP & MYSQL

Here we are going to discuss the commands of MYSQL under PHP which has been used in

the project

3.1.1 Establishing a Connection

The connection to database is done using the below command shown

mysql_connect("localhost", "username", "password") or die(mysql_error());

3.1.2 Selecting the Database

The selection of the database is done using the command shown below

mysql_select_db("Database name") or die(mysql_error());

3.1.3 Creating Table

The table is created in the database using the below query

mysql_query("CREATE TABLE `table` (`field1` varchar(11) NOT NULL,`field2`

varchar(50) NOT NULL)");

8/7/2019 Internship Allocator

http://slidepdf.com/reader/full/internship-allocator 10/26

4

3.1.4 SELECT Query

The result obtained is stored in the array result

$result = mysql_query('SELECT condition FROM table ');

3.1.5 Fetching the array result

The mysql_fetch_assoc($result)

The below lines will fetch the field1 and field 2 of all the rows in the table

while ($row = mysql_fetch_assoc($result))

{

echo "<tr>";

echo "<td>".$row['field1']."</td>";

echo "<td>".$row['field2']."</td>";

echo "</tr>”;

}

3.1.6 Inserting in the table

Insertion in the table with the values as PHP variables

$add_company = mysql_query("INSERT INTO Table (field1,field2) VALUES ('$value1',

'$value2')");

3.1.7 Updating Required fields

An illustration of filed1 value is shown below

mysql_query("UPDATE table SET field1=$value WHERE condition'");

8/7/2019 Internship Allocator

http://slidepdf.com/reader/full/internship-allocator 11/26

5

3.2 HTML & CSS

Web pages are written in HTML, the web programming language that tells web browsers

how to structure and present content on a web page. In other words, HTML provides the

basic building blocks for the web.

Web pages have also become more expressive with the introduction of CSS (Cascading Style

Sheets). CSS gives programmers an easy, efficient way to define a web page’s layout and

beautify the page with design elements like colors, rounded corners, gradients, and

animation.

8/7/2019 Internship Allocator

http://slidepdf.com/reader/full/internship-allocator 12/26

6

4. Database Analysis

The chapter will deals with the database Analysis i.e. the tables required for the allocation

purpose.

This section will provide you an idea about table models assuming only one batch with

minimum required fields, the real project though have many tables for different batches and

internships which is dynamically created during run time.

4.1 Student Table

The student table should contain minimum of Id, Name and Cgpa where id is the pirmary key

and cgpa is used for allocation purpose dissucussed later

Fig 4.1 Student Table

4.2 Company Table

The Company table should contain minimum of Company’s id, name and seats where

company’s id is the primary key

8/7/2019 Internship Allocator

http://slidepdf.com/reader/full/internship-allocator 13/26

7

Fig 4.2 Company Table

4.3 Preference Table

Relation between student table and company table is created using preference table. The web

application allows the student to fill preferences which are presented below. The studentswho fill the preference first are inserted first in the table and so on

Fig 4.3 Preference Table

8/7/2019 Internship Allocator

http://slidepdf.com/reader/full/internship-allocator 14/26

8

4.4 Internship Station Allotment

The Internship station allotment is done by series of steps:-

•  Selecting all the fields in the preference table by ascending preference and descending

CGPA

The resulting table is shown below

Fig 4.4 Selected Table

8/7/2019 Internship Allocator

http://slidepdf.com/reader/full/internship-allocator 15/26

9

•  Retrieve the seats from the company table for each cid present in the selected table  

$tempid=Anyid 

$id=fetch id from the selected table and store it in a variable

If ($tempid!=$id)

{

Make flag=0

}

$tempid=$id;

•  Retrieve the seats from the company table for each cid present in the selected table  

If (seats!=0 and flag==0)

{

Make flag=1

Update seats=seats-1 in the company table

Insert the id and name of student, cid and cname in the allotment table

}

Below is the illustration of the Allotment Table

Fig 4.5 Allotment Table

8/7/2019 Internship Allocator

http://slidepdf.com/reader/full/internship-allocator 16/26

10

5. Application Features

This chapter describes the all the features incorporated in the web Application with the visual

window.

5.1 Dynamic table creation

The tables created are dynamically i.e. if the tables do not already exist; it is created during

the run time of the application

Fig 5.1 Dynamic table creation

5.2 Interactive Login

The login screen is the index screen consists of a administrator login and student login. Next

page show the graphical window

8/7/2019 Internship Allocator

http://slidepdf.com/reader/full/internship-allocator 17/26

11

Fig 5.2 Login Screen

5.3 Student Features

It basically consists of the following features:-

•  Filling up of preferences

•  Updating of preferences

The student according to the internship number, companies for filling preferences also varies

which is taken care in the project

Fig 5.3 Student IP2 preference form

8/7/2019 Internship Allocator

http://slidepdf.com/reader/full/internship-allocator 18/26

12

Fig 5.4 Student IP1 preference form

5.4 Administrative Features

The administrator has following features in the application:-

•  Add Company

•  Add Students

•  Edit Company

•  Edit Students

•  Company Lists

•  Allotment Lists

•  Allot Companies

The series of next pages describes all the administrative features in details

8/7/2019 Internship Allocator

http://slidepdf.com/reader/full/internship-allocator 19/26

13

5.4.1 Add Company

The add company button on clicking displays the form which is shown in the graphical

window below. The button register when pressed inserts the data in the company table. Thespecific branch or condition for the cgpa if required can be specified by the company.

Internship year and type determines in which company table the values should go in

* Represents necessary conditions

Fig 5.5 Add Company

5.4.2 Add Students

The student details must be entered by the administrator to assure no false data is received.

The necessary information to be filled by the administrator for a student are id, name, cgpa.

The ip type and year must be mentioned which determines the list of companies to be

displayed for preference filling.

Next page shows the graphical window

8/7/2019 Internship Allocator

http://slidepdf.com/reader/full/internship-allocator 20/26

14

Fig 5.6 Add Students

5.4.3 Edit Company

The company may increase or decrease its seat or could deny for the internship. For this

reasons, the idea of edit/update Company have come in the account.

It first searches the company, if the company is found the textbox values can be changed

5.4.4 Edit Students

The student in different year has different internship type/number with the same account or

the student may have different cgpa. So the administrator can manage all this by the edit

student button which searches the student from database and thus the value in the textbox can

be updated

Next page shows the form which searches the company and student form the tables

8/7/2019 Internship Allocator

http://slidepdf.com/reader/full/internship-allocator 21/26

15

Fig 5.7 Update Company

Fig 5.8 Update Students

8/7/2019 Internship Allocator

http://slidepdf.com/reader/full/internship-allocator 22/26

16

5.4.5 Company Lists

This option allows the administrator to see the list of company providing particular internship

along with all the details which makes this application more user-friendly

On clicking the “show company” button shown below the application generates company

table of specified IP number and year

Fig 5.9 Company Lists

5.4.6 Allotment Lists

The final allotment table can be viewed by retrieving the allotment table of specified ipnumber and year.

The same work is performed by the allotment list button, which displays forms, forms on

filling and submitting retrieves the required allotment table

Next page shows the form which on submission produces the final allotment table

8/7/2019 Internship Allocator

http://slidepdf.com/reader/full/internship-allocator 23/26

17

Fig 5.10 Allotment Lists

5.4.7 Allotment 

The Allotment of internship is done once on an announced date. The “Allot” button in the

form below allots the internship station of particular type and year submitted and displays a

table

Fig 5.11 Internship Allotment

8/7/2019 Internship Allocator

http://slidepdf.com/reader/full/internship-allocator 24/26

vii

Future Improvements

Though the project is quiet successful, there is always a scope for the improvements.

Some of the improvements to be implemented in the upcoming version

•  More Interactive outlook 

•  A Company section where the companies could directly apply for the internships

requirement along with all details. On Successful verification, the company will be

added in the record(table)

•  Improvements in the database section including indexing and other related options

•  More accurate allocation on the basis of location, CGPA, Interest of the student

•  Faculty section also to be included in the project where faculty can fill their

preferences, manage their IP account

For Administrator

•  Direct loading of the student records from .cvs format in the table

•  Multiple updating of students and company record

•  Broadcast type message sending to users

For Students

•  Profile Update option for students (Will exclude the fields which have administrative

controls)

•  Self IP Arrangement by the students will be included in the section

•  Direct message sending by the users to the administrator

8/7/2019 Internship Allocator

http://slidepdf.com/reader/full/internship-allocator 25/26

viii

Discussion and Conclusion

The project on “A Database of Screening and Allocation of Internship Program” helped me

in clearly understanding and implementing some of the database concepts.

This report describes in brief the work done in completing the task which includes Database

concepts Analysis and achieving it through PHP and MYSQL linking. It also describes about

basic HTML, CSS required in order to control the forms and page outlook respectively.

The allocation of Internship is completely based on CGPA cum Preferences. It greatly

reduces the manual efforts in allocating the internship station to the student. The application

on integration with the University Site will make its access global and will make the

Internship more flexible.

8/7/2019 Internship Allocator

http://slidepdf.com/reader/full/internship-allocator 26/26

ix

References

●  Meloni, “PHP Fast & Easy Web Development ”, Premier Press, 2nd Edition 2002

●  Silberschatz−Korth−Sudarshan, “  Database System Concepts” ,The McGraw−Hill

Companies Fourth Edition 2001

●  Alex Garrett , “Video Tutorials of PHP”

●  Lisa, “Video Tutorials Of CSS”