Which versions of SQLite does Zumero work with under Xamarin? - sqlite

I am exploring Zumero for a new project and attempting to understand which SQLite it works with. Mono.data.sqlite, System.data.sqlite, Sqlite-net, or Sqlite-net Extensions. I prefer to use the Extensions version however I suspect that it will not work with it or the Sqlite-net because I would be unable to define the tables using the modified Zumero syntax.
I do need to be able to sync multiple smart devices with themselves and with desktop. Any ideas would be helpful.

The current version of our Xamarin component supports (and includes) System.Data.SQLite.
As you suspect, the ORM-ish features of Sqlite-net (and its variants) are not yet supported because Zumero tables need to be created a bit differently than regular tables. We do plan to implement this functionality, but I cannot yet promise a specific availability date.

Related

SQLite library for .net Core/Standard: MS EF or sqlite.org?

I'm having trouble getting a overview of the different SQLite libraries to be used with .Net Core and/or Standard.
It seems there are primarily two:
MS: Microsoft.EntityFrameworkCore.Sqlite
sqlite.org: System.Data.SQLite
Is the MS library completely independent of the sqlite.org's libraries? And if so, which one is recommended to use?
I prefer simplicity....it seems I just need two dll's if using sqlite.org.
There are two main SQLite packages for .NET Core/Standard. They are independent and use separate native binaries.
Microsoft.Data.Sqlite
System.Data.SQLite
The former is provided by Microsoft, the latter by SQLite.org. I prefer the Microsoft one but unless you're looking for specific functionality (SQLite.org's supports encryption, Microsoft's supports fts5, etc) either one will probably work fine. They both implement System.Data.Common and so the APIs are almost identical. SQLite.org's can load arbitrary extensions which Microsoft's cannot (though with the latest release it was looking like SQLite.org's couldn't load fts5 which I know worked with previous releases).
I would recommend using Entity Framework Core or another similar third-party database abstraction package unless you absolutely can't use modelling for some reason (EFCore still lets you run the occasional low level query if you need to). It's quicker to develop, and easier to maintain the code.
Microsoft.EntityFrameworkCore.Sqlite provides support for Sqlite in EFCore, using Microsoft.Data.Sqlite. So you would want to use that in this case. The internet says you can also use System.Data.SQLite but it looks like Microsoft.EntityFrameworkCore.Sqlite still tries to load the underlying native binary from Microsoft.Data.Sqlite for some purpose, though it does appear to use System.Data.SQLite for the actual database operations. Not sure exactly what's going on there.
Microsoft.EntityFrameworkCore.Sqlite is for Entity Framework Core ORM is more complete but heavier.
The System.Data.SQLite.Core can use with Dapper ORM SQLite and Dapper but I use the Microsoft.Data.Sqlite.Core with SQLitePCLRaw.bundle_e_sqlite3 and Dapper ORM, I think I had problems with System.Data.SQLite.Core.
Use without is hard and I not recommend.

sqlite-pcl vs sqlite-net xamarin component

