Code Monkey home page Code Monkey logo

dbtarzan's Introduction

DbTarzan

Cross platform database browser.

Explore the tables of a relational database (or many of them) following the relations defined in their foreign keys.

With DbTarzan you can find the information you need from the database in a fraction of the time, without writing queries.
If it is the first time you are looking into a database, with DbTarzan you get immediately a sense of the data in the tables and the relations among them.

More details in the ๐Ÿ“šDocumentation, including the examples.

DbTarzan

The following videos show examples of database exploration, the first one is a simple exploration, the second uses queries and order by:

|IMAGE dbtarzan simple video on youtube|IMAGE dbtarzan detailed video on youtube|

If you have any problem or question about the project please use the ๐Ÿ’ฌDBTarzan gitter channel or add an issue.

If you are interested in helping, here is how to build the code yourself.

dbtarzan's People

Contributors

aferrandi avatar gitter-badger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

dbtarzan's Issues

Connection duplicate

Add the possibility to duplicate a connection in the connection editor so that you can easily add a connection that is similar (driver, jar, url...) to an existing one.

Panels size

The "databases", "tables" and "foreign keys" panels are not resizing correctly and steal space from the main panel.

SQLite

Test DbTarzan with a SQLite database

Close all database tabs

It happens that you want to close all tabs for a database to start with a new task.
Add a "Close all tabs" menu item under "Close tabs after this"

path of configuration file

Add the possibility to specify the path of the configuration files as argument of the application. This gives more flexibility when installing the applications on paths with no write permissions.

Connections file editor

A GUI editor to edit the connections file:

  • show the connections
  • add a new connection
  • edit a connection
  • delete a connection

one row -> vertical list columnName-value

If there is only one row of the table to show, it does not make sense to show it in a tabular way, thus paritally hilding the row when the table has many columns.
Instead it is better to show the row as a vertical list of pairs <columnName,columnValue>

Restart needed after updating the connections

Now it is mandatory to restart dbtarzan after updating the connections in the connections editor, to have the change be effective.
Can we instead reload the connections when they get saved in the connection editor?

Filter function for tables and table columns

Many times when you open a database you look for a specific field, without knowing the table that contains it.

On the top of the "Tables" list, add an input box that allows to filter the tables by their name and the names of their columns using the entered text.
It must be such that the input box is dynamic: changing the text automatically updates the search results.

More checks in the order by dialog box

In the order by dialog box:

  • When no field is selected (empty list) and the "Save" button is pressed, request the user to confirm (makes sure the user wants to open the next tab without any order by).
  • The "Save" button should become available only when the user changes something in the dialog (makes sure there is something to save).

PostgreSQL

Test DbTarzan with a PostgreSQL database

docker

build a docker container for dbtarzan, so that it can be easily installed without thinking about the dependencies.

Errors visibility

Many errors are visible only when running the "onejar" version of dbTarzan from a command line interface (Windows CMD or bash).
In this way a user that runs the exe version is not able to see the errors when trying to connect to a database. The errors must be displayed in the log view of the GUI.

Icons in log view

The log view differentiates between Info and Error just adding "I>" and "E>" at the start of the row.
Using icons could be more elegant.

No message when getting an error from SQLServer

Querying the database HATRMSQL01-D01 got:Building the dbWorker with the driver com.microsoft.sqlserver.jdbc.SQLServerDriver got: at:
dbtarzan.db.ConnectionBuilder.buildDBWorker(ConnectionBuilder.scala:20)
dbtarzan.db.ConnectionBuilder$.buildDBWorker(ConnectionBuilder.scala:49)
dbtarzan.config.actor.ConfigWorker.getDBWorker(ConfigWorker.scala:19)
dbtarzan.config.actor.ConfigWorker.dbtarzan$config$actor$ConfigWorker$$queryDatabase(ConfigWorker.scala:36)
dbtarzan.config.actor.ConfigWorker$$anonfun$receive$1.applyOrElse(ConfigWorker.scala:62)
akka.actor.Actor$class.aroundReceive(Actor.scala:465)
dbtarzan.config.actor.ConfigWorker.aroundReceive(ConfigWorker.scala:12)
akka.actor.ActorCell.receiveMessage(ActorCell.scala:516)
akka.actor.ActorCell.invoke(ActorCell.scala:487)
akka.dispatch.Mailbox.processMailbox(Mailbox.scala:254)
akka.dispatch.Mailbox.run(Mailbox.scala:221)
java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
java.lang.Thread.run(Unknown Source)

