You are on page 1of 25

Hostel Management System

CHAPTER 1

INTRODUCTION
1.1. Introduction to DBMS

Database is a collection of related data. DBMS came into existence in 1960 by


Charles. Again in 1960 IBM brought IMS-Information management system. In 1970
Edgor Codd at IBM came with new database called RDBMS. In 1980 then came SQL
Architecture- Structure Query Language. In 1980 to 1990 there were advances in DBMS
e.g. DB2, ORACLE. A database has the following implicit properties:

 A database represents some aspect of the real world, sometimes called the miniworld
or the Universe of Discourse (UoD). Changes to the miniworld are reflected in the
database.
 A database is a logically coherent collection of data with some inherent meaning. A
random assortment of data cannot correctly be referred to as a database.
 A database is designed, built, and populated with data for a specific purpose. It has an
intended group of users and some preconceived applications in which these users are
interested.

In other words, a database has some source from which data is derived, some degree
of interaction with events in the real world, and an audience that is actively interested in
its contents.

Metadata (meta data, or sometimes meta information) is "data about data", of any sort
in any media. An item of metadata may describe a collection of data including multiple
content items and hierarchical levels, for example a database schema. In data processing,
metadata is definitional data that provides information about or documentation of other
data managed within an application or environment. The term should be used with
caution as all data is about something, and is therefore metadata.

A database management system (DBMS) is a collection of programs that enables


users to create and maintain database. The DBMS is a general purpose software system
that facilitates the process of defining, constructing, manipulating and sharing databases
among various users and applications.

Dept. of CSE, SCE Page 1


Hostel Management System

Defining a database specifying the database involves specifying the data types,
constraints and structures of the data to be stored in the database. The descriptive
information is also stored in the database in the form database catalogue or dictionary; it
is called meta-data. Manipulating the data includes the querying the database to retrieve
the specific data. An application program accesses the database by sending the queries or
requests for data to DBMS. The important function provided by the DBMS includes
protecting the database and maintain the database.

End users

External view
…… External view
External Level
External/Conceptual
Mapping

Conceptual Schema Conceptual Level


Conceptual/Internal
Mapping
Internal Schema Internal Level

Stored Database

Figure 1.1: Three schema architecture

The figure 1.1 shows the Three schema architecture of Database Management
System, The Three schema architecture consists of three levels of the architecture:

 External Level:
The external level is the view that the individual user of the database has. This
view is often a restricted view of the database and the same database may provide
a number of different views for different classes of users. In general, the end users
and even the application programmers are only interested in a subset of the
database.

Dept. of CSE, SCE Page 2


Hostel Management System

 Conceptual Level:
The conceptual view is the information model of the enterprise and contains the
view of the whole enterprise without any concern for the physical implementation.
The conceptual view is the overall community view of the database and it includes
all the information that is going to be represented in the database.
 Internal Level:
The internal view is the view about the actual physical storage of data. It describes
what data is stored in database and how.
 The three schema architecture is a convenient tool with which the user can
visualize the schema levels in a database system. DBMS must transform a request
specified on an external schema into a request against conceptual schema and then
into a request on an internal schema for processing over a stored database and the
reverse should be done for retrieving the data. The process of transforming
requests and results between levels are called mapping.

1.2. Overview of the project

Project is related to Hostel Management System.


• The project maintains two levels of users: -
• Administrator Level and Students Level
• Front end is designed using HTML and MySQL is used for Back end.
• Main features available in this project are: -
• To View of all the student database stored.
• Enabling students to book rooms in hostel.
• Admin can insert students, rooms and Courses and can view the student’s
entry into the hostel.
• The student can also view its details that he/she had mentioned and can also
update its entries.

1.2.1. Problem statement:

To maintain and manipulate the data to be stored in the Hostel Management


database system.
Dept. of CSE, SCE Page 3
Hostel Management System

1.2.2. Objectives of the project:


 The main objective behind this project is to promote paperless data storage and
