1.1 Problem Defination: Dept of CSE, NHCE 1
1.1 Problem Defination: Dept of CSE, NHCE 1
1.1 Problem Defination: Dept of CSE, NHCE 1
CHAPTER 1
INTRODUCTION
The project based on “INFORMATION AND QUERY SYSTEM” is being developed for the
purpose of storing the information of the students where it maintains all the data
related to students. It maintains all the student information who student of the specific
college.
The INFORMATION AND QUERY SYSTEM can be used to store student and staff
information like attendance, fees etc. They can create report regarding any student or
staff any time using this system. Using this system they can register new student or
new staff and their course details. Admin can get the information of student's fees and
can check fees details anytime. Admin can also add new employee in the system and
can check details of the employee easily. I developed this system INFORMATION AND
QUERY SYSTEM to make the work easier for the students and staff members by storing
the data digitally. The user can maintain all the students and staff details. It also
maintains the Reports for the particulars. This will avoid user to maintain the data
manually where it cannot store huge data and it leads to loss of data. This can be easily
used by the software people and is more user friendly software.
As we all use different applications to perform different tasks of same type. Also when
we use different applications we have to jump to other applications when needed. So,
to avoid switching between applications, we can use one application for information
purpose. Apart from getting information we can also modify small details in that
application; to modify additional details we can switch to that particular application.
Also, it is DOS based application, so, it will not be heavy and work efficiently on
machine. Also, using heavy application which is graphical it may generate output after
some time.
1.2 OBJECTIVES
The main objective of this application is to provide flexibility in storing the details of
each member of the college. Whether it is student or any teaching or non-teaching
staff. The admin do not need to jump in different applications for different category of
college member. It also gives the facility of providing the seminar or any event
information occurring in college.
The proposed application is college data collection. College data collection deals with
data that user wants to store of students, staff, seminars and events. Operations are
performed as per the user choice. A menu is provided in starting where user is given by
four options and user have to choose particular option according to operation that user
wants to perform. Four options are as follows:
1. Student Details
2. Staff Details
3. Query System
4. Exit
In Student Details Option, when chose by user it will get user to another menu which
asks for further operations to be performed by user regarding Student details like
Adding new student information, Deleting Existing student Information, Displaying
student Information, etc.
In Staff Details Option, the user will be moved to new menu called Staff Details Menu
where user can perform certain operations which are related to staff. It allows user to
add details of staff, it also allows user to delete details of staff as well, also it allows
user to display staff details for referring purpose.
In third option, which is of Seminars And Events, when it is chosen by user, it will move
user to another menu called Seminars And Events Menu, in which will provided with
certain list of operations in which user choose and perform operations which allows
user to add new seminars or events and it is provided with other options as well which
allows user to modify existing details regarding seminars or events also in other option
user can refer existing details by displaying. Current framework has experienced with
numerous constraints. The recommended framework hits the confinements found in
the current framework. There exists parcel of favorable circumstances in a proposed
framework that is the framework is finished bundle so there is no slipups concerning
the measurements of understudy's participation and inner evaluation marks and so
forth. Likewise it takes out repetition. It is simple to get data of some particular
member based on the unique id number given to the person.
College data collection deals with data that user wants to store of students, staff,
seminars and events. Operations are performed as per the user choice. A menu is
provided in starting where user is given by four options and user have to choose
particular option according to operation that user wants to perform. Four options are as
follows:
Dept of CSE, NHCE 2
Salary Calculation Project
1. Student Details
2. Staff Details
3. Query System
4. Exit
In Student Details Option, when chose by user it will get user to another menu which
asks for further operations to be performed by user regarding Student details like
Adding new student information, Deleting Existing student Information, Displaying
student Information, etc.
In Staff Details Option, the user will be moved to new menu called Staff Details Menu
where user can perform certain operations which are related to staff. It allows user to
add details of staff, it also allows user to delete details of staff as well, also it allows
user to display staff details for referring purpose.
In third option, which is of Seminars And Events, when it is chosen by user, it will move
user to another menu called Seminars And Events Menu, in which will provided with
certain list of operations in which user choose and perform operations which allows
user to add new seminars or events and it is provided with other options as well which
allows user to modify existing details regarding seminars or events also in other option
user can refer existing details by displaying.
CHAPTER 2
DATA STRUCTURES
The logical or mathematical of a particular organisation of data is called data structure.
Objectives of data structure :
To identify and create useful mathematical entities and operations for the
problem which need to be solved.
Determine the representation of entities and implementation of operations
on these problems.
Data structure represents the knowledge of data to be organised in memory. It should
be designed and implemented in such a way that it reduces the complexity and
enhances the efficiency.
Linear Non-linear
In linear data structure the data items are In non-linear data structure the data items
arranged in a linear sequence. are not arranged in a linear sequence.
Eg: Array,Linked list Eg: Tree,Graph.
Table 2.1 : Difference between Linear and Non-linear data structure
Homogeneous Non-homogeneous
In homogeneous data structure all the In non-homogeneous data structure the
elements are of same type. elements are may or may not be of same
type.
Eg: Array
Eg: records
Table 2.2 : Difference between Homogeneous and Non-homogeneous data structure
Static Dynamic
Static structures are ones whose size and Dynamic structures are one which expand
structures associated memory locations or shrink as required during program
are fixed at compile time. execution and their associated memory
locations change.
Eg: Array
Eg: linked list created using linked list.
Table 2.3 : Difference between Static and Dynamic data structure
2.1 ARRAYS
C programming language provides a data structure called the array, which can store a
fixed-size sequential collection of elements of the same type. An array is used to store a
collection of data, but it is often more useful to think of an array as a collection of
variables of the same type.
Instead of declaring individual variables, such as number0, number1, ..., and number99,
you declare one array variable such as numbers and use numbers[0], numbers[1], and
..., numbers[99] to represent individual variables. A specific element in an array is
accessed by an index.
All arrays consist of contiguous memory locations. The lowest address corresponds to
the first element and the highest address to the last element.
Array is a container which can hold a fix number of items and these items should be of
the same type. Most of the data structures make use of arrays to implement their
algorithms. Following are the important terms to understand the concept of Array.
Element − Each item stored in an array is called an element.
Index − Each location of an element in an array has a numerical index, which is
used to identify the element.
Array Representation
Arrays can be declared in various ways in different languages. For illustration, let's take
C array declaration.
Arrays can be declared in various ways in different languages. For illustration, let's take
C array declaration.
Basic Operations
Following are the basic operations supported by an array.
Traverse − print all the array elements one by one.
Insertion − Adds an element at the given index.
Deletion − Deletes an element at the given index.
Search − Searches an element using the given index or by the value.
Update − Updates an element at the given index.
2.2 STACKS
A stack is an Abstract Data Type (ADT), commonly used in most programming languages.
It is named stack as it behaves like a real-world stack, for example – a deck of cards or a
pile of plates, etc.
A real-world stack allows operations at one end only. For example, we can place or
remove a card or plate from the top of the stack only. Likewise, Stack ADT allows all data
operations at one end only. At any given time, we can only access the top element of a
stack.
This feature makes it LIFO data structure. LIFO stands for Last-in-first-out. Here, the
element which is placed (inserted or added) last, is accessed first. In stack terminology,
insertion operation is called PUSH operation and removal operation is called POP
operation.
Stack operations may involve initializing the stack, using it and then de-initializing it. Apart from
these basic stuffs, a stack is used for the following two primary operations −
push() − Pushing (storing) an element on the stack.
pop() − Removing (accessing) an element from the stack.
When data is PUSHed onto stack.
To use a stack efficiently, we need to check the status of stack as well. For the same purpose, the
following functionality is added to stacks −
peek() − get the top data element of the stack, without removing it.
isFull() − check if stack is full.
isEmpty() − check if stack is empty.
At all times, we maintain a pointer to the last PUSHed data on the stack. As this pointer always
represents the top of the stack, hence named top. The top pointer provides top value of the
stack without actually removing it.
Push Operation
The process of putting a new data element onto stack is known as a Push Operation.
Push operation involves a series of steps −
Step 1 − Checks if the stack is full.
Step 2 − If the stack is full, produces an error and exit.
Step 3 − If the stack is not full, increments top to point next empty space.
Step 4 − Adds data element to the stack location, where top is pointing.
Step 5 − Returns success.
2.3 QUEUES
Queue is an abstract data structure, somewhat similar to Stacks. Unlike stacks, a queue
is open at both its ends. One end is always used to insert data (enqueue) and the other
is used to remove data (dequeue). Queue follows First-In-First-Out methodology, i.e.,
the data item stored first will be accessed first.
A real-world example of queue can be a single-lane one-way road, where the vehicle
enters first, exits first. More real-world examples can be seen as queues at the ticket
windows and bus-stops.
Basic Operations
Queue operations may involve initializing or defining the queue, utilizing it, and then completely
erasing it from the memory. Here we shall try to understand the basic operations associated
with queues −
enqueue() − add (store) an item to the queue.
dequeue() − remove (access) an item from the queue.
Few more functions are required to make the above-mentioned queue operation efficient.
These are −
peek() − Gets the element at the front of the queue without removing it.
isfull() − Checks if the queue is full.
isempty() − Checks if the queue is empty.
In queue, we always dequeue (or access) data, pointed by front pointer and while enqueing (or
storing) data in the queue we take help of rear pointer.
Enqueue Operation
Queues maintain two data pointers, front and rear. Therefore, its operations are
comparatively difficult to implement than that of stacks.
The following steps should be taken to enqueue (insert) data into a queue −
Step 1 − Check if the queue is full.
Step 2 − If the queue is full, produce overflow error and exit.
Step 3 − If the queue is not full, increment rear pointer to point the next empty space.
Step 4 − Add data element to the queue location, where the rear is pointing.
Step 5 − return success.
Dequeue Operation
Accessing data from the queue is a process of two tasks − access the data where front is
pointing and remove the data after access. The following steps are taken to
perform dequeue operation −
Step 1 − Check if the queue is empty.
Step 2 − If the queue is empty, produce underflow error and exit.
Step 3 − If the queue is not empty, access the data where front is pointing.
Step 4 − Increment front pointer to point to the next available data element.
Step 5 − Return success.
Doubly Linked List − I n a doubly linked list, each node contains a data part and two
addresses, one for the previous node and one for the next node.
Deletion
Deletion is also a more than one step process. We shall learn with pictorial
representation. First, locate the target node to be removed, by using searching
algorithms.
The left (previous) node of the target node now should point to the next node of the
target node −
LeftNode.next −> TargetNode.next;
This will remove the link that was pointing to the target node. Now, using the following
code, we will remove what the target node is pointing at.
TargetNode.next −> NULL;
We need to use the deleted node. We can keep that in memory otherwise we can simply
deal locate memory and wipe off the target node completely.
First, we traverse to the end of the list. It should be pointing to NULL. Now, we shall
make it point to its previous node −
We have to make sure that the last node is not the lost node. So we'll have some temp
node, which looks like the head node pointing to the last node. Now, we shall make all
left side nodes point to their previous nodes one by one.
Except the node (first node) pointed by the head node, all nodes should point to their
predecessor, making them their new successor. The first node will point to NULL.
We'll make the head node point to the new first node by using the temp node.
Display
Displays the complete list.
Dept of CSE, NHCE 16
Salary Calculation Project
Search
Searches an element using the given key.
2.5 TREES
Tree represents the nodes connected by edges. We will discuss binary tree or binary
search tree specifically.
Binary Tree is a special datastructure used for data storage purposes. A binary tree has a
special condition that each node can have a maximum of two children. A binary tree has
the benefits of both an ordered array and a linked list as search is as quick as in a sorted
array and insertion or deletion operation are as fast as in linked list. Following are the
important terms with respect to tree :
Path − Path refers to the sequence of nodes along the edges of a tree.
Root − The node at the top of the tree is called root. There is only one root per
tree and one path from the root node to any node.
Parent − Any node except the root node has one edge upward to a node called
parent.
Child − The node below a given node connected by its edge downward is called
its child node.
Leaf − The node which does not have any child node is called the leaf node.
Subtree − Subtree represents the descendants of a node.
Visiting − Visiting refers to checking the value of a node when control is on the
node.
Traversing − Traversing means passing through nodes in a specific order.
Levels − Level of a node represents the generation of a node. If the root node is
at level 0, then its next child node is at level 1, its grandchild is at level 2, and so
on.
Keys − Key represents a value of a node based on which a search operation is to
be carried out for a node.
Height - The height of a tree is equal to the maximum level of any node in the
tree. The height of the tree in our file system example is two.
With the basic vocabulary now defined, we can move on to two formal
definitions of a tree: one involving nodes and edges, and the other a recursive
definition.
Node - A node is a fundamental part of a tree. It can have a unique name, which
we sometimes call the “key.” A node may also have additional information,
which we refer to in this book as the “payload.” While the payload information is
not central to many tree algorithms, it is often critical in applications that make
use of trees.
Edge - An edge is another fundamental part of a tree. An edge connects two
nodes to show that there is a relationship between them. Every node other than
the root is connected by exactly one incoming edge from another node. Each
node may have several outgoing edges.
2.6 GRAPHS
Mathematical graphs can be represented in data structure. We can represent a graph
using an array of vertices and a two-dimensional array of edges. Before we proceed
further, let's familiarize ourselves with some important terms −
Vertex − Each node of the graph is represented as a vertex.
Edge − Edge represents a path between two vertices or a line between two
vertices.
Adjacency − Two node or vertices are adjacent if they are connected to each
other through an edge.
Path − Path represents a sequence of edges between the two vertices.
Graphs are used to solve many real-life problems. Graphs are used to represent
networks. The networks may include paths in a city or telephone network or circuit
network. Graphs are also used in social networks like LinkedIn, Facebook. For example,
in Facebook, each person is represented with a vertex (or node). Each node is a
structure and contains information like person id, name, gender, locale etc.
Basic Operations
Following are basic primary operations of a Graph −
Add Vertex − Adds a vertex to the graph.
Add Edge − Adds an edge between the two vertices of the graph.
Display Vertex − Displays a vertex of the graph.
Graphs can be used to model any situation where we have things that are related to
each other in pairs; for example, all of the following can be represented by graphs.
Family trees - Nodes are members, with an edge from each parent to each of their
children.
Transportation networks - Nodes are airports, intersections, ports, etc. Edges are airline
flights, one-way roads, shipping routes, etc.
Assignments - Suppose we are assigning classes to classrooms. Let each node be either a
class or a classroom, and put an edge from a class to a classroom if the class is assigned
to that room. This is an example of a bipartite graph, where the nodes can be divided
into two sets S and T and all edges go from S to T.
Operations on graphs
What would we like to do to graphs? Generally, we first have to build a graph by starting
with a set of nodes and adding in any edges we need, and then we want to extract
information from it, such as "Is this graph connected?", "What is the shortest path in this
graph from s to t?", or "How many edges can I remove from this graph before some
Dept of CSE, NHCE 19
Salary Calculation Project
nodes become unreachable from other nodes?" There are standard algorithms for
answering all of these questions; the information these algorithms need is typically (a)
given a vertex u, what successors does it have; and sometimes (b) given vertices u and v,
does the edge (u,v) exist in the graph?
Representations of graphs
A good graph representation will allow us to answer one or both of these questions
quickly. There are generally two standard representations of graphs that are used in
graph algorithms, depending on which question is more important.
For both representations, we simplify the representation task by insisting that vertices
be labeled 0, 1, 2, ..., n-1, where n is the number of vertices in the graph. If we have a
graph with different vertex labels (say, airport codes), we can enforce an integer labeling
by a preprocessing step where we assign integer labels, and then translate the integer
labels back into more useful user labels afterwards. The preprocessing step can usually
be done in O(n) time, which is likely to be smaller than the cost of whatever algorithm
we are running on our graph, and the savings in code complexity and running time from
working with just integer labels will pay this cost back many times over.
2.6 FILES
A file is a container in computer storage devices used for storing data.
When a program is terminated, the entire data is lost. Storing in a file will preserve your
data even if the program terminates.If you have to enter a large number of data, it will
take a lot of time to enter them all.However, if you have a file containing all the data,
you can easily access the contents of the file using a few commands in C.You can easily
move your data from one computer to another without any changes.
Types of Files
When dealing with files, there are two types of files you should know about:
Text files
Binary files
1. Text files
Text files are the normal .txt files. You can easily create text files using any simple text
editors such as Notepad. When you open those files, you'll see all the contents within
the file as plain text. You can easily edit or delete the contents. They take minimum
effort to maintain, are easily readable, and provide the least security and takes bigger
storage space.
2. Binary files
Binary files are mostly the .bin files in your computer. Instead of storing data in plain
text, they store it in the binary form (0's and 1's). They can hold a higher amount of data,
are not readable easily, and provides better security than text files.
File Operations
In C, you can perform four major operations on files, either text or binary:
Creating a new file
Opening an existing file
Closing a file
Reading from and writing information to a file
CHAPTER 3
DESIGN
3.1 FLOWCHART
Fig. : Flowchart - II
CHAPTER 4
IMPLIMENTATION
4.1 Module 1
STUDENT MODULE
If user selects STUDENT option, user will be moved to another interface in which he will
be asked to choose following options:
1. Enter New Student Details
2. Update Existing Student Details
3. Delete Student Details
4. Display Particular Student Details
5. Display All Student Details
6. Exit to Main Menu
4.2 Module 2
STAFF MODULE
If user selects STAFF option, user will be moved to another interface in which he will be
asked to choose following options:
1. Enter New Staff Details
2. Update Existing Staff Details
3. Delete Staff Details
4. Display Particular Staff Details
5. Display All Staff Details
6. Exit To Main Menu
4.3 Module 3
QUERY SYSTEM
If user selects QUERY SYSTEM option, user will be moved to another interface in
which he will be asked to choose following options:
1. Add new query.
2. View query.
3. Exit to main menu.
4.4 Module 4
EXIT MODULE
When the user selects to come out of the operation or from the application the exit
module operation takes place.
CHAPTER 5
RESULT
In output, enter the required details as asked by the computer and the snapshots of the
program are as follows.
STUDENT INSERTION
STUDENT UPDATE
STUDENT DISPLAY
STUDENT DELETE
STAFF INSERT
STAFF DELETE
EXIT
CHAPTER 6
CONCLUSION
The application was designed in such a way that future modifications can be done easily.
The following conclusions can be deduced from the development of the project.The
application provides appropriate information to users according to the chosen service.
Deployment of this application will certainly help this college to reduce unnecessary
wastage of time in personally going to each department for some information.
CHAPTER 7
REFERENCES
[1] https://www.tutorialspoint.com/cprogramming/c_arrays.htm
[2] https://www.tutorialspoint.com/data_structures_algorithms/stack_algorithm.htm
[3] https://www.tutorialspoint.com/data_structures_algorithms/dsa_queue.htm
[4] https://www.tutorialspoint.com/data_structures_algorithms/graph_data_structure.htm
[5] https://www.tutorialspoint.com/data_structures_algorithms/tree_data_structure.htm
[6] http://chittorgarhdarpan.com/item/stack-study-point/
[7] https://www.tutorialspoint.com/data_structures_algorithms/linked_list_algorithms.htm