Вы находитесь на странице: 1из 31

REQUIREMENTS

This project was made using Windows 98 operating system


and Database was maintained using Microsoft Access XP with
Visual Basic 6.0 version.

SOFTWARE REQUIREMENT :
 Windows 9X/2000/NT Based System.
 Microsoft access 97 or higher version

Department of Computer Science & I.T. 1


SOFTWARE USED
VISUAL BASIC 6.0: -
Visual Basic is the fastest & the easiest way to create applications for Microsoft
Windows. Whether you are experienced professional or new to Windows programming, visual
basic provides you a complete set of tools to simplify the rapid application development.
The word “Visual Basic” consists of two words: -
“Visual” + “Basic”
Visual part refers to method use to create the graphical user interface rather than writing
numerous lines of code to describe the appearance and the location of interface element you
simply drag and drop the pre built objects.
The Basic part refers to the BASIC (Beginners All-purpose Symbolic Instruction Code).
A language used by many programmers than any other language in the history of computing.
.Characteristics of Visual Basic: -
1. Event Driven
2. Object based design
3. Easy to use debug and trace
4. Strong support to 3rd party control
5. ActiveX control, DLL and Add-Ins
New features of Visual Basic 6.0:
1. Faster Compiler.
2. New ActiveX data control object.
3. Allows database integration with wide variety of Application.
4. New data report designer.
5. New package and Deployment wizard.
6. Additional internet capabilities.

Department of Computer Science & I.T. 2


Advantages of adopting visual basic 6.0
1. Visual basic is based on QBasic and therefore basic programming language so
beginners find it very friendlier than any other language.
2. Visual basic is design from the ground up to be a windows programming language.
Inherent in visual basic fundamental design is a event driven program concept. As a matter of
fact, results.

Creating an application:

There are three main steps for creating an application in Visual Basic:

1. Create the interface.

2. Set properties.

3. Write Code.

Creating The Interface:


Forms:
Forms are the foundation for creating the interface of an application. Forms can
be used to add windows and dialog boxes to the application. They can also be used as
containers for items that are not a visible part of the application's interface.

Forms are objects that expose properties which define their appearance, methods
which define their behavior, and events which define their interaction with the user. By
setting the properties of the form and writing Visual Basic code to respond to its events,
one customizes the object to meet the requirements of the application.

Department of Computer Science & I.T. 3


Controls:

Controls are objects that are contained within form objects. Each type of control
has its own set of properties, methods and events that make it suitable for a particular
purpose. Some of the controls that have been used in this application are best suited for
entering or displaying text. Other controls let us access other applications and process
data as if the remote application was part of our code.

Setting properties:
Properties window lists the property settings for the selected form or control. A
property is a characteristic of an object, such as size, caption, or color. According to the
requirements, we set the design time properties of the forms and the controls listed in
the properties window.

Writing Code:
The Code Editor window is where we write Visual Basic code for our
application. Code consists of language statements, constants, and declarations. Using
the Code Editor window, we can quickly view and edit any of the code in our
application.
The Code window includes the following elements:

1. Object list box:

Displays the name of the selected object. Click the arrow to the right of the list
box to display a list of all objects associated with the form.

2. Procedure list box:

Lists the procedures or events, for an object. The box displays the name of the
selected procedure — for example, Click. Choose the arrow to the right of the box to
display all the procedures for the object.

Department of Computer Science & I.T. 4


Code modules:

Code in Visual Basic is stored in modules. There are three kinds of modules:

Form
Standard
Class

Form Modules:
Form modules (.FRM file name extension) are the foundation of most Visual
Basic applications. They can contain procedures that handle events, general procedures,
and form-level declarations of variables, constants, types, and external procedures. The
code that is written in a form module is specific to the particular application to which
the form belongs; it might also reference other forms or objects within that application.
Standard Modules:
Standard modules (.BAS file name extension) are containers for procedures and
declarations commonly accessed by other modules within the application. They contain
global (available to the whole application) or module-level declarations of variables,
constants, types, external procedures, and global procedures. The code that is written in
a sta ndard module isn't necessarily tied to a particular application.

