SqliteDog is a modern SQLite database Manager

I guess every developer is faced with databases SQLite at least once during his career. But if he's busy mobile apps, it seems, simply has no chance to avoid them. We, too, were no exception in their projects often use this wonderful database. As you know, the creators of SQLite administration is officially available only on the console. This gave rise to a host of monsters Hulk different managers from third party companies.

Alas, quantity is not passed in quality. all applications, we found certain problems. Some slightly shocking. For example, a very popular Manager is a free add-on of Firefox called SQLite simple Manager. 234 recording in its issue tracker (as it will be in Russian?) shake the faith in the future of even seasoned pros. "Incorrect display of 8-byte numbers." Yes, that is correct, this Manager may not correctly show all the numbers in the performance 8-byte integer (probably because of its javascript nature). Just think, who cares about big numbers?

Many managers are universal (support all popular database) and just can't use all the features of SQLite (which is quite a lot). Another problem: the interface. Often had the feeling that the developers just "dumped" the whole functionality of the app to the home screen in the form of small piles of buttons. Also irritated splitting capabilities across multiple apps: data editor, schema editor, importing data, etc. the Marketing is good, but inconvenient to use. Finally, the now fashionable craze is to release the app on multiple platforms with a single code base and framework often leads to a heap of small bugs in the interface: problems with fonts, wrong encoding, wrong height of the lines, "ouezzane" controls, etc.

Our doubts were reinforced single post on stackoverflow.com in which they concluded that "despite the large number of managers SQLite database, not really comfortable there and that plays a negative role in terms of promoting SQLite". So this project was born.



Allow me to introduce: SqliteDog is a modern SQLite database Manager. We wanted to slightly change a familiar interface database editor that it resembled "a cross between Excel Chrome" than "SQL Server Management Studio". We proceeded from the following mantra: Manager database is on the "three whales". It is the data itself, the data schema and SQL queries. You should make a sample of the data as simple and convenient to display the data most useful (see below). To show the schema of the data clearly and allow her to arbitrarily change. SQL editor must be beautiful, convenient; work with SQL should not create problems. I would also like to have a clear and convenient mechanism for configuration management (PRAGMA) SQLite, which many are very much affected. For example, default constraints, foreign keys are disabled and the cache size is 2000 pages base. In 95% of cases it's not the best setup, but they are usually "hidden" inside some submenu.

So, we started to analyze existing apps to collect ideas and wishes. And this stage took about 3 months. A basic understanding was this: almost all of the editors of the database built on archaic interface decisions that they copy from each other. Here are some examples.

the Tree of database objects

It's such a torture control, which is usually located on the left and contains related to the trees database connections and database objects. To reach, for example, table columns usually need:
— to expand the list of databases and find the right;
— expand the branch "Table";
find the desired table.
— expand the branch "Columns."
Moreover, the operation "expand" means:
— getting the mouse into a tiny cross, which always changes its position;
— the new list that you want to explore and which shifts the already existing tree view.
In addition, we didn't like (usual) practice to work with multiple databases in a single instance of the application. It seemed to us that it is a source of confusion and complexity: all the time you need to understand how you spend an action. We decided that a single instance of the application runs exactly on one database (one connection) and abandoned wood in favor of a linear list of tables and views. You can connect to any database from the history. In the end, to view and edit the table schema in SqliteDog need to make only two clicks. The elements list of the database objects, of course, are not moved but remain in their places.

Saving SQL queries

As is often the case, one solution led to another. Once we decided that we want to quickly switch between databases, dumping all the current state of a problem of loss of entered SQL queries. To store SQL queries in the files? But why? Again, archaic. We have at hand a powerful DBMS. The size of the queries, as a rule, small. Lead them the story will not be any problems. Thus, all the queries a gun stored in a special database. Gone is the annoying window "You have made changes, want to save?", what a relief. But something is lost. File names carry some information, the binding, and now there are none at all. Solved this problem, do a search on keywords of the query.

show selected data in a table

