Which database should I use for a local application? - sqlite

I am programming a standalone application which needs a local database storage.
I have read about SQLite and it seems like it could perfectly fit my needs.
Nonetheless someone told me that SQLite is going to be discontinued. Is that true ? If so, what technology should I use instead ?

The SQLite documentation says:
The intent of the developers is to support SQLite through the year 2050.

The developers are working on a new major version, actually. Maybe whoever told you that heard about it and got confused thinking this means work on SQLite 3 is stopped (it isn't). But even if it were discontinued, the current version isn't going to disappear or stop working.

Related

PouchDB / SQLite indexing crashes - needs to much memory on IOS

Intro
I have build an IOS app with PouchDB and Ionic and Cordova stuff, but now i'm failing with the database and can't see a solution...
SQLite
Sqlite plugin and the synchronization works great, but as soon i want to access the data PouchDB starts indexing which uses to much memory and my app crashes.
Here is a sampleApp with everything prepared for interested helpers to reproduce the crash
SampleApp Github
WebSQL
In WebSQL I can't even sync the database, because I get the "QuotaExceededError" Error. Is there a way to ask for more space in an IOS uiwebview?
IndexedDB
Indexedb isn't usable, cause of too many bugs. And will it also not be better in IOS 9
So any ideas ideas or hints?
The solution to the problem of storage limits on iOS is indeed to use the SQLite Plugin. You can't exceed 50MB on WebSQL.
Sqlite plugin and the synchronization works great, but as soon i want to access the data PouchDB starts indexing which uses to much memory and my app crashes.
Are you sure this is a bug with PouchDB and not with the SQLite Plugin? If it's a crash in Objective-C land, it belongs to the SQLite Plugin. If it's a crash in JavaScript land, it probably belongs to PouchDB.
Either way, if you could provide a test to reproduce, we would welcome a bug report on either the PouchDB Github issues page or the SQLite Plugin issues page. :)
About WebSQL, please consider this:
PouchDB limits
Some versions of Safari have a bug where they only let you request additional storage once, so you'll need to request the desired space up-front. PouchDB allows you to do this using the size option.
Try allocating size upfront, and allocate your biggest expectations about the app. Hope that helps.
Good luck.

Alternatives to SQLite Manager, with WAL support?

What application clients are there that can connect SQLite3 databases that have Write-Ahead Logging(WAL) are out there? I am not finding one with my google foo today, I have the SQLite Manager Firefox extension. Again I am not finding where it says that it has wal support for it however? Can someone point me in the right direction please?
If I where to guess, I would say that as long as the client can open the SQLite3 file with wal, that the client supports wal. However that is just a guess on my part.
EDIT 8/31/2012
As much as I don't like answering my own questions :p So I am turning this into a, "what alternatives are there" question
Yes, there is a Client application that connects SQLite3 databases, it is a FireFox extension called SQLite Manager. They added support for it apparently in Apr 24, 2011 (or sometime there abouts) according to their issue tracker. For those of you who where wondering, there is the answer. I needed this for work, wound up using the manager without knowing and figured I would take the time after to do a little more research. I still have not found any other SQLite db clients that are independent of an IDE.
SQLite Manager - FireFox Extension
SQLite Manager - Project Page
SQLite Manager - Issue 602
If you got any SQLite client with seperated sqlite3.dll you can easily swap that file with the latest one supporting WAL.
With that in mind you can find some more SQLite managers out there.

Cassandra and asp.net (C#)

I am interested to create portal on cassandra services, since I faced some performance and scale issues starting from 1 million of records.
Definitely, it could be solved, but I am interested on other options.
My main issues is cost of updating all necessary indexes, to make reading fast.
First, is cassandra is good way for asp.net programmers? I mean, maybe there is some other projects, which worth to take a look
And second, can you provide any documentation samples on how to start with cassandra programming from C#?
since I faced performance and scale issues starting from 1 million of records.
Maybe your design was not that good, NoSQL is not a magic bullet for bad design. I have multi billion row tables and 95% of the response is sub second. Also what do you mean by updating indexes, do you mean updating statistics or rebuilding indexes?
since I faced performance and scale
issues starting from 1 million of
records.
You know, the one million mark for modern databases is where it is not something "totally ridiculously small" where you can ignore actually knowing what you do. Below one million is "tiny". I have a 800 million row table and get a LOT of sql running through with it - no problem at all.
First, is cassandra is good way for
asp.net programmers?
I would more suggest a basic book about SQL, reading the documentation and POSSIBLY throwing some hardware on the problem. As in: having totally bad hardware will kill all data management systems.
If you are using Cassandra for your .NET Application take a look at Aquiles. I developed it based on my company needs. If you find it useful or need any help let me know.
You can't really speak of Cassandra documentation. There's a myriad of partial tutorials on the web.
You may want to setup Linux in a virtual machine, because the windows build process is quite challenging, to say the least. (http://www.virtualbox.org, http://www.ubuntu.com)
Here's the howto:
http://www.ridgway.co.za/archive/2009/11/06/net-developers-guide-to-getting-started-with-cassandra.aspx
Note that the cassandra SVN url and the code sample have changed since the writing of this tutorial.
Here's another C# client:
http://github.com/mattvv/hectorsharp
And here some sample code:
http://www.copypastecode.com/26752/
Note that you need to download the latest Java Development Kit (JDK) from Sun for Linux.
It's not in the repositories of Ubuntu 10.04.
Then you need to type
export JAVA_HOME="/path/to/jdk"
in order for Cassandra to find your Java installation.
You might also want to take a look at:
http://en.wikipedia.org/wiki/NoSQL
Especially the taxonomy section is interesting.
Make sure Cassandra is the right type of NoSQL solution for your problem, e.g. use Neo4J if your problem actually is a graph problem.
Also, you need to make sure your NoSQL solution is ACID-compliant.
For example, Neo4J is the only ACID-compliant NoSQL graph engine.
Edit: Here's a jumpstart guide for Windows, without compiling:
http://coderjournal.com/2010/03/cassandra-jump-start-for-the-windows-developer/
http://www.ronaldwidha.net/2010/06/23/running-cassandra-on-windows-first-attempt/
http://www.yafla.com/dforbes/Getting_Started_with_Apache_Cassandra_a_NoSQL_frontrunner_on_Windows/
Instead of cassandra you might take a look at: ravendb. Supposedly it is a document store made with and created for .Net. It has Linq integration, and is (again supposedly) very fast.
As with any new technology, read if it helps you with your specific case, and check if it is proven technology (Do they have mainstream clients using it).
Before you go into this route see if you can't optimize your current solution first. Check if your queries are fast, if the indexes are done correctly, and if you can't remove load by adding caching.
Last nut not least, if adding some processors to your SQL machine might fix issues, it is typically a much cheaper solution.
If you want to do something new, then instead of going for noSQL, you might want to consider trying a database cluster.
The idea is when two machines each search half of the original database at the same time, you have half the search time without totally redesigning your existing database.

a simple .net website source control system?

I work in Visual Studio working on sites mostly myself and occasionally I start on new features for a site and bam a bug pops up on the live site and now I am in the middle of changes and can't post a fix to the bug until everything I started to change is complete.
So I am looking for a nice an simple way to work with this type of situation - any suggestions?
Are you asking for a recommendation of a source control system? SourceGear Vault is free for single users.
I am big fan of subversion. There also plugins for VS to work with subversion repository.
http://subversion.tigris.org/
http://ankhsvn.open.collab.net/
I am in a similar situation and I use Perforce. It is free for up to two users and integrates well with Visual Studio.
Subversion is well supported and has tools for most any environment. It's also mostly straightforward to use, so you should be able to get up and running quickly.
If you need to work on a lot of separate features and bugs at the same time, you might try Mercurial instead. The tooling support is a lot less mature but I find the distributed design to do a better job of merging and facilitating work on separate issues concurrently.
But really, if you aren't using anything currently and aren't sure what your needs are, just choose one that has support in the IDE/tools you use. It will probably be Subversion.

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