Class Modules:
Class modules (.CLS file name extension) are the foundation of object-oriented
programming in Visual Basic.
Visual Basic provides a wealth of tools for creating and accessing database on both
individual machines and networks.

Department of Computer Science & I.T. 5


Procedures:

Procedures are smaller logical components into which a program can be broken.

There are several types of procedures used in Visual Basic:

• Sub procedures do not return a value.

• Function procedures return a value.

• Property procedures can return and assign values, and set references to objects.

Sub Procedures:

A Sub procedure is a block of code that is executed in response to an event. By breaking


the code in a module into Sub procedures, it becomes much easier to find or modify the code in
your application.
The syntax for a Sub procedure is:

[Private/Public][Static] Sub procedure name (arguments)


statements End Sub
Each time the procedure is called, the statements between Sub and End Sub are executed.
Sub procedures can be placed in standard modules, class modules, and form modules. Sub
procedures are by default Public in all modules, which means they can be called from anywhere
in the application.
The arguments for a procedure are like a variable declaration, declaring values that are

passed in from the calling procedure.

Department of Computer Science & I.T. 6


Function Procedures:
Visual Basic includes built-in or intrinsic functions, like date () (which returns the system
date and time). In addition, the Function statement can be used to write your own Function
procedures.

• Like a Sub procedure, a Function procedure is a separate procedure that can take
arguments, perform a series of statements, and change the value of its arguments. Unlike
a Sub procedure, a Function procedure can return a value to the calling procedure.

Department of Computer Science & I.T. 7


INTRODUCTION TO DBMS

A database management system (DBMS) consists of a collection of interrelated


data and a set of programs to access those data. The collection of data is referred to as
database.
Traditional methods of information management include file-processing system.
A number of application programs are written to manipulate the files.
Keeping information in a file-processing system has a number of major disadvantages:
1. Inconsistency and Data redundancy:
Since different programmers create the file and application programs, the various
files are likely to have different formats and the programs may be written in several
programming languages. Moreover, the same information may be duplicated in several
files. This redundancy leads to higher storage cost. In addition it may lead to data
inconsistency i.e. the various copies of the same data may no longer agree.
2. Difficulty in accessing data:
It might happen that due to changes in the needs a new query arises. To gather
information according to that query, a new application program may need to be written.
This might take a few days and if after few days again a new demand arises then again
an application program has to be written.

3. Integrity problem:
The data stored in the database must satisfy certain consistency constraints.
When new constraints are added, it is difficult to change the programs to enforce them.

Department of Computer Science & I.T. 8


4.Atomicity problems:
A computer system is subject to failure. So it is crucial to ensure that once a
failure has occurred, the data are restored to the consistent state that existed prior to the
failure.

5.Concurrent access anomalies:


Many systems allow multiple users to update the data simultaneously. In such
case there are chances of inconsistency creeping in the database.

To overcome these problems, the development of DBMS has been prompted. Next we
look up some terminologies of DBMS.

View of data (In a Database)


Data abstraction
A major purpose of a DBMS is to provide users with an abstract view of the data.
That is, the system hides certain details of how the data are stored and maintained.
Types of data abstraction are:
1. Physical level:
The lowest level of abstraction describes how the data are actually stored. At this
level, complex low-level data structures are described in detail.
2. Logical level:
The next higher level of abstraction describes what data are stored in the
database and what relationships exist between them.
3. View level:
The highest level of abstraction describes only part of the entire database. There
is huge amount of information stored in the database. Many users of the system will not
be concerned with all this information. Instead, they need to access only a part of

the database. To simplify this interaction of the users with the system, the view level
of abstraction is described.

Department of Computer Science & I.T. 9


Instances and Schemas:
The collection of information stored in the database at a particular moment is
called instance of the database. The overall design of the database is called the database
schema.
A database corresponds to the programming language type definition. A variable
of a particular type has a particular value at a given instant. Thus, the value of a
variable in programming languages corresponds to an instance of database schema.
Data Independence:
The ability to modify a schema definition in one level without affecting a schema
definition in the next higher level is called data independence. There are two levels of
data independence:

