Menu

Home

Sergiy Lozovsky

Introduction

DB Semantic Browser (DBSB) is designed for the software developers. Applications access data located in multiple tables and it takes some effort to get all information relevant to the particular object. Developers have more interesting things to do than navigating through multiple tables, determining keys and selecting rows. DBSB uses DB meta-data, discovers relationships between tables and selects rows related to the selected one. A heuristic is used to limit an amount of information to show.

Architecture

DBSB is implemented as Python web service. When started on a host it connects to DB and provides HTTP service on the defined port. When web browser is pointed to that port DBSB shows the list of available DB tables. Table names are clickable as well as table rows.

DBSB is dependent on the following Python packages:

DBSB was tested with Sqlite and MySQL, but should support all DBs covered by Sqlalchemy.

Note: Sqlalchemy should match version of DB that is used;

Installation

Install Python, Bottle and Sqlalchemy.

# pip install bottle
# pip install sqlalchemy

Place dbsb.py in any convenient location.

Use

Select port to use, DB location and start dbsb.py. For example:

# ./dbsb.py -p 10000 -d sqlite:///current/db
Bottle v0.12.9 server starting up (using WSGIRefServer())...
Listening on http://0.0.0.0:10000/
Hit Ctrl-C to quit.

172.16.57.1 - - [19/Apr/2016 16:46:00] "GET / HTTP/1.1" 200 3088

Point browser to the specified port (use your host IP address) - http://172.16.57.134:10000/ and click everything you see :-)

current/db – is path to the DB;

Use Ctrl-C to quit.

Valid SQLite URL forms are:

 sqlite:///:memory: (or, sqlite://)
 sqlite:///relative/path/to/file.db
 sqlite:////absolute/path/to/file.db

MySQL DB:

# ./dbsb.py -p 10000 -d mysql://scott:tiger@localhost/test

Limitations

DBSB shows table contents on the one page, no pagination, so it's not practical to use it with long tables.

DBSB doesn't support multicolumn foreign keys.

Project Members: