DLL or Plaintext?

Please discuss general Delphi programming topics here.

DLL or Plaintext?

Postby ina » December 7th, 2009, 3:36 pm

Need your advise.

If I have many data (million) and I want to put them in external file. What should it be? A DLL file (the data will store in array) or just store it in plaintext?

I want the program can find the data very fast in external file and of course the memory consumtion is small. I dont want to use Access and so on or any runtime file.
ina
Active Member
Active Member
 
Posts: 14
Joined: November 24th, 2009, 4:34 pm

Re: DLL or Plaintext?

Postby Sezar » December 8th, 2009, 7:05 am

if you don't use a database,you lost many power of searching,inserting and etc.
however if you store data in the array in the dll you need a lot of memory.
if you search on the Internet,you will find lite databases that can work without any driver.
Sezar
Sezar
Junior Member
Junior Member
 
Posts: 42
Joined: April 18th, 2007, 4:40 pm
Location: Mashhad,Iran

Re: DLL or Plaintext?

Postby ina » December 8th, 2009, 10:39 am

I just need searching operation so I think database in not needed..

btw I found quick sort and binary search to search faster in array, but yes the proble is the memory is still big.
ina
Active Member
Active Member
 
Posts: 14
Joined: November 24th, 2009, 4:34 pm

Re: DLL or Plaintext?

Postby Stefan » December 9th, 2009, 9:56 am

Perhaps you can use CreateFileMapping() and MapViewOfFile() to load it into memory?
User avatar
Stefan
Moderator
Moderator
 
Posts: 128
Joined: September 27th, 2004, 9:40 am
Location: Tilburg, The Netherlands


Return to Delphi Programming

Who is online

Users browsing this forum: No registered users and 3 guests

cron