its maintenance and a move towards digital advancement of data.
 Less retrieval time of project details from vast data.
 More secure as data is stored in a database and can be accessed only by
authorized person. Student can view their details instantly.

Dept. of CSE, SCE Page 4


Hostel Management System

CHAPTER 2
SYSTEM DESIGN AND METHODOLOGY
The main software used are
1. HTML
2. MYSQL
3. CSS
4. JAVASCRIPT

2.1.1 HTML
• HTML stands for Hypertext Markup Language, it is the standard markup
language for creating web pages and web applications. With Cascading Style
Sheets (CSS) and JavaScript it forms a triad of cornerstone technologies for
the World Wide Web.
• Web browsers receive HTML documents from a web server or from local
storage and render them into multimedia web pages. HTML describes the
structure of a web page semantically and originally included cues for the
appearance of the document.
• HTML elements are the building blocks of HTML pages, with HTML constructs,
images and other objects, such as interactive forms, may be embedded into
the rendered page.
• It provides a means to create structured documents by denoting structural
semantics for text such as headings, paragraphs, lists, links, quotes and other
items. HTML elements are delineated by tags, written using angle brackets.
Browsers do not display the HTML tags but use them to interpret the content
of the page.

Dept. of CSE, SCE Page 5


Hostel Management System

2.1.2 MYSQL SERVER


• It is an open-source relational database management system (RDBMS). Its
name is a combination of "My", the name of co-founder Michael Widenius 's
daughter, and " SQL ", the abbreviation for Structured Query Language.
• The MySQL development project has made its source code available under
the terms of the GNU General Public License, as well as under a variety of
proprietary agreements.
• MySQL was owned and sponsored by a single for-profit firm, the Swedish
company MySQL AB, now owned by Oracle Corporation. For proprietary use,
several paid editions are available, and offer additional functionality.
• The MySQL server package will install the MySQL database server which can
interact with using a MySQL client. User can use the MySQL client to send
commands to any MySQL server; on a remote

• computer The MySQL server is used to persist the data and provide a query
interface for it (SQL). The MySQL clients purpose is to allow you to use that
query interface. The client package also comes with utilities that allows you
to easily backup/restore data and administer the server.
• MySQL is a central component of the LAMP open-source web application
software stack (and other " AMP " stacks). LAMP is an acronym for " Linux,
Apache, MySQL, Perl / PHP / Python ".
Applications that use the MySQL database include: TYPO3, MODx, Joomla,
WordPress, phub, Mob, and Drupal. MySQL is also used in many high-profile,
large-scale websites, including Google (though not for searches), Facebook,
Twitter, Flickr, and YouTube.

2.1.3 CASCADING STYLE SHEETS (CSS)


• It is a style sheet language used for describing the presentation of a
document written in a markup language. Although most often used to set
the visual style of web pages and user interfaces written in HTML, the

Dept. of CSE, SCE Page 6


Hostel Management System

language can be applied to any document, including plain XML, SVG and
XUL, and is applicable to rendering in speech, or on other media.
• Along with HTML and JavaScript, CSS is a cornerstone technology used by
most websites to create visually engaging webpages, user interfaces for
web applications, and user interfaces for many mobile applications.
• CSS is designed primarily to enable the separation of presentation and
content, including aspects such as the layout, colors, and fonts. This
separation can improve content accessibility, provide more flexibility and
control in the specification of presentation characteristics, enable multiple
HTML pages to share formatting by specifying the relevant CSS in a
separate .CSS file, and reduce complexity and repetition in the structural
content. Separation of formatting and content makes it possible to present
the same markup page in different styles.

2.1.4 JAVASCRIPT
• It is often abbreviated as JS, is a high-level, dynamic, weakly typed,
prototype-based, multiparadigm, and interpreted programming language.
• Alongside HTML and CSS, JavaScript is one of the three core technologies of
World Wide Web content production. It is used to make webpages
interactive and provide online programs, including video games.
• The majority of websites employ it, and all modern web browsers support it
without the need for plug-ins by means of a built-in JavaScript engine. Each
of the many JavaScript engines represent a different implementation of
JavaScript, all based on the ECMAScript specification, with some engines not
supporting the spec fully, and with many engines supporting additional
features beyond
ECMA.

