Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Some time ago I came up with an idea for a library for database inspection. I started developing it and got some very basic functionality, just to check if that's possible. Recently however, I get second thoughts, whether such project would really be useful. I am actually planning to develop following software suite:

  • library for python, that would provide easy interface to inspect database structure,
  • desktop application in PyQt that would use the interface to provide graphical database inspection,
  • web application in Django that would use the interface to provide database inspection through the browser.

Do you think such suite would be useful for other developers/database administrators/analysts?

I know, that there is pgadmin for PostgreSQL and some tool for sqlite3 and that there is Java tool called DBInspect. Usually I would be against creating new tool and rather join existing project, but I am not Java programmer (and I would rather stick to python or C, which I like) and none of these projects provide a library for database inspection.

Anyway I would like to hear some opinions from fellow developers, whether such project make sense or I should try to spend my free time on developing something else.

share|improve this question

closed as primarily opinion-based by MichaelT, GlenH7, Bart van Ingen Schenau, Kilian Foth, gnat Sep 2 at 11:12

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.If this question can be reworded to fit the rules in the help center, please edit the question.

    
Hey, what I really need to be able to do in Python is sort of "Run Stylecop" on SQL Tables and stored procedures - e.g. check naming conventions, find and complain about implicit joins. I also want to be able to map a name of stored proc to the list of all tables that it modifies as well as depends on, as well as map every table to a list of stored procedures which read and write to it. I would like to be able to group pure getters, pure setters, and hybrids together. Redgate has a similar tool but I do not want to pay, and I want an open source library. Also, properly analyzing T-SQL is hard. –  Job Feb 10 '11 at 20:39
    
These are nice features: finding all tables that stored_procedure works on and finding all stored_procedures, that operate on table. I'd definitely would like to code something like this. –  gruszczy Feb 10 '11 at 20:52
    
I am glad to hear that. I would gladly start using your code :) Remember, however, that there are some stored procedures which both look at some tables and write to others. It would be nice to separate those. Then there is another complication - temporary tables can be created. Then there is dynamic SQL ... ouch! Then there is the fact that the exact SQL syntax is vendor-dependent. MSFT SQL Server is my personal favorite. –  Job Feb 10 '11 at 22:43
    
Good, I can start coding then :-) –  gruszczy Feb 11 '11 at 1:01
1  
I have created a very early version of python package for accessing the database schema. If anyone is interested, it can be found here: code.google.com/p/fathom –  gruszczy Mar 19 '11 at 14:17

3 Answers 3

up vote 6 down vote accepted

Why not? You were already developing the library, and if you think the front end tools would be useful to you, it would probably be useful to someone else as well. I know I'd like a better front-end to SQLite (I use the Firefox plugin but I'm not too fond of it). If yours is decent, I'll give it a try!

share|improve this answer
    
Getting a tiny bit off-topic, but re SQLite—I use SQLite Database Browser, and it's usable, although SQLiteSpy looks pretty cool. –  Andrew Feb 10 '11 at 19:22
1  
Totally agree with @Frustrated. It sounds like a cool project, and when you are done, you'll have a really slick app in your portfolio to show off to potential employers/clients. And you'll be a Python stud. –  Adam Crossland Feb 10 '11 at 19:25

database inspection through the browser.

Seems to be a waste of time.

Before I would ever connect a web application up to a database, I'd have designed that database. I wouldn't be attempting to "discover" what's in it.

Discovery is a kind of reverse engineering exercise for developers or DBA's.

A command-line tool that used a standardized data access language would be ideal.

share|improve this answer
    
Could you elaborate on how command-line tool should work? Could you explain, why command-line tool would be better than access through browser? What I have in mind is that sometimes I need to change database, when I deploy new version of django app. Instead of using psql and 'ALTER|CREATE|..' to change the database, I would use web app to do that. –  gruszczy Feb 10 '11 at 20:12
1  
@gruszczy: How does one Django app prepare the database for another, different Django app in a secure, reliable, trustworthy manner? It sounds like too much Django and not enough design, code, test and deploy. I can't see a use case for using a web-based app to doctor the database for a web-based app. It sounds too complex to setup and too insecure to manage. –  S.Lott Feb 10 '11 at 21:14
    
What I have in mind is just a different interface for the same operations, that desktop client would provide. Say you want to delete a table in PostgreSQL. You can either run psql and DROP TABLE or pgadmin. I would like to add third option, through web app. Especially that Authentication backend can be written to authenticate in whatever way you want. Crap, those comments aren't the best way for this discussion. Some mailing list or forum would be better :-/ –  gruszczy Feb 10 '11 at 21:40
1  
@gruszczy: A web app to build web apps is an inherently bad idea. You can keep explaining, but it's a security and configuration nightmare. Web Apps can't be trusted like commandline or desktop apps. I would never, never take the time to build, configure and maintain a web app that does the same thing the command-line does. It's a security nightmare for no recognizable benefit. –  S.Lott Feb 10 '11 at 22:18
    
@gruszczy: "comments aren't the best way" Right. That's why you can update your question. –  S.Lott Feb 10 '11 at 22:18

What you're doing sounds a bit like Toad (http://www.toadworld.com/) a free program I use. It can store database connection info for you, browse it through a GUI, and run SQL in a window. Is there something else specific that you want your application to do?

If it's to sharpen your skills then go for it, it sounds like a worthwhile project; but no need to reinvent the wheel if you can get what you want through open source software.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.