I have installed sqlite-pcl, but there is also component for Xamarin sqlite-net.
What is the main difference between those references? And which of them has better performance?
As I know pcl doesn't support relationships (foreign key), but sqlite-net does. So I use [Indexed] attribute for better performance, does it make seance?
They are both based on the same Sqlite.Net library but the PCL project is a fork which tries to improve on the previous project:
This is a fork of the original sqlite-net library
(https://github.com/praeclarum/sqlite-net), which aims to improve the
code quality by using modern technologies such as PCL (portable class
library).
The project will avoid the use of #if-based conditional code and use
platform-specific code injection instead.
I welcome pull requests, but keep in mind that this library is in
heavy use and all changes must be:
Backwards-compatible (don't change database defaults). Well tested
(please add unit tests).
Both don't support foreign keys.
Performance-wise the PCL project supposed to be better, but that is untested as far as I know.

IronRuby ActiveRecord and SQLite

I see that the IronRuby team has documented using ActiveRecord in IronRuby with MSSQL - they indicate that some adjustments were required to the adapter.
In interview on 8/11/2009, Jimmy indicates a major drawback of IronRuby:
The main limitation is that IronRuby does not support any
of the C-based Ruby libraries
That indicates that the SQLite-Ruby library that depends on sqlite.dll is probably out of the question. However, in the same interview, he says:
For the database you can use SQLServer Express (which is free),
or any .NET based database, like the recent csharp-sqlite port.
That sounds promising, but I'm a bit overwhelmed on how to begin! How do I go about connecting Ruby's ActiveRecord to csharp-sqlite or where can I look for more guidance?
I found some more write-up on IronRuby and SQLite, but I may need some translation help?
The current solution is to port do_sqlite3 to use all .NET APIs. There are a couple ports
of SQLite to .NET, but none are widely used yet. For 1.0 we will have an ironruby-dbi gem
for using .NET based databases through the Ruby DBI API; so using SQLExpress and
SQLServer will work with an appropriate sqlserver adapter. I'm not sure if there is a
do_sqlserver adapter yet for DataMapper, but we'll leave that to the community for doing.
Does this imply that my technology stack could go something like: ActiveRecord uses SQLiteRuby, SQLiteRuby is tweaked to use ironruby-dbi (should be little change since this is the Ruby DBI API??) then ironruby-dbi has the smarts to work with a .NET based database such as c#sqlite. Of course I will need an adaptor to go between ActiveRecord and SQLiteRuby ... hopefully no change required there?
Sugggestions, Advice, Tips?
you won't be able to use activerecord as is.
You can either wrap the ADO.NET provider for SQLite or you can perhaps help with the ironruby-dbi project and provide a dbi adapter that handles sqlite correctly. From then on adding it to rails is easy as it would require replacing the connection with the dbi connection.
It is a work in progress though and at this moment most efforts have been around sql server, but I too would like to get sqlite working properly on IronRuby with rails.
Another approach would be to change the active record adapter for sqlite to work with the ADO.NET provider (that would probably require the least effort but won't help outside the rails community). I have a pretty good idea of what needs to happen to make it all work but I simply don't have the time to do all of these things, unfortunately.
Have you tried using the SQLite adapter? It might work out-of-the-box.
I haven't tried it personally though.

MIDP Java implementation of SQLite DB

Are there any MIDP implementation of SQLite db available for use of sqlite db within a MIDlet, rather than using RMS. Of course, there are Floggy and OpenBaseMovil, however they are based on RMS, but are there any implementations that allows to perform operations in an sqlite db file?
There are 2 ways of doing something like that:
take the open source code of SQLite (written in C) and write something similar in JavaME. nobody has done that yet. There is an ongoing effort to write a version of SQLite in C# for windows mobile but you have got to wonder what impact a move to an interpreted language with no control over the performance of file system access will have.
define and implement a JavaME API that accesses the native SQLite via something like JNI. This is usually extremely complicated if you are not the phone manufacturer or one of its very close partners. I suspect Android does that so you could look at its sources in that area but it won't be MIDP-compliant. There are no official JSR for an SQLite-like API yet.
J2ME spec does not define JNI. Being an ISV and trying to write native bindings is out of question. Sun's reference implementation does define something called KNI - but then you have to be an OEM to be able to do that and ship the VM with the phone.

Recommendation for Sqlite DB manager application? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
There are quite a few Sqlite GUI applications listed here:
http://www.sqlite.org/cvstrac/wiki?p=ManagementTools
some appear to be incomplete, buggy, not maintained, etc. Do you have any recommendations?
I use the SQLite manager plugin for Firefox.
It seems pretty stable to me.
Here's another free option. It has been pretty stable for me. SQLiteStudio
For Windows: I've been looking for functionality and a comfortable GUI - it's been particularly hard to satisfy the latter requirement, but these two picks are both fine:
a) Good enough: SQLite Expert
Less expensive, fully featured manager. The author is very responsive to comments and bug reports, and publishes updates frequently. The flip side, if you look at version history, is that new releases seem to introduce new bugs, which are then fixed in sunsequent builds. The GUI is fine, very good for quickly designing new databases; a little less so for designing queries and working with large amounts of data. Main gripe: you can't see the schema while editing a query (without flipping tabs in the program).
b) Nearly perfect: SQLite Maestro
Pricier. Rich UI, easy access to all features, nice visual query builder and automatic SQL formatter for readability, lots of eye candy. There is a separate, more specialized query builder (SQLite Code Factory), but you can make do with just the main Maestro application. Main gripe: can't seem to be able to change font size for table display and the default is a little too small; at the beginning it's easy to get lost in the thicket of tabs, though overall I find the GUI very productive.
Both solutions are very stable in my experience, and both seem to offer occasional discounts, if you can afford to wait.
For just browsing data, try SQLite Spy - free and lets you execture queries, but no or little GUI support for editing. Very convenient for quick lookups though.
Spent the morning looking for a good Sqlite Database Manager/Browser and have settled on SqliteStudio, currently v2.20.28, which I'm running on Ubuntu Linux 10.04.
The download is one 4.3MB uncompressed executable file. Period!
It's fast, well-behaved, and uses modest resources.
The interface is clean and attractive with logical functionality.
I don't say this often, but it's just a "A Joy to Use".
It was developed and is actively maintained by Pawel Salawa who is is to be commended for producing a very nice program.
I just used it to merge two Firefox FloatNotes databases (Sqlite v3), which just use a single table...
The target database is on the local host where SqliteStudio is running (i.e. /0/LX02)
The source database file is on a remote host mounted via SSHFS to /0/LX04
Opened the two database files using Add Database.
Used the SQL Editor to execute an INSERT to the LX02 database from a SELECT on the LX04.
Click the Commit icon when all goes well or Rollback if there are errors to fix.
Refresh the table data to see the inserted rows.
There's no Import GUI functionality but merging is pretty simple if you know SQL. I supplied NULL for the first column which is the unique-id primary-key so that Sqlite would autoincrement, thus renumbering the rows being merged in...
INSERT INTO [floatnotes.sqlite].floatnotes
SELECT NULL,
url,
protocol,
content,
x,
y,
w,
h,
color,
status,
guid,
creation_date,
modification_date
FROM [floatnotes-LX04.sqlite].floatnotes;
I like SQLite Administrator
I've been using SQLite Professional and it's been reliable. The only downside was that changes I made to the db via the iOS simulator didn't resolve in the app (I had to close it and reopen for changes to show) but that feature was added in a recent version. So now it does everything I need. I'm happy with the support. It's good for testing and I use it to build out the db structure. Never been buggy.
I've used Sqliteman in the past. Quite nice.
SQLiteSpy is a good choice
Sqlite.org has a list of management tools available here:
http://www.sqlite.org/cvstrac/wiki?p=ManagementTools
If your using OSX you may like SQLPro for SQLite (App Store).
The app has a few neat features such as:
Versions Integration (rollback to previous versions).
Inline data filtering.
Exporting options to CSV, JSON, XML and MySQL.
Column reordering.
Full screen support.
I've been using SQL Explorer. The firefox plugin is awesome, but it couldn't handle BIGINTs properly (it truncated them). I have noticed that the .jar driver doesn't seem to support FTS4 (but it does support FTS3) and doesn't show indexes in the data structure.
I like SQL explorer as you can use other providers like mySQL too with the one client.
You didn't mention a platform, so here's a great comparison of Mac OS X SQLite tools. I personally found MesaSQLite to be most like my preference for database tools, which was CocoaMySQL incidentally. (For Windows, I just used the Firefox add-on mentioned above.)
If you're within Visual Studio most of the time then System.Data.SQLite is good, and as a plus handles encrypted databases.
Navicat SQLite is very good and they support Windows, OS X and Linux too.
You might want to check MYZSQLExplorer, here.
Unlike the other tools, it is running on iOS devices (or in the simulator). It is a Viewer, not a management tool, and is not as feature-complete as some of the other tools, but is convenient as you can launch it from within your code and browse your databse from within your app.
Or you can "Open In..." it sqlite stores, by sending them as email attachments.
I developed it in order to help myself during the development and testing phases, and it did help.
If you have any feedback on it, I'd love to hear it.
If you want just CRUD operations on the sqlite database file, then SQuirreL is a very option as it has an auto complete feature which drastically improve the speed and efficiency of typing the sql queries.
To use the SQLite database in SQuirreL first download the JDBC driver of the SQLite from here then drop the jar in the lib folder of the SQuirreL folder. Now open SQuirreL and choose Create a New Driver.
In the Example URL field put
jdbc:sqlite:$file_url
and in Class Name put
org.sqlite.JDBC
After that choose Create a New Alias and choose the driver that you just added and replace $file_url with the actual location of the sqlite file then click ok and you are done.

Resources