• As a multi-paradigm language, JavaScript supports event-driven, functional,


and imperative programming styles. It has an API for working with text,

Dept. of CSE, SCE Page 7


Hostel Management System

arrays, dates, regular expressions, and basic manipulation of the DOM, but
the language itself does not include any I/O, such as networking,

• storage, or graphics facilities, relying for these upon the host environment in
which it is embedded. Initially only implemented client-side in web
browsers, JavaScript engines are now embedded in many other types of host
software, including server-side in web servers and databases, and in nonweb
programs such as word processors and PDF software, and in runtime
environments that make JavaScript available for writing mobile and desktop
applications, including desktop widgets.

2.1.5 PHP
• It is a server-side scripting language designed primarily for web development
but also used as a general-purpose programming language.
• PHP was originally created by Rasmus Lerdorf in 1994, the PHP reference
implementation is now produced by The PHP Development Team.
• PHP stands for the acronym: Hypertext Preprocessor.
• PHP code may be embedded into HTML or HTML5 markup, or it can be used
in combination with various web template systems, web content
management systems and web frameworks. PHP code is usually processed by
a PHP interpreter implemented as a module in the web server or as a
Common Gateway Interface (CGI) executable. The web server software
combines the results of the interpreted and executed PHP code, which may
be any type of data, including images, with the generated web page.
• PHP code may also be executed with a command-line interface (CLI) and can
be used to implement standalone graphical applications.

Dept. of CSE, SCE Page 8


Hostel Management System

HTML APPLICATION
/BROWSER
USER LOGIN

CHANGE
DASHBOARD PROFILE BOOK DETAILS
PASSWORD

ADMIN

DASHBOARD COURSES ROOMS REGISTRATIONS STUDENTS INFO.

JDBC DRIVER
XAMPP
SERVER

DATABASE
(MYSQL)
DATABASE
TABLES

Fig 2.1 System Architecture of Hostel Management System

Dept. of CSE, SCE Page 9


Hostel Management System

SYSTEM DESIGN
2.2 ER DIAGRAM

Id Uname Email Pwd


eme

Admin
1 1 1 rno
Allows-for Roomno
1 1 N Id
Adds
N Allocate
Registration
Cname
N N
Id Courses
Id Rooms Registers

Ccode 1 1 Rno 1
State

Is_allocated_by States Id
y

N M 1

Maintains Verifys Belongs-


Id
to _
N 1
Regno
N
N M Name
User registration
Has
User log

Fn
Id Mn
Logintime Ln
Uid

Fig 2.2 ER Diagram

Dept. of CSE, SCE Page 10


Hostel Management System

The ADMIN consists of the following attributes:


• ID which is the Primary key
• Username
• Email
• Password
• Reg_date
• Updation date

The COURSE consists of the following attributes:


• ID which is the Primary key
• Course_code
• Course_SN
• Course_FN
• Posting date

The REGISTRATION consists of the following attributes:


• ID which is the Primary key
• Room_no
• Seater
• Food status
• Stay from
• Duration
• Course
• Reg_no
• First name
• Middle name
• Last name
• Gender
• Contact no
• Email ID
• Emergency contact no
• Guardian name

Dept. of CSE, SCE Page 11


Hostel Management System

• Guardian relation
• Correspondence address
• Correspondence
• City correspondence state
• Permanent address
• Permanent city

The ROOMS consist of the following attributes:


• ID which is the Primary key
• Seater
• Room no
• Fees
• Posting_date

The STATE consists of the following attributes:


• ID which is the Primary key
• State

The USER REGISTRATION consists of the following attributes:


• ID which is the Primary key
• Reg_no
• First name
• Middle name
• Last name
• Gender
• Contact
• Email
• Password
• Reg date
• Updation date
• Password update
• Date