Error on date

Got this error when opening the mysql table wp_posts:

dbWorker:Value '0000-00-00 00:00:00' can not be represented as java.sql.Timestamp

Show when foreign keys are turned

DbTarzan shows on the right side all foreign keys from the table to other tables, but also from the other tables to the table.
Both of types of foreign keys can be used to traverse the database.

There are cases in which this can be confusing, for example when two tables are referencing each other (for example when modeling a tree in a relational database).
In this case, the foreign keys show up with the same name and can be confused with each other.

To solve this problem it could be useful to have a field in the ForeignKey type that shows if the foreign key goes to the table (we call this foreign key turned).
In this way we can show the two types of foreign keys in the foreign keys list with special markers, for example ">" for the standard foreign keys, "<" for the turned ones.

Add accelerators for the menu

Some operations, like copying data from the table, opening new tabs are potentially frequent.
Accelerators should be added to the menu so that they can be done directly using key combinations.

check all

add context menus in the table grid to check and uncheck all the records of the tables

Remove all table-tabs after one tab

Add a menu in the table-tab to remove all the table-tabs opened AFTER that one.
It happens many times that you follow the foreign keys starting from one tab for a specific task. When you are finished with that task you want to clear the tabs related to that task and start with something else, fast.
Instead of removing the tabs one by one it is better to remove them all at once.

query copy

Possibility to copy the query used to fill a table tab, so that it can be used in other tools.

MySQL

Test DbTarzan with a MySQL database

Add date/time to log/errors

In the log/errors list panel on the bottom of the UI the log/error lines do not have a date/time.

This can be confusing in case of an error, for example when you missed the connection to a database. You don't know if the error refers to something happened now (and then you need to solve the problem) or two hours ago (in this case the problem has already been solved).

A date/time field in the list does not use much space and can be really useful

Max rows per table

To avoid performance problem the number of rows displayed for each query result is 500. This is in the code (oh yeah).
Move it to a configuration file.

Error trying to reconnect to Oracle

When closing an oracle database tab and reopening to reconnect to the database got:

Querying the database TRM got:Building the dbWorker with the driver oracle.jdbc.OracleDriver got: at:
dbtarzan.db.ConnectionBuilder.buildDBWorker(ConnectionBuilder.scala:20)
dbtarzan.db.ConnectionBuilder$.buildDBWorker(ConnectionBuilder.scala:49)
dbtarzan.config.actor.ConfigWorker.getDBWorker(ConfigWorker.scala:19)
dbtarzan.config.actor.ConfigWorker.dbtarzan$config$actor$ConfigWorker$$queryDatabase(ConfigWorker.scala:36)
dbtarzan.config.actor.ConfigWorker$$anonfun$receive$1.applyOrElse(ConfigWorker.scala:62)
akka.actor.Actor$class.aroundReceive(Actor.scala:465)
dbtarzan.config.actor.ConfigWorker.aroundReceive(ConfigWorker.scala:12)
akka.actor.ActorCell.receiveMessage(ActorCell.scala:516)
akka.actor.ActorCell.invoke(ActorCell.scala:487)
akka.dispatch.Mailbox.processMailbox(Mailbox.scala:254)
akka.dispatch.Mailbox.run(Mailbox.scala:221)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
java.lang.Thread.run(Thread.java:745)

Select all

There are cases in which you want to select all the rows in a table (or a lot of them).
In this case select the rows one by one can be time consuming.
Add the possibility to select all the rows or, for example, all the selected rows.

open foreign key also with no rows selected

