Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Database experiment

Status
Not open for further replies.

fenris

Programmer
May 20, 1999
824
CA
I am writting a few java classes that will catalog the contents of my cd-rom collection. I have designed the file cataloging and filtering system to be general. My problem is, what is the best way to store the information on the harddrive? I am familiar with output text to an ascii file and that is about it. I just ran my program to catalog the contents of my c:, the resulting text file was about 2 megs. All that I was currently storing (Just testing things out to make sure they work before adding more information) the names of the files and their paths.<br><br>Any suggestions would be appreciated and I would also like to stay away from databases like access, unless it is very easy to implement.<br> <p> fenris<br><a href=mailto:fenris@hotmail.com>fenris@hotmail.com</a><br><a href= > </a><br> I am interested in Mining Software, as well as Genetic Algorithms.
 
Dear fenris,<br><br>You stated:<br><br>&gt;Any suggestions would be appreciated and I would also like <br>&gt;to stay away from databases like access, unless it is very <br>&gt;easy to implement.<br><br>This is a catch 22. A database is just a file storage system, so if you write your own system you are re-inventing the wheel to some degree. However to use a SQL database you need to learn SQL and the administrative interface to the database.<br><br>In both cases you have some work to do. If you 'roll your own' then the next time you need to store data you might have some redundant work to do.<br><br>If you go with SQL then the next time you can focus on solving your particular problem and not have to be concerned about 'how to store the data'.<br><br>&quot;But, that's just my opinion... I could be wrong&quot;.<br>-pete
 
Thanks pete for the comment,<br>&nbsp;I aggree with you on that note about redundant work, but I am trying to learn how a database, like access, progress or oracle works from the ground up, with the SQL making it easy to get the interface.<br><br>Besides the program that I have written is basically for my own use and I am trying to make it as easy as possible to override my database if one wishes to use something else.<br><br>I have another question, the database that I have written is about 2Mb in size. It is an ascii text file and each line contains the fies complete path, the files name and the files extension. The are approximately 2GB of files that were cataloged from my hardrive. I am wondering if a commercial packages database would be close to the same size as my implementation if they were to contain the same information.<br> <p> fenris<br><a href=mailto:fenris@hotmail.com>fenris@hotmail.com</a><br><a href= > </a><br> I am interested in Mining Software, as well as Genetic Algorithms.
 
I just thought of something else.<br><br>They approach that I am taking in creating the database is simple to search the particular directory and catalog all the files there to an array. The array is then filtered for specific files. From the filtered array the info goes to a text file.<br><br>Is this the best way to catalog the information or should I bypass the storage of the information in the array and simple output the raw contents to a database and then filter recall the contents to filter them?<br><br>Right now the program is general, in that it searches and writes info about all the files. My ultimate goal is to be able to extend this class and use it to catalog my mp3 collection which my span multiple cd-roms as well.<br><br>Does anyone have some ideas how I can make it better or more efficient. I would like to stick with a custom database, it doesn't have to be ascii, because I would like to be able to give the program to my friends so they can do the same thing with a minimum of configuration, since they do not know java.<br><br> <p> fenris<br><a href=mailto:fenris@hotmail.com>fenris@hotmail.com</a><br><a href= > </a><br> I am interested in Mining Software, as well as Genetic Algorithms.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top