Dept. of CSE, SCE Page 12


Hostel Management System

2.3 Schema Diagram

Admin
Id Uname Email Pwd Reg_date Updation_date

Courses
Id Ccode Couser_sn Course_fn Posting_date

Registration
Id Roomno Seater Feespm Food_status Course Reg_no Name Address Contact_no

Rooms
Id Seater Roomno Fees Posting_date

States
Id State

User log
Id Userid Uname Uip City Country Logintime

User registration
Id Regno Name Gender Contactno Email Pwd Regdate Updationdate PassUdateDate

Fig 2.3The logical mapping of ER diagram to relational model

Dept. of CSE, SCE Page 13


Hostel Management System

2.4. Algorithms

Storedprocedure

Step1: BEGIN

Step2: DECLARE PERCENTAGE in FLOAT;

Step 3: DEFINE A CURSOR FOR RETRIVING

SELECT (SUM (total)/COUNT(*)) as PERCENTAGE

FROM feedback

WHERE fid=fac_id;

Step 4: OPEN CURSOR

Step 5: UNTILL NO RECORDS FOUND REPEAT THE FOLLOWING STEP 6 & 7.

Step 6: FETECH CURSOR INTO PERCENTAGE;

Step 7: RETURN THE PERCENTAGE VALUE.

Step 8: CLOSE CURSOR;

Step 9: END

Trigger

Step 1: BEGIN

Step 2: BEFORE CALCULATION OF PERCENTAGE

Step 3: CALCULATE total=q1+q2+q3+q4+q5+q6+q7+q8+q9+q10;

Step 4: RETURN total;

Step 5: END

Dept. of CSE, SCE Page 14


Hostel Management System

CHAPTER 3
SYSTEM IMPLEMENTATION
3.0. Module Description

To implement this project, SQL is used for backend and java is used for frontend
(GUI) creation.

Some of the features of java are:

 Simplicity: Java was designed with a small number of language constructs


so that programmers could learn it quickly.
 Object-Oriented: Java supports the construction of programs that consists
of collection of objects.
 Robust: Java is designed to eliminate certain types of programming errors.
Java is strongly typed, which allows extensive compile-time error
checking. It does not support memory pointers, which eliminates the
possibility of overwriting memory and corrupting data.
 Secure: Java is designed to be secure in a networked environment. The
Java run-time environment uses a bytecode verification process to ensure
that code loaded over the network does not violate Java security
constraints.
 Portable: In addition to supporting architecture neutrality, Java ensures
that other implementation-dependent aspects of language specification are
eliminated
 Multithreaded: Java supports multiple threads of execution. This makes
programming with threads much easier.
 Dynamic Language: Java supports dynamic loading of classes, dynamic
compilation, and automatic memory management

The modules included in this project are:

Dept. of CSE, SCE Page 15


Hostel Management System

3.1 Admin login

Admin login is used for the admin authorization. Admin can manage all the entries made
to the database. Admin is authorized to delete or view the registered details

3.2 User login

Login is generally used for the user authorization. Only the authorized users are allowed
to manipulate the database.

3.3 User Registration

3..3.1 Objective: To add a user/student and his/her details.

3..3.2 Input: At the start up the user will be asked to make choices that
include the following:
• Reg no.
• First name
• Middle name.
• Last name
• Gender
• Contact no
• Email id
• Password
• Confirm Password
3..3.3 Output: After filling all the details, data entered is checked for its
format correctness if all goes well then, the data is saved on the
database server.

3..3.4 Description: The registration is done by SQL insert query i.e. insert
table values(<values>). This module is used to insert details of students.

Dept. of CSE, SCE Page 16


Hostel Management System

3.4 Room Allotment


3.4.1 Objective: To allot rooms for each newly registered student.

3.4.2 Input: At first the user needs to be logged in then user registration is
followed with all required basic details including email & password.
Then with necessary id & password, user can login to confirm
his/her seat as per availability.
Some of the files in room allotment are as follows:
• Room no
• Seater
• Fees PM
• Food status
• Stay from
• Duration
• Name
• Reg no
• Address details
• Contact no
• Email ID
• Guardian details

