TDBF vs TurboPower FlashFiler lazarus / 16-Databases ---------------------------------------------------------------------- Graeme · 2015-09-26 11:11 Hi, I'm again revisiting the idea of porting FlashFiler to FPC, but trying to justify if it is worth it or not. The NexusDB owner offered me (at one stage) a possible license deal in porting NexusDB to FPC too. My goal - have a database 100% compiled into the executable. At this point I'm looking for local access only. So how does TDBF compare to FlashFiler? * Both support local databases * Both store a db table per file * TDBF uses external files for indexes. Not sure what FlashFiler does. * TDBF is local database only. FlashFiler is local and client/server. On the other hand, NexusDB surpassed FlashFiler in features. eg: Views, Stored Procedures (which I never use), more up to date SQL syntax, and very very nice FTS (full-text search) support. I've never seen the NexusDB code, so I have no clue how "portable" it is though. The pros for TDBF and FlashFiler is 100% free. Benefits will be easy deployment even for platforms like FreeBSD, OSX and probably even Android. Please don't mention SQLite - I'm not interested in that. I'm also well versed on Firebird Embedded (I'm a big fan of Firebird) - and I fully know the deployment issues under OSX, and no official support for Android (but apparently it is coming). So with the above said, what is the benefits of FlashFiler over TDBF? Any old Turbo Pascal or Delphi developers here that could comment? Regards,   - Graeme - ---------------------------------------------------------------------- sfeinst · 2015-09-26 21:37 I can't help you, never used FlashFiler.  But I would like to throw out how I would approach making the decision.  What doesn't TDBF do that you want or what does it do that you don't like?  Only then would I look at another technology to see if it had those items.  Even if the other technology is better, if the existing technology covers your needs, why change it (other than the fun of coding which I fully understand). ---------------------------------------------------------------------- taazz · 2015-09-27 06:49 Quote from: Graeme on September 26, 2015, 01:11:55 pmHi, I'm again revisiting the idea of porting FlashFiler to FPC, but trying to justify if it is worth it or not. The NexusDB owner offered me (at one stage) a possible license deal in porting NexusDB to FPC too. My goal - have a database 100% compiled into the executable. At this point I'm looking for local access only. So how does TDBF compare to FlashFiler? * Both support local databases * Both store a db table per file * TDBF uses external files for indexes. Not sure what FlashFiler does. Flashfiler as far as remember can do both in and out of table indexes default is in table indexes. Quote from: Graeme on September 26, 2015, 01:11:55 pm* TDBF is local database only. FlashFiler is local and client/server. On the other hand, NexusDB surpassed FlashFiler in features. eg: Views, Stored Procedures (which I never use), more up to date SQL syntax, and very very nice FTS (full-text search) support. I've never seen the NexusDB code, so I have no clue how "portable" it is though. The pros for TDBF and FlashFiler is 100% free. Benefits will be easy deployment even for platforms like FreeBSD, OSX and probably even Android. Please don't mention SQLite - I'm not interested in that. I'm also well versed on Firebird Embedded (I'm a big fan of Firebird) - and I fully know the deployment issues under OSX, and no official support for Android (but apparently it is coming). So with the above said, what is the benefits of FlashFiler over TDBF? Any old Turbo Pascal or Delphi developers here that could comment? Regards,   - Graeme - in favor of flashfiler you can also add SQL support.table encryption.transactions (normal and failsafe), I have no idea if they are supported in the fpc tdbf implementation.multi threaded server (a pain to port I guess and not strictly a plus for local storage but here it is).I don't remember anything else at the moment I'll have to install the binaries from source forge and take a look again. Just a heads up there where a port of turbopower b-tree filer posted on the mailing list have you tried to use that as your local engine? If you do not use sql then I guess it might fit your local storage better. ---------------------------------------------------------------------- Graeme · 2015-09-28 10:07 Thank you taazz, those are good points.  Another point Michael van Canneyt mentioned in the mailing list is that TDBF doesn't support cross-table queries, whereas FlashFiler does. As for TurboPower B-Tree, I require SQL support, so b-tree is not an option. ---------------------------------------------------------------------- SunyD · 2016-04-18 04:30 I ported FlashFiler to lazarus for Windows today. It is real good . I am wondering why I never used it with Delphi. ---------------------------------------------------------------------- JD · 2016-04-18 09:25 Quote from: Soner A. on April 18, 2016, 06:30:06 amI ported FlashFiler to lazarus for Windows today. It is real good . I am wondering why I never used it with Delphi. Great work. I'm interested in this. Will you make it available to the Lazarus community? JD ---------------------------------------------------------------------- SunyD · 2016-04-18 09:56 Yes, but first I must write the unit sqlltimst.pas and the class TExpParser for Lazarus. I took them from Delphi to port fast. I can't publish Borlands code. Look here:  http://wiki.freepascal.org/Delphi_unit_status_list ---------------------------------------------------------------------- Graeme · 2016-04-18 11:22 Quote from: Soner A. on April 18, 2016, 11:56:05 amYes, but first I must write the unit sqlltimst.pas and the class TExpParser for Lazarus. Free Pascal has had its own [excellent] TExrParser for some time now - I use it often [with FPC 2.6.4]. As for the sqltimst.pas - that sounds familiar too, and I might have written my own for the tiOPF project (available on SourceForge). FPC might already have something similar - it may be worth asking in the fpc-pascal mailing list to get some official confirmation before you duplicate efforts. Otherwise, well done for getting FlashFiler working on Windows at least. That's a good start. I hope other platforms will follow too. ;-)  I started a port to FreeBSD, and in hindsight I probably should have started with Windows first - giving the sense of progress, because I didn't make much progress with the FreeBSD port. ---------------------------------------------------------------------- SunyD · 2016-04-18 13:58 @Graeme: You can port it to BSD ;-) I will first eliminate borland code (it's a little bit in two units), then publish it and i will place all code that dependt on Windows in one unit. After that we can port it to Linux, BSD and Mac. I hope some people can help to port it to other platforms. It is well documented excellent piece of software. Maybe we can include it to lazarus like aggpas.  It's definitely better than TDbf and co. I have also played with your fpgui look at this. ---------------------------------------------------------------------- Graeme · 2016-04-18 15:06 Quote from: Soner A. on April 18, 2016, 03:58:53 pmYou can port it to BSD ;-) No problem at all. Eliminating any Borland code is definitely a high priority. QuoteMaybe we can include it to lazarus like aggpas.  It's definitely better than TDbf and co. I prefer to have such projects outside Lazarus's code repository. That means one can use Git (much better than SVN), which in turn allows for much easier code contributions. Plus you can have independent releases, and don't have to work at the release schedule of Lazarus itself. QuoteI have also played with your fpgui look at this. Wow, very nicely done!  If you haven't  yet, you must also take a look at Fred's UIDesigner mods [https://github.com/fredvs/uidesigner_ext]. I'm in the process of integrating some of his ideas into the official fpGUI UIDesigner. ---------------------------------------------------------------------- JD · 2016-04-19 12:31 Quote from: Soner A. on April 18, 2016, 11:56:05 amYes, but first I must write the unit sqlltimst.pas and the class TExpParser for Lazarus. I took them from Delphi to port fast. I can't publish Borlands code. Look here:  http://wiki.freepascal.org/Delphi_unit_status_list You're right. Keep up the good work. JD ---------------------------------------------------------------------- HeavyUser · 2016-04-19 13:38 Quote from: Soner A. on April 18, 2016, 06:30:06 amI ported FlashFiler to lazarus for Windows today. It is real good . I am wondering why I never used it with Delphi. Nice!! What did you do for the resourcestring problem? ---------------------------------------------------------------------- SunyD · 2016-04-24 17:30 @HeavyUser: You must define resourcestring global under implementation because fpc doesn't support local resourcestrings. .... Sorry  guys I hadn't time to work on it. Lazarus port needs only TExprParser-Class.  It uses still some Delphi code (TExprParser from dbcommon.pas). ---------------------------------------------------------------------- HeavyUser · 2016-04-24 17:39 I'm referiQuote from: Soner A. on April 24, 2016, 07:30:23 pm@HeavyUser: You must define resourcestring global under implementation because fpc doesn't support local resourcestrings. Sorry I should have been more explicit. I mean the problem with loading the resource by number that flashfiller is using. Have you convert them all to string resources or you have extended the existing exception class to be able to load them from their numeric id. ---------------------------------------------------------------------- SunyD · 2016-04-24 17:51 I made: 'Error code:'+ IntToStr(ExceptionCodeXY)+'  (Soner todo)'; ;-) Because  other things was importanter. ---------------------------------------------------------------------- HeavyUser · 2016-04-24 19:03 Quote from: Soner A. on April 24, 2016, 07:51:47 pmI made: 'Error code:'+ IntToStr(ExceptionCodeXY)+'  (Soner todo)'; ;-) Because  other things was importanter. yeah those are a bit of a secondary concern but need to be addressed at some point. ---------------------------------------------------------------------- tatamata · 2016-12-02 13:28 Hello. What is the status of FlashFiler porting to Lazarus? ---------------------------------------------------------------------- Graeme · 2016-12-05 05:44 I believe it has been ported to FPC under Windows, but not any other platform yet. ---------------------------------------------------------------------- SunyD · 2016-12-05 10:16 Here: http://forum.lazarus.freepascal.org/index.php/topic,34834.0.html ---------------------------------------------------------------------- Thaddy · 2016-12-05 12:56 I see you had problems with the server. I didn't You need to compile de dll's with sharemem and add fpcmemdll.dll to the distributions. That's all. ---------------------------------------------------------------------- eldonfsr · 2023-02-26 18:06 Sorry for topic i download but i dont see any lazarus package could you explain how to install or make work this with lazarus on test folder all project are for delphi... we have to convert.. ---------------------------------------------------------------------- Thaddy · 2023-02-26 19:07 You should not use any of those formats. Use a sane solution, like Sqlite. If you start using Tdbf or FlashFiler you are frankly disconnected from your brains. Both are only useful in recovering old data, but should be prohibited from use in modern code. That is not an opinion but a FACT. ---------------------------------------------------------------------- tatamata · 2023-02-26 19:53 Quote from: Thaddy on February 26, 2023, 08:07:41 pmYou should not use any of those formats. Use a sane solution, like Sqlite. If you start using Tdbf or FlashFiler you are frankly disconnected from your brains. Both are only useful in recovering old data, but should be prohibited from use in modern code. That is not an opinion but a FACT. Thaddy, what about enthusiasm to have a pure pascal database engine? As far as I am aware, only two free SQL database engines written in Pascal are FlashFiler and janSQL. I think both deserve some kind of preservation and effort to make them alive. janSQL is preserved and also embedded in ZMSQL, while FlashFiler is seamingly dead? ---------------------------------------------------------------------- Thaddy · 2023-02-26 20:37 There are more pure pascal database engines: PerfectView for example (pays part of my pension) and there is a complete version of sqlite translated into pure pascal, but that is not open sourced (yet). However: it is not the language in which something is written, but the sustainability over time and both of these are silly choices. ---------------------------------------------------------------------- korba812 · 2023-02-27 13:52 The main problem with FlashFiler is that it uses the Windows message queue everywhere (server's internal queue, for communication with embedded version of server as well as asynchronous network connections via winsock with notifications via Windows messages), so it is not portable code. Some time ago I came across a ThinkSQL project: https://github.com/ggaughan/ThinkSQL https://www.thinksql.co.uk/ It looks promising, although the GPL license may be a problem, so using the built-in version may be restricted (although currently there is no such possibility at all).