Sunteți pe pagina 1din 18

1

MILITARY DATABASE MANAGEMENT SYSTEM

CSE2004- DBMS PROJECT REPORT


(J Component )

submitted by

RITWIK SHARAN 18BCE2232

in partial fulfilment for the award of the degree of

B. Tech

in

COMPUTER SCIENCE AND ENGINEERING

Vellore-632014, Tamil Nadu, India

School of Computer Science and Engineering

November, 2019
2

ABSTRACT

The Indian Army database management is a system required for management


and visualization of military assets in the field, designed for use by the Indian
Army. The system is designed to connect with a large database of personnel,
equipment items, medical condition , skills and consumables of the Indian
Army. These entities are organized so that the required data can be traversed at
a glance, giving commanders a visual summary of statuses through a web
driven interface.

The goal of this system is to allow for quick access of the data in a highly visual
manner. The primary reason for the design of this system was to make a
tremendous volume of information seem simple and which can be extracted
easily. This was done by segregating the system into several different views
which would give us a detail about specific aspect of the information provided.
3

Table of Content
1)Tables description

2)E-R Diagram

3)Introduction

4)System Architecture

5)Module Description

6)Results and discussions

7)Conclusion

8)References
4

1)Tables:

SOLDIER
S_id Primary key

First_name Not null

Last_name Not null

DOB Not null

Permanent Not null


Address

Place of posting Not null

Rank Not null

Division Not null

Sex Not null

Email Not null

PHONE
S_id Foreign
Key(Soldier)

Phone 1 Not null

Phone 2

Phone n

SKILLS
S_id Foreign
key(Soldier)

Sprint_speed Not null

Climb_speed Not null

Aiming_score Not null


5

PREVIOUS WARS
War_name Primary key

S_id Foreign key(Soldier)

Place Not null

Post Not null

MESS
Mess_id Primary key

Name Not null

No. of soldiers Not null


serving

Location Not null

EQUIPMENT
E_id Primary key

Name Not null

S_id Foreign Key(Soldier)

Type Not null

MEDICAL
Med_id Primary key

Weight Not null

Height Not null

S_id Foreign key(Soldier)


6

DISEASES
S_id Foreign Key(Soldier)

Disease 1

Disease 2

Disease n

MEDICINE
P_id Primary key

Cost Not null

period Not null

Med_id Foreign key(Soldier)

BANK
IFSC Primary key

Bank_Name Not null

Branch Not null

S_id Foreign key(Soldier)

FATHER
F_id Primary key

First_Name Not null

Last_Name Not null

S_id Foreign key(Soldier)

Job

Email Not null

Address Not null


7

Phone Not null

MOTHER
M_id Primary key

First_Name Not null

Last_Name Not null

S_id Foreign key(Soldier)

Job

Email Not null

Address Not null

Phone Not null

SPOUSE
Sp_id Primary key

First_Name Not null

Last_Name Not null

S_id Foreign key(Soldier)

Job

Email Not null

Address Not null

Phone Not null


8

2)E-R Diagram
9

1. INTRODUCTION
Military affairs are chaotic in nature. Statistics, occurrences, and the
organization of materials and equipment are difficult to manage. Battlefield
commanders require the ability to view large amounts of information in a
simplistic manner, particularly as ongoing situations become more complex
and more units, personnel, and equipment enter the battle space. This project
aims at providing the data and information of the soldier’s of the Indian military
in a very easy and effective manner. The basis for the design was to create a
system which can make a tremendous volume of information seem simple.
10

2. OVERVIEW OF THE PROPOSED SYSTEM


2.1. SYSTEM ARCHITECTURE

LOGIN PAGE

FOR VIEWING SOLDIER’S DETAILS FOR INSERTING DETAILS

1.Soldier’s information Click on insertion and input


the details in the text box
2.Soldier’s family details

3.Equipment details

4.Soldier’s skills

5.Mess details

6.Medical details

7.Bank details

8.Previous wars details


11

2.2 MODULE DESCRIPTION


LOGIN PAGE

After logging in we see the details of the soldiers.


CODE FOR SHOWING TABLE(Medical)

// Attempt select query execution


$sql = "SELECT * FROM medical";
if($result = mysqli_query($link, $sql)){
if(mysqli_num_rows($result) > 0){
echo "<table>";
echo "<tr>";
echo "<th>Med_id</th>";
echo "<th>Weight</th>";
echo "<th>Height</th>";
echo "<th>S_id</th>";
echo "</tr>";
while($row = mysqli_fetch_array($result)){
echo "<tr>";
echo "<td>" . $row['Med_id'] . "</td>";
echo "<td>" . $row['Weight'] . "</td>";
echo "<td>" . $row['Height'] . "</td>";
echo "<td>" . $row['S_id'] . "</td>";
echo "</tr>";
}
echo "</table>";
// Free result set
mysqli_free_result($result);
} else{
echo "No records matching your query were found.";
}
} else{
echo "ERROR: Could not able to execute $sql. " . mysqli_error($link);
}
Similarly, I wrote the code for showing other tables as well.
12

The following tables gets displayed.


13

Now for inserting values in the database using frontend