3.4.3 Output: Once the student is done with room booking, the same
details are save in database server.

3.4.4 Description: The allotment of rooms is done & the selection is made
with help of HTML, students can select rooms from the available
choices.

Dept. of CSE, SCE Page 17


Hostel Management System

CHAPTER 4

RESULTS AND SCREENSHOTS


4.1. XAMPP Server

XAMPP server

Apache and MySQL started

Dept. of CSE, SCE Page 18


Hostel Management System

Figure 4.2. User Login Page

Fig: ADMIN LOGIN PAGE

DESCRIPTION: This is the screenshot showing where the admin can login onto to the
hostel database and can have access to the students who are registering on to the
database

4.3. User Login Page:

fig: 4.3: User login page

Dept. of CSE, SCE Page 19


Hostel Management System

DESCRIPTION: This is the screenshot showing where the students login themselves
onto the student hostel database and can view their profile.

4.4. Admin Dashboard.

fig: 4.4: Admin Dashboard page

DESCRIPTION: This is the screenshot showing where the admin can view the number of
students registering on to the database and manage the students.

4.5. Student Dashboard.

Dept. of CSE, SCE Page 20


Hostel Management System

fig: 4.5: Student Dashboard

DESCRIPTION: This is the screenshot showing where the dashboard of the students
where they can view the rooms and the additional they have provided.

4.6. Student Room Details

fig: 4.6: Student Room Details

DESCRIPTION: This is the screenshot showing the details of the room they have provided
on to the database wile they where registering for the room allotment.

4.7. Admin Profile

Dept. of CSE, SCE Page 21


Hostel Management System

fig: 4.7: Admin Profile

DESCRIPTION: This is the screenshot showing the profile of the admin where the admin
can change the password and can edit the information provided by him.

4.8. Student Registeration

fig 4.8: Student Registeration

DESCRIPTION: This is the screenshot showing where the students can register
themselves on to the hostel system and can have access to their profile in the database

Dept. of CSE, SCE Page 22


Hostel Management System

4.9. Student Change Password

fig 4.9: Student Change password

DESCRIPTION: This is the screenshot showing where the students can register
themselves on to the hostel system and can have access to their profile in the database.

Dept. of CSE, SCE Page 23


Hostel Management System

CHAPTER 5

CONCLUSION AND FUTURE WORKS

5.1 CONCLUSION
• After having detail study on Hostel Management, there can be many changes that
can be seen in the users.
Since this would save a lot of time rather than entering the data of the students.
• This project offers user to enter the data through simple and interactive manner.
• User is provided the option to view the data that he ahs entered and can also do the
required changes that he wants.
• Such projects can help the wardens to store the large amount of data i.e. the pile of
student information and record it on the database for the further use.
• Online registration of the rooms enables the students to view the rooms as well as
select the rooms of his choice.

5.2 FUTURE WORK


• The project made here is just to ensure that this project could be valid in today real
challenging world. Here all the facilities are made and tested.
• This project is valid for limited rooms availability and hence in the near future this
will be seen in the upcoming projects.
• Also, some other advancements that can be done on the project will be done in the
near future to make it more user friendly and easy handling for the students.
• We would like to make this project more interactive in the future.

Dept. of CSE, SCE Page 24


Hostel Management System

CHAPTER 6
BIBLIOGRAPHY

[1] Fundamentals of Database Systems, Ramez Elmasri and Shamkant B.


Navathe, 7th Edition, 2017,
Pearson
[2] www.stackoverflow.com
[3] www.youtube.com
[4] www.scribd.com
[5] www.tutorialpoint.com
[6] www.w3schools.com
[7] www.mariadb.org
[8] www.geeksforgeeks.org
[9] Database management systems, Ramakrishnan, and Gehrke, 3rd Edition
2014, McGraw Hill.

Dept. of CSE, SCE Page 25

You might also like