Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
I. Early Work
Access was sequential and the cost of acces grew in direct proportion to the size of the
file.
As files grew very large, unaided sequential access was not a good solution.
Indexes made it possible to keep a list of keys and pointers in a small file that could
be searched very quickly.
With the key and pointer, the user had direct access to the large, primary file.
As indexes also have a sequential flavour, when they grew too much, they also
became difficult to manage.
The idea of using tree structures to manage the index emerged in the early 60’s.
However, trees can grow very unevenly as records are added and deleted, resulting in
long searches requiring many disk accesses to find a record.
In 1963, researchers came up with the idea of AVL trees for data in memory.
AVL trees, however, did not apply to files because they work well when tree nodes
are composed of single records rather than dozens or hundreds of them.
In the 1970’s came the idea of B-Trees which require an O(logk N) access time where
N is the number of entries in the file and k, th number of entries indexed in a single
block of the B-Tree structure --> B-Trees can guarantee that one can find one file
entry among millions of others with only 3 or 4 trips to the disk.
V. Hash Tables
Retrieving entries in 3 or 4 accesses is good, but it does not reach the goal of
accessing data with a single request.
From early on, Hashing was a good way to reach this goal with files that do not
change size greatly over time.
Recently, Extendible Dynamic Hashing guarantees one or at most two disk accesses
no matter how big a file becomes.
File structures is the organisation of data in secondary storage device in such a way that
minimize the access time and the storage space.
A file structure is a combination of representations for data in files and of operations for
accessing the data.
A file structure allows applications to read,write and modify data. It might also support
finding the data that matches some search criteria or reading through the data in some
particular order.
Secondary storage such as disks can pack thousands of megabytes in a small physical
location. Computer Memory (RAM) is limited. However, relative to Memory, access to
secondary storage is extremely slow [E.g., getting information from slow RAM takes 120.
10-9 seconds (= 120 nanoseconds) while getting information from Disk takes 30. 10-3
seconds (= 30 milliseconds)]
Files exist to store information and allow it to be retrieved later. Different systems provide
different
Operations to allow storage and retrieval. Below is a discussion of the most common system
calls
relating to files.
1. Create.
The file is created with no data. The purpose of the call is to announce that the file is
coming and to set some of the attributes.
2. Delete
. When the file is no longer needed, it has to be deleted to free up disk space. A system
call for this purpose is always provided.
3. Open.
Before using a file, a process must open it. The purpose of the open call is to allow the
system to fetch the attributes and list of disk addresses into main memory for rapid access on
later calls.
4. Close.
When all the accesses are finished, the attributes and disk addresses are no longer
needed, so the file should be closed to free up some internal table space. Many systems
encourage this by imposing a maximum number of open files on processes. A disk is written
in
blocks, and closing a file forces writing of the file's last block, even though that block may
not
be entirely full yet.
5. Read.
Data are read from file. Usually, the bytes come from the current position. The caller
must specify how much data are needed and must also provide a buffer to put them in.
6. Write.
Data are written to the file, again, usually at the current position. If the current position
is the end of the file, the file's size increases. If the current position is in the middle of the file,
existing data are overwritten and lost forever.
7. Append.
This call is a restricted form of write. It can only add data to the end of the file.
Systems that provide a minimal set of system calls do not generally have append, but many
systems provide multiple ways of doing the same thing, and these systems sometimes have
append.
8. Seek
. For random access files, a method is needed to specify from where to take the data. One
common approach is a system call, seek, that repositions the file pointer to a specific place in
the file. After this call has completed, data can be read from, or written to, that position.
9. Get attributes
. Processes often need to read file attributes to do their work. For example, the
UNIX make program is commonly used to manage software development projects consisting
of
many source files. When make is called, it examines the modification times of all the source
and object files and arranges for the minimum number of compilations required to bring
everything up to date. To do its job, it must look at the attributes, namely, the modification
times.
11. Rename.
It frequently happens that a user needs to change the name of an existing file. This
system call makes that possible. It is not always strictly necessary, because the file can
usually
be copied to a new file with the new name, and the old file then deleted.
12.Lock.
Locking a file or a part of a file prevents multiple simultaneous access by different process.
1.1.3 Various Storage Kind of Fields and Records
Sequential files
A sequential file is the most primitive of all file structures. It has no directory and no linking
pointers. The records are generally organised in lexicographic order on the value of some
key. In other words, a particular attribute is chosen whose value will determine the order of
the records. Sometimes when the attribute value is constant for a large number of records a
second key is chosen to give an order when the first key fails to discriminate.
The implementation of this file structure requires the use of a sorting routine.
(2) it provides fast access to the next record using lexicographic order.
Its disadvantages:
(1) it is difficult to update - inserting a new record may require moving a large proportion of
the file;
Index-sequential files
Fixed length means having a set length that never varies. In database systems, a field can
have a fixed or a variable length. A variable-length field is one whose length can be different
in each record, depending on what data is stored in the field.
The terms fixed length and variable length can also refer to the entire record. A fixed-length
record is one in which every field has a fixed length. A variable-length record has at least one
variable-length field
1. Backup:
2. Compactness:
3. Data Retrieval:
4. Editing:
5. Remote Access:
Data stored in files of computer-based systems can be shared among multiple users at
a same time.
CHAPTER 2.
System Analysis
The Traditional way of maintaining details of a user in a bank was to enter the detail and
record them. Every time the user needs to perform some transactions he has to go to bank and
perform the necessary actions, which may not be so feasible all the time. It may be a hard-
hitting task for the users and the bankers too. The project gives real life understanding of
offline Banking System and activities performed by various roles in the supply chain. Here,
we provide automation for banking system through offline. Offline Banking System project
captures activities performed by different roles in real life banking which provides enhanced
techniques for maintaining the required information up-to-date, which results in efficiency.
The project gives real life understanding of Offline Banking Management System and
activities performed by various roles in the supply chain.
Sequential File
A very natural way to store a file is in the form of an array, or a linked list of the records.
In these representations, the entire file may be traversed in a linear fashion. This file structure
is called sequential file. It is simple to implement and can be economic in space.
On the negative side, most search operations in such a file are likely to be inefficient, since
searching requires traversing of the sequence of records according to the storage sequence. In
case of large files, particularly when the file is in disk, such traversal times can be too long. If
the structure used is an array (and not a linked list), and the records are of equal sizes, then
searching can be made efficient by keeping the records sorted on one key field. In that case
searching based on that key field can be carried out using binary search. But search based on
any other field value cannot derive the benefit of binary search. Moreover, using an array for
storing a file makes growth or shrinking of the file (due to insertions and deletions)
inconvenient. To overcome this one may use some kind of search tree structure to store
records instead of a simple sequential structure.
2.3 Operation Performed on a File
File Input/Output in C
A file represents a sequence of bytes on the disk where a group of related data is stored. File
is created for permanent storage of data. It is a ready made structure.
In C language, we use a structure pointer of file type to declare a file.
FILE *fp;
C provides a number of functions that helps to perform basic file operations. Following are
the functions,
Function description
fopen() create a new file or open a existing file
fclose() closes a file
getc() reads a character from a file
putc() writes a character to a file
fscanf() reads a set of data from a file
fprintf() writes a set of data to a file
getw() reads a integer from a file
putw() writes a integer to a file
fseek() set the position to desire point
ftell() gives current position in the file
rewind() set the position to the begining point
________________________________________
Opening a File or Creating a File
The fopen() function is used to create a new file or to open an existing file.
General Syntax:
*fp = FILE *fopen(const char *filename, const char *mode);
Here, *fp is the FILE pointer (FILE *fp), which will hold the reference to the opened(or
created) file.
filename is the name of the file to be opened and mode specifies the purpose of opening the
file. Mode can be of following types,
mode description
R opens a text file in reading mode
W opens or create a text file in writing mode.
A opens a text file in append mode
r+ opens a text file in both reading and writing mode
w+ opens a text file in both reading and writing mode
a+ opens a text file in both reading and writing mode
Rb opens a binary file in reading mode
Wb opens or create a binary file in writing mode
Ab opens a binary file in append mode
rb+ opens a binary file in both reading and writing mode
wb+ opens a binary file in both reading and writing mode
ab+ opens a binary file in both reading and writing mode
________________________________________
Closing a File
The fclose() function is used to close an already opened file.
CHAPTER 3
SYSTEM DESIGN
3.1.1. Insertion:
- In our Student Transportation management system we are having following insertion as
follows,
1. Name
2. Father name
3. Phone number
4. Address
5. Profession
6. Seat number
7. Username
8. Password
3.1.2. Display:
In our Student Transportation management system we are having following Display of
record,
1. Name
2. Father name
3. Phone number
4. Address
5. Profession
6. Seat no
7. Total Fee amount
3.1.3. Search:
In our Student Transportation management System we have the following Search record,
1. Enter the username:
Chapter 4: Implementation
It is pronounced "see-plus-plus."
C++ is one of the most popular languages primarily utilized with system/application
software, drivers, client-server applications and embedded firmware.
The main highlight of C++ is a collection of predefined classes, which are data types that can
be instantiated multiple times. The language also facilitates declaration of user-defined
classes. Classes can further accommodate member functions to implement specific
functionality. Multiple objects of a particular class can be defined to implement the functions
within the class. Objects can be defined as instances created at run time. These classes can
also be inherited by other new classes which take in the public and protected functionalities
by default.
C++ includes several operators such as comparison, arithmetic, bit manipulation and logical
operators. One of the most attractive features of C++ is that it enables the overloading of
certain operators such as addition.
A few of the essential concepts within the C++ programming language include
polymorphism, virtual and friend functions, templates, namespaces and pointers.
4.2 Pseudocode
int register_now::registration_form()
string password;
char pwd[7];
int i=0;
system("cls");
a++;
fstream fil5;
fil5.open("login.txt",ios::out|ios::app);
cout<<" \n";
int x=strlen(b);
for(int i=0;i<x;i++)
Sleep(25);
cout<<b[i];
cout<<endl<<endl<<setw(5)<<"NAME :";
cin>>name[0];
cin>>name[1];
cout<<endl<<setw(5)<<"Ph_no:";
cin>>name[2];
cout<<endl<<setw(35)<<"ADDRESS:";
cin>>name[3];
cout<<endl<<setw(10)<<"PROFESSION:";
cin>>name[4];
int count=1;
for(int i=0;i<10;i++)
for(int j=0;j<5;j++)
if(j==3)
cout<<" ";
}cout<<setw(4)<<count<<" ";count++;
cout<<endl;
cout<<" ";
for(int i=51;i<=60;i++)
cout<<setw(3)<<i;
string user4;
cout<<": ";
cin>>name[5];
if(user4=="student"||"STUDENT")
cin>>name[6]; //<<a;
cout<<endl<<"PASSWORD :";
while(i<6)
pwd[i]=getch();
putchar('*');
++i;
password=pwd;
fil5<<name[6]; //<<a;
fil5<<password<<"\n";
name[7]="17000";
cout<<name[7];
fil5.close();
fstream fil2;
fil2.seekg(74);
fil2<<" ";
//fil2.setf(ios::left,ios::adjustfield);
for(int i=0;i<6;i++)
fil2.setf(ios::left,ios::adjustfield);
fil2<<setw(20)<<name[i];
count++;
}
fil2<<endl;
Sleep(600);
else
if(user4=="staff"||"STAFF")
cout<<name[6];
cout<<endl<<"PASSWORD :";
while(i<6)
pwd[i]=getch();
putchar('*');
++i;
password=pwd;
fil5<<name[6];
fil5<<password<<"\n";
name[7]="17000";
cout<<name[7];
fil5.close();
fstream fil2;
fil2.seekg(74);
fil2<<name[5];
//fil2.setf(ios::left,ios::adjustfield);
for(int i=0;i<6;i++)
fil2.setf(ios::left,ios::adjustfield);
fil2<<setw(20)<<name[i];
count++;
fil2<<endl;
Sleep(600);
int main()
char ch;
system("COLOR 2C");
while(1)
system("cls");
cout<<endl<<endl;
fstream f2;
f2.open("sysmbol.txt",ios::in);
while(f2)
f2.get(ch);
cout<<ch;
}
Sleep(1000);
system("COLOR 8F");
int size;
size=strlen(a);
for(int i=0;i<size;i++)
Sleep(25);
cout<<a[i];
int c=1;
cout<<endl<<endl;
Sleep(0);
for(int i=0;i<1;i++)
int x = 16;
int y = 10;
for (y=10;y<19;y++)
gotoXY(x,y);
Sleep(100);
// gotoXY(x,y);
}
y=19;
for (x=16;x<63;x++)
gotoXY(x,y);
Sleep(20);
// gotoXY(x,y);
for (y=10;y<20;y++)
gotoXY(x,y);
Sleep(100);
// gotoXY(x,y);
register_now r1;
staff_login s1;
student_login s2;
int ch;
cin>>ch;
fstream f1;
switch(ch)
{
case 1:system("COLOR 1F");
r1.instructionsform();
break;
s1.login();
break;
s2.login();
break;
r1.notice();
break;
default:exit(0);
break;
getch();
return 0;
int student_login::allotmentform()
system("cls");
string j,tem[10];
int i,d;
cin>>j;
ifstream f8;
f8.open("list_of_students.txt",ios::in);
f8.seekg(0,ios::beg);
while(!f8.eof())
i++;
string temp;
f8 >> temp;
if(temp == j)
d=f8.tellg();
break;
int y=d+6;
int l=0;
while(d!=y)
d++;
string temp;
f8>>temp;
tem[l]=temp;
l++;
system("cls");
cout.setf(ios::left,ios::adjustfield);
getch();
return 1;
4.3 Testing
4.3.1 ACCEPTANCE TESTING is a level of software testing where a system is tested for acceptability.
The purpose of this test is to evaluate the system’s compliance with the business requirements and
assess whether it is acceptable for delivery.
4.3.2 SYSTEM TESTING is a level of software testing where complete and integrated software is
tested. The purpose of this test is to evaluate the system’s compliance with the specified
requirements. The process of testing an integrated system to verify that it meets specified
requirements.
4.3.3 Integration testing (sometimes called integration and testing, abbreviated I&T) is the
phase in software testing in which individual software modules are combined and tested as a
group. It occurs after unit testing and before validation testing. Integration testing takes as its
input modules that have been unit tested, groups them in larger aggregates, applies tests
defined in an integration test plan to those aggregates, and delivers as its output the integrated
system ready for system testing.[1]
4.4.1 Menu
4.4.2 Insertion
4.4.3 Searching a record:
CHAPTER 5
There are opportunities for increased efficiency from using computerized routing tools in rural
school districts. Although the routes produced by the study have not been put into effect as of the
time of the publication of this report, significant improvements in efficiency were identified. Given
the challenges, it is likely that a formal introduction of computerized routing techniques and
increased levels of coordination will occur in the coming years.
FUTURE ENCHANCEMENTS:
The “Student Transportation Management System” is a big and ambitious project. I am thankful for
being provided this great opportunity to work on it. As already mentioned, this project has gone
through extensive research work. On the basis of the research work, we have successfully designed
and implemented Student Transportation Management System. To know what the future of Student
Transportation looks like, it’s probably worth looking at the present – Student Transportation isn’t
new. When you think of Student Transportation, you probably think about a computer (either a
desktop or laptop), a three or four step security process and then an interface that lets you view the
routes and information of all the students and staff memebers travelling. The Student Transpotation
Management has a better future obviously because it is better than the manual way of handling the
records.
REFERENCES:
Anderle, S.J., D.A. Kroeger, and J. Mascarello. 2005. Coordination of Transit and School Busing in
Iowa. Iowa Department of Transportation.
Baltes, M.R. 2001. Opportunities for the Coordination of General Public Transit and School Bus
Transportation.
Tampa, FL: Center for Urban Transportation Research. Burckhardt, J.E., D. Koffman, and G. Murray.
2003. Economic Benefits of Coordinating Human Service Transportation and Transit Services. TCRP
Report 91. Washington, D.C.: Transit Cooperative Research Program.