Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 23-04-2009
Member
 
Join Date: Mar 2009
Posts: 175
Creation of an index for file

I do a program to manage a number of data stored on a file, and that I will carry out operations (search, add ...).

The problem is that you create an index which will also be stored on a file, and I do not understand how to put it in place.

For example, if I make a table that includes the types (eg, my file has films -> I want to look for an action movie), I do not understand how to link this table with the other elements of the file ( I have a movie with a name, type etc).

Otherwise there are the trees but it's the same I do not understand how, if I create a structure with the file and the key to identification of the film, I fail to see how the hierarchical ordered data tree, and then how to connect all the movies with my index.

I do not know if it is comprehensible what I said, I just want to be informed on the operation and the creation of the index (that is it is a function in their own right?)
Reply With Quote
  #2  
Old 23-04-2009
XSI XSI is offline
Member
 
Join Date: May 2008
Posts: 271
Re: Creation of an index for file

You do not have access to a database?

That's it for this, and a motion base that is still easier than simply typing the key problems of dead, corrupted files, etc..

Otherwise, simply working with files using a specific format. Either XML, or stupidly CSV with automatic interpretation house. And store them in hash tables (eg structures linked with an identifier and some fields).

In all cases, you must think about your data model before you begin typing a single line of code.
Reply With Quote
  #3  
Old 23-04-2009
Member
 
Join Date: May 2008
Posts: 685
Re: Creation of an index for file

An index file is like an index at the end of a book. It has on each line: the key, then the page number, or registration, or address, where the corresponding record in the key. Usually, it indicates the number of bytes in the data file where the record and can then pick up the registration with fseek () and fread ().

If you want to do a search on the title of a film, it must be an index whose key is the film titles. If you want to research the kind of film, it must be another index which is the key type of film.
Reply With Quote
  #4  
Old 23-04-2009
XSI XSI is offline
Member
 
Join Date: May 2008
Posts: 271
Re: Creation of an index for file

I had not interpreted "index" in this sense, is that what is required.

Not that the basic principle is difficult to code, but say that there is a whole list of cases to manage the design database took years to resolve (for example, detect the need to rebuild an index after a crash or any recovery).

Again, in this case I would prefer to use a database to focus on the data model and leave the technical management to a proven software. Especially there are free with APIs for the attack in C (MySQL).
Reply With Quote
  #5  
Old 23-04-2009
Member
 
Join Date: Mar 2009
Posts: 175
Re: Creation of an index for file

Ok, so basically if I want to search for several different criteria, I must create as many indexes as there are criteria?
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Creation of an index for file"
Thread Thread Starter Forum Replies Last Post
"File Creation Error. Unable to rename/copy audio file" with CamStudio Mitchell-Y Windows Software 5 13-06-2012 02:04 PM
Creation of jar file with MS-DOS Logan 2 Software Development 5 08-03-2010 02:36 PM
Inserting an index entry into index 0 of file 25 Dharmesh Arora Operating Systems 3 16-07-2009 10:10 AM
about creation file error shortie009 Operating Systems 3 09-12-2008 11:49 AM
Creation / Opening file: rohit007 Software Development 2 03-10-2008 07:50 PM


All times are GMT +5.5. The time now is 03:46 PM.