1. Physical data independence is the ability to modify the physical schema without
causing application programs to be rewritten.

2. Logical data independence is the ability to modify the logical schema without
causing application program to be rewritten.
The Primary Key:
In a relation database system, each record has a unique identifier that is used to
indicate the record and to relate it to other records in other tables. Often, a close
inspection of the data will reveal an exiting characteristic that makes each record
unique; frequently, this can become the primary key. This type of primary key is called
composite.
When there is not an apparent field or set of field that can be used to form a
composite primary key, Visual Basic’s database management system can automatically
generate a unique numeric key for each record. This type of key made by adding a field
to your table and setting it to the field type. An AutoNumber field automatically

increases by increments of one whenever a new record added. This ensures


that the key is unique, although the key may not necessarily mean anything. As long as
all tables refer to the same record with the same key, the key need not be meaningful.
Sometimes an auto-numbered primary key can be made to fit a business purpose.

Department of Computer Science & I.T. 10


Foreign key:
A field (column) in table that stores a value and relates the value to another table is called
foreign key .For example, a field in an invoices table that stores the customer number in a
foreign key. The same value in the customer table is the primary key. A foreign key should be of
the same type as the primary key of the table to which it is relating.

Data models
Data model is a set of concepts that can be used to describe the structure of a database.
The common data models are:

1. E-R Model:

The E-R model is based on a perception of a real world that consists of a


collection of basic objects, called entities, and of relationships among these
objects. An entity is a 'thing' in the real world that is distinguishable from other
objects.
In addition to entities and relationships, the E-R model represents certain constraints to
which the contains of a database must conform. One important constraint is mapping
cardinalities, which express the number of entities to which another entity can be associated via a
relationship set.
The overall logical structure of a database can be expressed graphically by an E-R
diagram, which is built up from the following components:

• Rectangles, which represent entity sets


• Ellipses, which represent attributes
• Diamonds, which represent relationships among entity sets
• Lines, which link attributes to entity sets and entity sets to relationships
2. Relational Model:
This model uses a collection of tables to represent both data and the relationships among
those data. A row in a table represents a relationship among a set of values.

Department of Computer Science & I.T. 11


BACK END AND FRONT END USED

In this project, the language used is Visual Basic 6.0 for managing the database and for
creating the interface to interact with the user and data is stored and managed in Micro Soft
Access-XP.

Back end :-
Microsoft Access
MS Access is a relational Database Management Program. RDBMS is a set of two-dimensional
tables in which the data is represented in rows and columns. A relationship between tables can be
build. When a report has to be generated, a relationship can be build between the tables and
fields from different tables can be combined together.
To form the report in this manner only the data required is displayed. An Access database
consists of objects such as tables, which contains the data, forms, queries and reports. These
objects are used to manage the data in the database.

Front end :-
Microsoft Visual Basic
The high-level, visual programming version of the Basic language developed by
Microsoft for building Windows-based applications. Visual Basic commands can be added to
forms, reports, and the controls that are placed on them, to perform specialized tasks. Visual
Basic is a powerful tool; it is not just a language but is an Integrated Development Environment.

Department of Computer Science & I.T. 12


HOTEL MANAGEMENT SOFTWARE

FOR

Department of Computer Science & I.T. 13


PROJECT DESIGN

Hotel management system is a computerized system that deals with the


management of customer services.

In our system a customer comes into the hotel. Then the operator checks the
room availability, customer’s choice of room according to his budget he books the
room for the customer. It computes the expenses done by the customer, generates
the bill when customer leaves the hotel.

Department of Computer Science & I.T. 14


Data Flow Diagram
A Data Flow Diagram models a system by using external entities from which data flows
to a process which transform the data and create output data flows which go to other processes or
external entities or files.

The main merit of DFD is that it can provide an overview of what data a system would
process, what transformation of data are done, what files are used, and where the result flow.

DFD are structured in such a way that starting from a diagram which gives a broad
overview at a glance, they can be expanded to a hierarchy of diagrams giving more and more
detail.

Department of Computer Science & I.T. 15


