Fs Report
Fs Report
CHAPTER 1
INTRODUCTION
Storage of data
Organization of data
Access to data
This will be built on your knowledge of Data Structures.
1
Department of IS&E ,PESITM ,Shivamogga
Vehicle parking management system
The problem was that, even with a balanced binary tree, dozens of accesses were required
to find a record in even moderate-sized files. A method was needed to keep a tree balanced 2when
each node of thee tree was not a single record, as in a binary tree, but a file block containing
dozens, perhaps even hundreds, of records. Hashing is a good way to get what we want with a
single request, with files that do not change size greatly over time. Hashed indexes were used to
provide fast access to files. But until recently, hashing did not work well with volatile, dynamic
files. Extendible dynamic hashing can retrieve information with 1 or at most 2 disk accesses, no
matter how big the file became
2
Department of IS&E ,PESITM ,Shivamogga
Vehicle parking management system
1.3 RECORD
A record is a collection of fields, possibly of different data types, typically in fixed number
and sequence. The fields of a record may also be called members, particularly in object-oriented
programming. Fields may also be called elements, though the risk confusion with the elements of
the collection.
For example, a data could be stored as record containing a numeric year field, a month
field represented as a string, and a numeric day-of-month field. A personnel record might contain a
name, a salary, and a rank. A circle record contains a center and a radius- in this instance, the
center itself might be represented as point record containing x and y coordinates.
Records are distinguished from arrays be the fact that their number of fields is typically
fixed, each field has a name, and that field may have a different type.
A record type is a data type that describes such values and variable. Most modern
computer languages allow the programmer to define new data record types. The definition
includes specifying the data types of each field and the identified by which it can be accessed. In
type theory, product types are generally preferred due to the simplicity, but the proper record types
are studied in languages such as System F-sub. Since type-theoretical records may contain first
class function-typed fields in addition to data, they can be express many features of object oriented
programming.
Structure, especially liked data structure. Many computer files are organized as array of
logical records, often grouped into larger physical records or block for efficiency.
Record Structures:
1. Fixed Length Record Structure: Each record is stored in fixed size. The size can be determined
by adding the maximum space occupied by each field and some space reserved for the header data.
2. Fixed Field Count: The number of the fields in each record is fixed.
3. Index Structure for Records: An index is a collection of key field and reference field.
4. Key Field: Key Field is a member of record which can uniquely identify the record.
5. Reference Field: Reference Field contains the value that points to the address of the
corresponding record in the file.
3
Department of IS&E ,PESITM ,Shivamogga
Vehicle parking management system
Thus the representation of a variable-length record can be divided into two parts:
1. An initial part of the record with fixed-length attributes such as numeric values, dates, fixed-
length character attributes for storing their value.
2. The data for variable-length attributes such as varchar type is represented in the initial part of
the record by (offset, length) pair. The offset refers to the place where that record begins, and
length refers to the length of the variable-size attribute. Thus, the initial part stores fixed-size
information about each attribute, i.e., whether it is the fixed-length or variable-length attribute.
4
Department of IS&E ,PESITM ,Shivamogga
Vehicle parking management system
Relative to other parts of a computer, disks are slow. 1 can pack thousands of
megabytes on a disk that fits into a notebook computer. The time it takes to get information from
even relatively slow electronic random-access memory (RAM) is about 120 nanoseconds. Getting
the same information from a typical disk takes 30 milliseconds. So, the disk access is a quarter of a
million times longer than a memory access. Hence, disks are very slow compared to memory. On
the other hand, disks provide enormous capacity at much less cost than memory.
They also keep the information stored on them when they are turned off Tension between
a disk’s relatively slow access time and its enormous, non-volatile capacity, is the driving force
behind file structure design.
5
Department of IS&E ,PESITM ,Shivamogga
Vehicle parking management system
CHAPTER 2
2.1 Overview Of Vehicle parking Management System :
The Vehicle Parking Management System is an innovative software solution designed to
streamline and enhance the management of vehicle parking in a variety of settings. The vehicle
parking Management System aims to address the challenges faced by establishments in effectively
organizing and controlling their parking operations. By leveraging advanced technology and a
user-friendly interface, VPMS offers a comprehensive suite of features that simplify the process of
check-in, check-out, and billing, having account of number of vehicles , and optimizing production
workflows. This report provides an overview of the key functionalities and benefits of the vehicle
parking Management System.
Design and develop a comprehensive mocktail management system that addresses the
challenges faced by restaurants, and beverage establishments in efficiently managing their
mocktail recipes, inventory, pricing, and ordering processes. The system should streamline
mocktail creation, enhance inventory control, optimize pricing strategies, and facilitate seamless
communication between bartenders, management, and suppliers, ultimately improving overall
operational efficiency and customer satisfaction
6
Department of IS&E ,PESITM ,Shivamogga
Vehicle parking management system
CHAPTER 3
7
Department of IS&E ,PESITM ,Shivamogga
Vehicle parking management system
8
Department of IS&E ,PESITM ,Shivamogga
Vehicle parking management system
9
Department of IS&E ,PESITM ,Shivamogga
Vehicle parking management system
10
Department of IS&E ,PESITM ,Shivamogga
Vehicle parking management system
CHAPTER 4
This chapter is algorithm and implementation of the vehicle parking management information using
file structure concept of variable length record.
1. Declare variables
4. If file does not exist, open the text file in output and append mode, write the details into the file
and close the file
11
Department of IS&E ,PESITM ,Shivamogga
Vehicle parking management system
8. Open the text file in output and append mode to write the new details
12
Department of IS&E ,PESITM ,Shivamogga
Vehicle parking management system
1. Declare variables
8. If found equal to 0
13
Department of IS&E ,PESITM ,Shivamogga
Vehicle parking management system
b. Display the message stating record deleted successfully and increment the found
variable
c. Else append the details into another file by opening that file in out and append mode
14
Department of IS&E ,PESITM ,Shivamogga
Vehicle parking management system
1. Declare variables
7. If found equals to 0
15
Department of IS&E ,PESITM ,Shivamogga
Vehicle parking management system
CHAPTER-5
16
Department of IS&E ,PESITM ,Shivamogga
Vehicle parking management system
int main()
int choice;
char ans;
system ("cls");
do {
system ("cls" ) ;
cout<<"********************************************************************"<<endl;
cout<<" VEHICLE PARKING RESERVATION SYSTEM "<<endl;
cout<<"1. Arrival of a vehicle"<<endl
cout<<"2. Total number of vehicles parked"<<endl
cout<<"3. Departure of vehicle"<<endl
cout<<"4. Total Amount collected "<<endl
cout<<"5. Display "<<endl
cout<<"6. Exit"<<endl
cout<<"********************************************************************"<<endl
cout<<"Enter your Choice : ";
cin>>choice;
switch(choice)
{
case 1: system ( "cls" ) ;
cout<<"Add : "<<endl;
veh.at(i).addVehicle();
break;
case 2: system ( "cls" ) ;
totalveh();
break;
case 3: system ( "cls" ) ;
cout<<"Departure : "<<endl
veh.at(i).deleteVehicle();
break;
case 4: system ( "cls" ) ;
totalamount();
break;
case 5: system ( "cls" ) ;
veh.at(i).show();
17
Department of IS&E ,PESITM ,Shivamogga
Vehicle parking management system
break;
case 6: exit(0);
}
cout<<"\n Do you want to continue, press y/n : "<<endl;
cin>>ans;
if(ans=='n')
{
break;
}
else
{ conti
nue; }
}while(1);
return 0;
}
18
Department of IS&E ,PESITM ,Shivamogga
Vehicle parking management system
void vehicle::addVehicle()
{
vehicle *v = new vehicle;
cout<<"Enter vehicle type(1 for Car/2 for Bike) : ";
cin>>v->type;
cout<<"Enter vehicle number : ";
cin>>v->pltno;
cout<<"Enter arrival time in hours minutes and seconds : ";
cin>>v->arrive.hh>>v->arrive.col1>>v->arrive.mm>>v->arrive.col2>>v->arrive.ss;
cout<<"Enter date in day month and year: ";
cin>>v->dt.day>>v->dt.sym1>>v->dt.month>>v->dt.sym2>>v->dt.year;
veh.at(i).pltno=v->pltno;
veh.at(i).type=v->type;
veh.at(i).arrive.hh=v->arrive.hh;
veh.at(i).arrive.mm=v->arrive.mm;
veh.at(i).arrive.ss=v->arrive.ss;
veh.at(i).dt.day=v->dt.day;
veh.at(i).dt.month=v->dt.month;
veh.at(i).dt.year=v->dt.year;
i++;
totalvehicle++;
if(v->type == 1)
{
totalcar++;
}
else
{ tot
albike++;
} cout<<"\
nVehicle added successfully"<<endl;
}
19
Department of IS&E ,PESITM ,Shivamogga
Vehicle parking management system
cin>>pno;
cout<<"Enter departure time in hours minutes and seconds : ";
cin>>depart.hh>>depart.col1>>depart.mm>>depart.col2>>depart.ss;
for(int j=0;j<=i;j++)
{ if((veh.at(j).pltno==pno)&&(veh.at(j
).type==typ)) {
veh.at(j).departure.hh=depart.hh;
veh.at(j).departure.mm=depart.mm;
veh.at(j).departure.ss=depart.ss;
time_diff=computeTimeDifference(veh.at(j).arrive,depart);
if(veh.at(j).type== 1)
{
totalcar--;
if(time_diff<2)
{ char
ge=20;
}
else
{
if((time_diff>2) && ((time_diff<5)))
{
charge=40;
}
else
{ charg
e=50;
}
}
}
else
{ to
talbike--;
if( time_diff<2)
{
charge=5;
}
else
{ if((ti
me_diff>2) && ((time_diff<5)))
{ cha
rge=10;
}
else
{ ch
20
Department of IS&E ,PESITM ,Shivamogga
Vehicle parking management system
arge=20;
}
}
} cout<<"\
nVehicle having vehicle number : "<<veh.at(j).pltno<<" has left the parking after paying Rs.
"<<charge<<endl;
file.open("parkingDatabase.txt",ios::app);
if(!file)
{
cerr << "Error: file could not be opened" << endl;
exit(1);
} file<<veh.at(j).type<<"\t\t\t"<<veh.at(j).pltno<<"\t\t\
t"<<veh.at(j).dt.day<<"/"<<veh.at(j).dt.month<<"/"<<veh.at(j).dt.year<<"\t\t\t"<<
veh.at(j).arrive.hh<<":"<<veh.at(j).arrive.mm<<":"<<veh.at(j).arrive.ss<<"\t\t\
t"<<veh.at(j).departure.hh<<":"<<veh.at(j).departure.mm<<":"<<veh.at(j).departure.ss<<endl;
file.close();
veh.erase(veh.begin()+j);
i-;
totalvehicle--;
totalamt = totalamt+charge;
break;
}
if(j==i)
{ cou
t<<"\nWrong Entry , Try Again "<<endl;
cout<<"Departure : "<<endl;
deleteVehicle();
}
}
21
Department of IS&E ,PESITM ,Shivamogga
Vehicle parking management system
void vehicle::printvehicle(vehicle v)
cout<<v.type<<"\t\t\t"<<v.pltno<<"\t\t\t"<<v.dt.day<<"/"<<v.dt.month<<"/"<<v.dt.year<<"\t\t\t"<<
v.arrive.hh<<":"<<v.arrive.mm<<":"<<v.arrive.ss<<endl;
void vehicle::show()
for(int j=0;j<i;j++)
printvehicle(veh[j]);
void totalveh()
22
Department of IS&E ,PESITM ,Shivamogga
Vehicle parking management system
void totalamount()
23
Department of IS&E ,PESITM ,Shivamogga
Vehicle parking management system
CHAPTER 6
This section consists of operations such as insertion , display , search , modify and
deletion of records (vehicle).
24
Department of IS&E ,PESITM ,Shivamogga
Vehicle parking management system
25
Department of IS&E ,PESITM ,Shivamogga
Vehicle parking management system
26
Department of IS&E ,PESITM ,Shivamogga
Vehicle parking management system
CHAPTER 6
CONCLUSION
In this mini project emphasis on managing the vehicle parking management using variable
length record is done. The validation of mini project is done by conducting different set of operations
like insertion, deletion, display by considering different data set. Thus, we strongly design our project
using variable length record. It is much easier and user friendly because it is organized in such a way
that variable length record strategy is used in storage compaction. Hence variable length record can be
very effective mode of operating on records
27
Department of IS&E ,PESITM ,Shivamogga
Vehicle parking management system
REFERENCES
28
Department of IS&E ,PESITM ,Shivamogga