CODE FOR INSERTION(Soldier and Skills table)

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Add Record Form</title>
</head>
<body>
<form action="insertion.php" method="post">
<p>
<label for="Sid">Soldier id:</label>
<input type="text" name="S_id" id="Sid">
</p>
<p>
<label for="Firstname">First Name:</label>
<input type="text" name="First_name" id="Firstname">
</p>
<p>
<label for="Lastname">Last Name:</label>
<input type="text" name="Last_name" id="Lastname">
</p>
<p>
<label for="DOB">DOB:</label>
14

<input type="text" name="DOB" id="DOB">


</p>
<p>
<label for="Address">Address:</label>
<input type="text" name="Address" id="Address">
</p>
<p>
<label for="posting">posting:</label>
<input type="text" name="posting" id="posting">
</p>
<p>
<label for="Rank">Rank:</label>
<input type="text" name="Rank" id="Rank">
</p>
<p>
<label for="Division">Division:</label>
<input type="text" name="Division" id="Division">
</p>
<p>
<label for="Sex">Sex:</label>
<input type="text" name="Sex" id="Sex">
</p>
<p>
<label for="Email">Email Address:</label>
<input type="text" name="Email" id="Email">
</p>
<p>
<label for="Sprint_speed">Sprint_speed:</label>
<input type="text" name="Sprint_speed" id="Sprint_speed">
</p>
<p>
<label for="Climb_speed">Climb_speed:</label>
<input type="text" name="Climb_speed" id="Climb_speed">
</p>
<p>
<label for="Aiming_score">Aiming_score:</label>
<input type="text" name="Aiming_score" id="Aiming_score">
</p>
<input type="submit" value="Submit">
</form>
</body>
</html>
<?php
/* Attempt MySQL server connection. Assuming you are running MySQL
server with default setting (user 'root' with no password) */
$link = mysqli_connect("localhost", "root", "", "project");

// Check connection
15

if($link === false){


die("ERROR: Could not connect. " . mysqli_connect_error());
}

// Escape user inputs for security


$S_id = mysqli_real_escape_string($link, $_REQUEST['S_id']);
$First_name = mysqli_real_escape_string($link, $_REQUEST['First_name']);
$Last_name = mysqli_real_escape_string($link, $_REQUEST['Last_name']);
$DOB = mysqli_real_escape_string($link, $_REQUEST['DOB']);
$Address = mysqli_real_escape_string($link, $_REQUEST['Address']);
$posting = mysqli_real_escape_string($link, $_REQUEST['posting']);
$Rank = mysqli_real_escape_string($link, $_REQUEST['Rank']);
$Division = mysqli_real_escape_string($link, $_REQUEST['Division']);
$Sex = mysqli_real_escape_string($link, $_REQUEST['Sex']);
$Email = mysqli_real_escape_string($link, $_REQUEST['Email']);
$Sprint_speed = mysqli_real_escape_string($link, $_REQUEST['Sprint_speed']);
$Climb_speed = mysqli_real_escape_string($link, $_REQUEST['Climb_speed']);
$Aiming_score = mysqli_real_escape_string($link, $_REQUEST['Aiming_score']);

// Attempt insert query execution


$sql = "INSERT INTO soldier (S_id, First_name, Last_name, DOB, Address, posting, Rank, Divi
sion, Sex, Email) VALUES ('$S_id', '$First_name', '$Last_name', '$DOB', '$Address', '$posti
ng', '$Rank', '$Division', '$Sex', '$Email')";
if(mysqli_query($link, $sql)){
echo "Records added successfully.";
} else{
echo "ERROR: Could not able to execute $sql. " . mysqli_error($link);
}

// Attempt insert query execution


$sql = "INSERT INTO skills (S_id, Sprint_speed, Climb_speed, Aiming_score) VALUES ('$S_id',
'$Sprint_speed', '$Climb_speed', '$Aiming_score')";
if(mysqli_query($link, $sql)){
echo "Records added successfully.";
} else{
echo "ERROR: Could not able to execute $sql. " . mysqli_error($link);
}

// Close connection
mysqli_close($link);
?>

Similarly , code for insertion in other table is also written


16

After inserting values


17

3. RESULTS AND DISCUSSION

Through this project, I have learnt a lot of new things about how to create a database in
PHP my admin. I have a basic set of knowledge about connecting frontend with my
backend. In this project the frontend is created by HTML/CSS and the backend is PHP.

By connecting the frontend and backend I can access the database from the frontend and
can insert new values from it to the database without writing the SQL queries again and
again.

The database consists of 14 tables, each one of them connected with primary key and
foreign key constraints.

The result of this project is that the information of the soldier’s is easily available to their
senior and they can add values and change the current values in the database easily.

4. CONCLUSION

I would like to conclude by saying that Military database management system is an


important feature which will decrease a lot of work in the administrator department of the
defence management . The project has secured the information of the military because only
authorised users will be allowed to access the database through the login page created. The
usability of this project seems to suggest that it would be useful for implementation.
18

REFERENCES

1) https://www.w3schools.com/php/

2) https://www.tutorialrepublic.com/php-tutorial/php-mysql-insert-query.php

3) https://www.ionos.com/digitalguide/server/tools/xampp-tutorial-create-your-own-local-
test-server/

4) https://stackoverflow.com/questions/7136918/php-tutorials-with-real-world-applications

S-ar putea să vă placă și