Data flow Diagram
Level - 0

User Name, Password

Customer Cu ID, Cu Name, Room no etc

Cu_indate, cu_out

Cu Req, Cu Bill, Cu_ Pay

Room no Room Status

Department of Computer Science & I.T. 16


PROJECT INTERFACE
Forms Descriptions:

Login Form :-

First of all a login form will appear. For using the software user has to enter correct
“user name” and “password”. User can only login when his profile is created
previously otherwise he is unable to use the software.

Department of Computer Science & I.T. 17


Main Form: -

After successfully login this form will appear and this will provide you these options.
1. File
2. Administration
3. View
4. Copyright

1. File :-
This is the left most option present at the menu bar. This provide option to the user
management that contains 4 options shown below

Department of Computer Science & I.T. 18


(a).Change Password :-

Select one of the name from the list box or you can directly enter the name in the text box
and new password to change the password of any of the user.

Department of Computer Science & I.T. 19


Create new user: -

Enter new user name and new password and confirm the password
There will be a new user created.

Delete user :-

Just enter the user name and press the delete button. One message box will appear if you
are sure to delete the user, you have to click on the “yes”. User will be deleted.

Department of Computer Science & I.T. 20


Arrival entry :-

When any new customer comes into the hotel the operator will fill this entry form. It
contain all the details about the customer. Date and time will be automatically filled by
the software (Values of date and time are according to the system.). There is a tool bar in
the form it provides various of functionalities like Add, Delete, Save, Modify, Find etc.

Department of Computer Science & I.T. 21


Departure entry form :-

When a visitor wants to check-out this form will be filled.

Department of Computer Science & I.T. 22


Rooms Category form:-

This form shows types of room available in the hotel their prices can be manipulated. If
there is new category is launched by the hotel then it could be also added.

Department of Computer Science & I.T. 23


Details of rooms :-

Every room in the hotel has a distinct Room ID. Each room belongs to a specified
category. The rent of the room depends upon its category.
This form also gives information which room is free and which room is not.

Department of Computer Science & I.T. 24


Room Allocation form: -

This form is used for allotting the room to a new customer.


This list box shows vacant room in each category.

Department of Computer Science & I.T. 25


Service Used form :-

There are various other services provided buy the hotel. Like swimming, Casino, Bear
bar, Trips, Lunch, Dinner, breakfast and many more. When customer uses any of the
services corresponding charge and his Id entered in the form. When bill will be generated
these charges are added into the main bill.

Department of Computer Science & I.T. 26


Bill generation form: -

When customer will check out a bill will be generated using this form.

Department of Computer Science & I.T. 27


View: -
It is not easy for an operator to remember service Ids, Customer Ids, room Ids, Room
Category Ids, and so there is a view option is provided from the help of which he/ she can
operate the whole system.
With help of this option the operator can view following things in form of a data grid.
1. Customer
2. Room category
3. Room allotment and status
4. Services
5. Contents
For Example:-

Department of Computer Science & I.T. 28


Copyright: -
This is last splash screen which shows the name of the developers and copyright policy.

Department of Computer Science & I.T. 29


CONCLUSION

We are happy to say that our project of database Lab about “HOTEL
MANAGEMENT SYSYTEM” over field of database management system.
At last we would like to conclude that how an engineer works. He is one of the
team members or might be possible a group leader as well. Development of this s/w
takes a lot of efforts from us. The thing this s/w give a lot of self satisfaction to all of us
Though every task is never said to be perfect in this engineering field even more
improvements may be possible in this software.
We learned so many things gained a lot of knowledge about Visual Basic during
Development of this software. I hope this will prove fruitful to us.

Department of Computer Science & I.T. 30


REFERENCES

1. “Mastering Visual Basic 6.0”

By Evangelos Petroutsos (BPB publication).

2. “Database System Concepts”

By Kotrh, Silberscchstz, Sudarshan; TATA McGraw Hill

3. “Software Engineering”: A practitioner’s Approach

By Roger .S .Pressman; McGraw Hill Higher Education

Department of Computer Science & I.T. 31

Вам также может понравиться