Double-clicking on a foreign key when no row is selected in the table does not produce any effect.
It could be nice if an "Yes/No" message box comes out asking if you want to open the table anyway, without any filter.

Add cache for the foreign keys

For some databases, like Oracle, getting the foreign keys can take some time, mainly when the application starts.
To make things faster the system could try to have some cache mechanism to remember the foreign keys for the tables that have already been opened and to pre-read the foreign keys of the tables that are likely to be opened in the future.

order by

The queries return 500 rows max (at least at this moment),
Therefore the sorting of the rows in the grid applies only to the 500 returned rows.
Sometimes it could be very useful to sort the query result before 500 lines gets extracted.
Add the possibility, from a tab, to create a new tab on which the query has an "order by" by selected columns.

automatically checked when one

When the table contains only one row, that row should be automatically checked.
In this way you can follow the relations to gather all the information for a single entity without checking rows all the time.

encrypt passwords

The passwords used to connect to the databases in the configuration file are in clear. This can be a problem because it can be a security hole.
The idea is to let the user write the passwords in clear in the file, but once dbtarzan starts it writes over the file with the passwords encrypted.

Reconnect

Possibility to reconnect to a database from a menu, when the application gets disconnected.

Not able to show help in Windows

The Help->Documentation menu is not working in Windows.
Running it directly with the one-jar package it shows the error:

)
Exception in thread "JavaFX Application Thread" java.security.PrivilegedActionException: java.io.IOException: Cannot run program "x-www-browser": CreateProcess error=2, Systemet finner ikke angitt fil
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$354(Unknown Source)
at com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(Unknown Source)
at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(Unknown Source)
at com.sun.glass.ui.View.handleMouseEvent(Unknown Source)
at com.sun.glass.ui.View.notifyMouse(Unknown Source)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$148(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: Cannot run program "x-www-browser": CreateProcess error=2, Systemet finner ikke angitt fil
at java.lang.ProcessBuilder.start(Unknown Source)
at dbtarzan.gui.Main$.dbtarzan$gui$Main$$openWeb(Main.scala:62)
at dbtarzan.gui.Main$$anonfun$5.apply(Main.scala:30)
at dbtarzan.gui.Main$$anonfun$5.apply(Main.scala:30)
at dbtarzan.gui.MainGUI$$anon$1$$anon$6$$anon$9$$anonfun$4.apply(MainGUI.scala:61)
at dbtarzan.gui.MainGUI$$anon$1$$anon$6$$anon$9$$anonfun$4.apply(MainGUI.scala:61)
at scalafx.event.EventIncludes$$anon$6.handle(EventIncludes.scala:157)
at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source)
at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
at com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
at javafx.event.Event.fireEvent(Unknown Source)
at javafx.scene.control.MenuItem.fire(Unknown Source)
at com.sun.javafx.scene.control.skin.ContextMenuContent$MenuItemContainer.doSelect(Unknown Source)
at com.sun.javafx.scene.control.skin.ContextMenuContent$MenuItemContainer.lambda$createChildren$343(Unknown Source)
at com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(Unknown Source)
at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source)
at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(Unknown Source)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
at com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
at com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
at javafx.event.Event.fireEvent(Unknown Source)
at javafx.scene.Scene$MouseHandler.process(Unknown Source)
at javafx.scene.Scene$MouseHandler.access$1500(Unknown Source)
at javafx.scene.Scene.impl_processMouseEvent(Unknown Source)
at javafx.scene.Scene$ScenePeerListener.mouseEvent(Unknown Source)
at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(Unknown Source)
at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(Unknown Source)
... 9 more
Caused by: java.io.IOException: CreateProcess error=2, Systemet finner ikke angitt fil
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 49 more

SQL Server

Test DbTarzan with an SQL Server database

If the query is too long show only a part of it in the tooltip on the tab

If you hover the mouse on a table-tab, dbtarzan shows the query that produced the table.
This can be extremely long, being for example composed by 500 OR clauses.
if it is too long (300 characters?) truncate it, so that the other information can be seen.
For people interested in the whole query there is already the possibility to copy it to the clipboard.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.