All managers BD bring to the table the requested data (that they did not take). How do they do it? For example, the width of the columns. Is usually fit content is simply the uniform distribution across the width in number of columns. It is very poorly uses the screen space. Or take the representation of the data. Why not immediately show the color of the type of the value: string or number? Why the number is not immediately to beat right? An empty cell is NULL or an empty string? To find out, you need to click on the cell and see some properties, why? If the cell is a BLOB (binary data) — why do I see its hexadecimal representation? What is the reason? Note that all of the managers proudly boast the display of images in BLOB-Ah. Thanks, of course, but strings and numbers are still used more often. Found this (quite strange) welcome. If the column value is a string with the translation of the carriages, the height of the rows in the table increases in proportion to the number of rows. I mean, let's say you have in the column are stored in small XML text. When viewed on one screen now fit a maximum of 3 entries.
In SqliteDog we tried to "make the most" useful when displaying data. Immediately, without additional configuration. The numerical values highlighted in the color and batted right. A NULL value is displayed particularly clearly distinguishable from empty strings. For BLOB the size. If the string value contains control characters ("\r\n"), they are highlighted in a different color, the height of the table rows is not increased. Pictures, of course, is also displayed. And with one click you can see a picture on the entire screen. By clicking (or pressing F4) the width of the columns visible rows evenly to fit their contents. Double click on the cell, customize the width of a particular column. Scroll on a table, and the mouse and keyboard. And scrolling the mouse wheel while holding the Control key allows you to scroll the table left and right. All these little things make life easier.

What "nothing"?

Traditionally, many applications have the status "no paper". For example, at the start. And do I need it? Suppose the user SqliteDog closes the connection to the database. What does it mean? He wants to open another database? But why to close — just open another. He wants to finish the job? But then you just need to close the application. The solution was this: the connection to the database in SqliteDog is always. If the user closed the database, the SqliteDog creates an empty database "in-memory" (one of the most useful features of SQLite). It is the same when you run the application. As soon as this feature appeared, there arose the additional usage scenario. Sometimes you need to quickly remember the name of the SQLite functions. Run SqliteDog, is available from the input window of SQL. Begin to type the name — get a completion list. Find the desired function, the copied, ready.
Compromisses Compromise

As it became clear that, potentially, the number of functions is unlimited. Such is the nature of the project. You can always find another "wishlist". And to solve that without it — well, nothing. That is why I made "shaving" the decision: part of the "big" feature goes into the "second version". The solution features taken collectively. Thus, it maintains a list of active tasks with priorities and a list of features "second version". Seeing them together is convenient to again and again not to come up with one and the same. It used to be that procurement for one capabilities allowed us to easily implement a different feature and then "came back" from the second version of the first. Also funny moments: some features of the so long postponed, replaced by more urgent, with the result that the SqliteDog you cannot drag tabs with the mouse. This will be fixed in the "second version" (probably). Another compromise is the choice of one platform (Windows). Alas, we were unable to find acceptable for us framework, which would ensure cross-platform without loss of quality and speed. To do your, that is, to reinvent the wheel — it's still too much, the goal was different. In the end the project was "locked" by Windows (and took about a year). But we got the responsiveness and the display quality at the desired level.

License

Whereupon stop (but if Hebraist interested in continuing the "Saga", then it will follow). As for the product license. We decided that in addition to commercial will be available official free version SqliteDog. No limits on time, number of rows, number of tables, size of database, etc. In the free version after 30 days of use become unavailable only designers (databases, tables and indexes) and some import/export data. The interface is completely Russified SqliteDog (of course, there are English stream for fans). The Russian version is also there.

http://sqlitedog.com image

Conclusion or TL;DR

SqliteDog is Manager SQLite DB to work effectively. Its creators decided to abandon the usual front-end solutions and to simplify and facilitate the interaction. Therefore, one application = one database (or more precisely, one connection, you can make ATTACH other databases). The data samples are displayed as informative as possible, view/sort, and even edit the recordings in the process of query execution (to stop the download at any time by pressing Esc). Some of the features SqliteDog are unique. For example, the management of the transaction using the buttons on the connection panel. Or monitor mode table in which new records are automatically loaded ("Choose last 1000", press the arrow button in the circle). Or the ability to access the database schema and to record it in a separate window on a second monitor (to always have before my eyes). Or a one tap translate translation of the carriages in the column value from UNIX to Windows format.

We'd love to hear comments and suggestions for improvement. Thank you for your interest.
Article based on information from habrahabr.ru

Комментарии

Популярные сообщения из этого блога

Why I left Google Zurich

2000 3000 icons ready — become a sponsor! (the table of orders)

New web-interface for statistics and listen to the calls for IP PBX Asterisk