[Lazarus] Embedded database for Lazarus/Linux

waldo kitty wkitty42 at windstream.net
Thu Jun 17 23:22:11 CEST 2010


On 6/17/2010 15:26, Henry Vermaak wrote:
> On 17 June 2010 20:07, Graeme Geldenhuys<graemeg.lists at gmail.com>  wrote:
>> On 17/06/2010, Henry Vermaak wrote:
>>> re-invent the wheel.  Why would you design your own buggy binary data
>>> file that only your program can read,
>>
>> Last time I checked, writing a record to a binary file was pretty damn
>> easy. I think I learned that in my first year of Turbo Pascal
>> programming back in high school (many, many years ago). I can't see
>> why that would be buggy either.
>
> I've seen horrendous bugs, overflow, corruption.

yes, there are some extremely poor implementations out there...

> What happens if your structures change?

since you've both the old and the new, you simply process the existing data file 
with the old structures, convert it to vars in the new structures and then save 
it to a new data file in the new format... conversion programs like this are 
pretty bog simple but they can be tedious depending on the number of vars you 
have to work with... one of the sets i work with has over 200 settings and 
options ;)

> Can you do relations?

sure! you just do the same thing as in a database... you have your key here and 
it is linked in each related record over there... nothing more than a while loop 
walking thru the other data file(s) looking for a particular link key in each 
record... i was doing that before i had to become a dBase II/IV coder ;)

> Let's not compare apples with pears.

exactly :)




More information about the Lazarus mailing list