Home  |  About  | Last |  Submit  |  Contact
AllQuests.com

Previous Question:  Wanted Gun 360 Resident Evil DS  Archive : Completed Business Expired ThreadsNext Question:  The PS3s superiority is STARTING to show  Trash Can

Question File system ( CodeGuru Forums Database )
Updated: 2008-08-12 06:09:20 (4)
File system

I have a plan to start a new project in which the back end is supposed to be a File system instead of a database server. And, this file is going to contain millions of records.

Since a file has to be searched sequentially, it might take a lot of time to retrieve a specific record.
I heard that, using indexing would make the search much faster.I don't have much of an idea about how to implement indexing.

i want to know how indexing is carried out in a file system...and also i want to know whether there is only a single file or multiple files for storing the large data...

pls help meeeee

thank you

Answers: File system ( CodeGuru Forums Database )
File system

The first requirement is that each record have a specific key field on which to
match when searching. You then create an index file which holds the keys
for each record in the data file, together with the position in the data file to
which you can seek to retrieve a record. If the index file is maintained in
sorted order, searching for a record may be optimized. i.e. - If reading the
indexes sequentially, you can tell if a record doesn't exist as soon as an
index of greater value is encountered without getting a match. Also, a sorted
index can be searched using a binary search method to reduce key comparisons
to a minimum. If the index file is not maintained in sorted order on disc, it can
be read entirely into memory and sorted there before using.

Beyond a simple index, you can have a linked index which includes pointers
to the next and previous index items a la a doubly linked list. The data file itself
may also have such forward/backward pointers in each record. Such a structure
obviates the need for sorting the data, as it may be retrieved sequentially
even though the records are written randomly.

Consider and investigate ISAM - Indexed Sequential Access Method..

CodeMillenium

File system

Why did you choose to use files instead of database?
Since indexing is intensively used on databases you have to re-write what was implemented yet. And you will give up all facilities that databases can offer.

davide++

File system

Thanks Davide++ for ur reply....
In ur opinion which one is best ....file system or database...(in security based )??

ammus

File system

Quote:
Originally Posted by ammus
In ur opinion which one is best ....file system or database...(in security based )??

Databases differ in the levels of complexity security. But in general, spending some time selecting the database that most suites your needs will cost you much less than re-inventing it.



Previous Question:  Wanted Gun 360 Resident Evil DS  AVForums  Archive : Completed Business Expired ThreadsNext Question:  The PS3s superiority is STARTING to show  PS3Forums  Trash Can

- Source: File system CodeGuru Forums Database
- Previous Question: Wanted Gun 360 Resident Evil DS AVForums Archive : Completed Business Expired Threads
- Next Question: The PS3s superiority is STARTING to show PS3Forums Trash Can





AllQuests.com


Best dedicated servers   Top dedicated servers   Cheap dedicated servers   Linux dedicated servers   Windows dedicated servers   Unmetered dedicated servers