Jump to content
sjordi

Free SQLite -> Interbase tool?

Recommended Posts

Hi,

I'd like to test drive Interbase ToGo for perf compared to my current SQLite DB on mobile apps. In real world.

Does anybody know of any free tool that can convert to and from Interbase <--> SQLite?

I have TMS Data Modeler, but it doesn't transfer data.

Any clue would be welcome.

Thanks to all

Steve 

Share this post


Link to post

Export/import as SQL?
Only the CREATE TABLE statements may need some manual adjustment.

But the INSERT should work directly.

Sqlite3 command-line tool has a .dump command - just copy the SQlite3 DB file from your mobile to your desktop to dump it.

 

IMHO SQLite3 would be faster than Interbase - it is at least what I saw with Firebird/SQLite3 on Windows and Linux.
Perhaps Interbase has some secret weapon, but I doubt it very much.
And using an Open Source and proven solution like SQlite3 is worth it...

 

Also ensure you make a fair comparison between the two.

By default, SQLite3 expects a full synch to the storage media, which is the safest, but slowest approch. So ensure you setup JOURNAL_MODE=Memory and LOCKINGMODE=Exclusive and SYNCHRONOUS=Off.

Check http://blog.synopse.info/post/2012/07/26/ACID-and-speed

Edited by Arnaud Bouchez
  • Like 1

Share this post


Link to post

Thanks all.

Rebasedata doesn't work the way I want, it's SQLite -> Interbase and it offers the other way around.

Yes, I'd like to skip the create table equivalence nightmare before a dump/source

But it looks like I won't have much choice to do this manually 😞 

Thanks

Steve

Share this post


Link to post
18 hours ago, Anders Melander said:

And be prepared to lose all your data.

If you crash your drive with a hammer, you would also loose all your data.

The SQLite3 reference article is really paranoid, and its default settings are aircraft-level secure. If you have exclusive access to the SQLite3 DB, then most of the database corruption problems disappear.

To be fair, 'entreprise' DBs don't synch to disk at every transaction. I have had Oracle databases not able to mount at all after a power failure. Whereas SQLite3 may loose some data, but can almost always reopen its SQLite3 file.

We used those settings on production DB since years with TB of processing data and billions of insert/select, with no data loss (only journalmode was left to its default).

The OP was talking about mobile app, where I doubt such paranoia is required.

Edited by Arnaud Bouchez
  • Thanks 1

Share this post


Link to post
4 minutes ago, Arnaud Bouchez said:

If you crash your drive with a hammer, you would also loose all your data.

True :classic_smile: but as I read the documentation, with those settings, all it would take is a system crash at an unfortunate moment.

I have not used SQLite3 in productions systems so I don't really know what I'm talking about.

 

9 minutes ago, Arnaud Bouchez said:

The OP was talking about mobile app, where I doubt such paranoia is required.

Yes, I agree. I missed that point.

  • Like 1

Share this post


Link to post

You may also try our SynDBExplorer tool.

If you can serve the Interbase ToGO DB with Interbase server, connect to it then choose the "Table Export" feature: it will create the SQLite3 file for you.

 

 Note that if you use the SQL to text dump conversion, I guess you don't need to change anything to the CREATE TABLE statement. The SQLite3 syntax is very relaxed, thanks to its "column affinity" feature.

  • Like 1

Share this post


Link to post

Ok I tried DBeaver but unfortunately it doesn't know Interbase.

I'll write an app myself I guess. Shouldn't be that complicated.

Sqlite -> Interbase doesn't seem as an option for most people

Share this post


Link to post
On 6/5/2020 at 12:19 PM, sjordi said:

Ok I tried DBeaver but unfortunately it doesn't know Interbase.

Hum, I was not aware of but in my mind if there is a JDBC driver for Interbase (and there is one) it was possible to connect Dbeaver to Interbase.

Quote

I'll write an app myself I guess. Shouldn't be that complicated.

Thanks Firedac and TFDBatchmove !

Except for, and I am not sure of the "except" I just don't test but as I remember output table can be created with same structure input table, creating the table you don't have to write an executable program just in design time you can do the transfer data from table to table. Put 2 connections (one SQlite, other Interbase) 2 related FDTables (or FdQuerys), one FdBatchMove, one FDBatchMoveDatasetReader (for sqlite side) one FDBatchMoveDatasetWriter (for guess wat ;-))

and then you can execute fdbatchmove (contextual menu) during designtime  

Share this post


Link to post

Pretty smart. Should have thought about that.

I'll try this right away.

Share this post


Link to post
Guest

There should ever never be any difference. A process implemented design time should be accessible i runtime.

Otherwise IMHO the "component" is badly written.

Share this post


Link to post

I suggest this as a one shot solution (quick and forget) , not for a runtime application 😉

Share this post


Link to post

Ok that did it. I had some troubles first but I was able to batch move table by table and get the equivalent in Interbase.
Now I'll try to implement the triggers to replace the missing autoinc fields. 🙂

Thanks for the suggestion

Steve

Share this post


Link to post
On 7/17/2020 at 7:52 AM, sjordi said:

Ok that did it. I had some troubles first but I was able to batch move table by table and get the equivalent in Interbase.
Now I'll try to implement the triggers to replace the missing autoinc fields. 🙂

Thanks for the suggestion

Steve

Who won? Who won? Who won?

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×