Simple Database Interfaces for Unix?
Siddly asks: "OK, I've used databases in DOS, like dBase2, dBase3 and others. None of those mentioned needing a knowledge of database theory, they allowed you to layout and manipulate data quite easily. In Linux, we have MySQL, Postgres, SQLite, and more. None of these are intuitive, even the GUI's aren't very helpful to any casual or very occasional user, who just wants to create a simple database and forget it until something significant needs to be added, deleted or amended. I obviously don't posses the skills or time to undertake writing such an animal. Does anyone else suffer this frustration? Has anyone managed to get something like dBase3 working under dosemu?" The problem isn't necessarily the underlying RBDMS, but the interface presented to the user. Are there front-ends for the various Unix database offerings that simplify database concepts to the level of what a dBase3 user would feel comfortable with?
Perhaps you should try DBDesigner which is quite intuitive, easy to handle, etc. :-)
You can export everything, create a webfront in php, etc.
I use it for my database-class..
It's free, it's os independent. what else do you want?
First of all, just read the first few chapters of MySQL & mSQL by Oreilly and you'll be on your way with "all that database theory" stuff. It's pretty easy actually. I learned how to manage an RDBMS at a fairly young age, especially for a simpler database. If worse comes to worse, Open Office does have some Databasing possibilities. In the end, the tools are out there, you just didn't seem to look to hard. There isn't that much to learn, and you would have found that out if you had tried to learn. The database that you seem interested in making (which I hope is simple, because you can't get away from something like MySQL if it's even just a mid-sized) shouldn't cause you any problems with all of the tools available.
For a straight-up GUI, he might try MySQL Control Center. It's a Qt-based app, so it'll run on Linux and Windows. It lets you build and run queries, manage the server, etc. Even has a "viewer" for images stored as BLOBs.
There's phpMyAdmin as another option. It's web-based, so the "GUI" should run on anything. It does the same kind of stuff that MySQLCC does: lay out tables, create fields, run queries, etc.
On the admin side of things, the upcoming MySQL Administrator looks like it should be very nice. It lets you drop users, tune the DB, monitor the server, etc.
No matter what he winds up using for a GUI, if he uses MySQL, I couldn't recommend the MySQL Cookbook highly enough. It's an amazingly well-written book and very helpful. Every time I find myself with a "what's the best way to do so-and-so..." question, the answer is never more than 30 seconds of page turning away. It's also good for beginners because it's an easy way to find out how to do particular tasks without having to read an entire manual. It'll let a novice user figure out what query to type into MySQLCC, in other words. And the novice user might eventually find out that all the "database theory stuff" isn't all that difficult to learn.
That's about all I can think of off the top of my head. I'm sure some googling or trolling through freshmeat will yield some GUI apps for PostgreSQL if that's what he's into using.
-B
Ash and Hickory, straight-grained and true, make excellent bludgeons, dandy for the cudgeling of vegetarians.
I find TOra to be very good.
Its aimed more at Oracle, but will work wth MySQL and PostreSQL.
I use it mainly for inputting and modifying data in a sensible way.
Under UNIX, people traditionally use the file system as the database. It's an intuitive, hierarchical database supporting many of the features you expect from databases. You get hierarchical string-based keys and arbitrary binary content (up to many Gigabytes per key). This works best with ReiserFS, but works well enough with the other file systems as well. And everything knows how to access the file system.
The next database system people use a lot is dbm and its variants. They are good for when you need to hold lots of tiny data items and you need high performance. If your data items are big or you don't need high performance, go back to the file system. Dbm is, again, intuitive, simple, and powerful. And it's accessible from lots of different languages.
If you want something close to an RDBMS without using an RDBMS, have a look at Metakit.
Altogether, I think UNIX/Linux developers should mostly stick with using the file system as a database.
For what it's worth, PHP 5 will have the SQLite embeddable database engine bundled by default. Which means that you won't have to install a separate database engine for lightweight SQL database tasks.
JP
None of those mentioned needing a knowledge of database theory, they allowed you to layout and manipulate data quite easily.
Without a knowledge of database theory, you're going to build a bad database that doesn't scale well.
At the very least, you need to know about database normalization, which comes down to not repeating data (and instead repeating keys to that data).
You'll need to know that even though databases are supposed to be "Fourth Generation Languages" ("4GLs") where you just need specify "what" and not "how", in truth there are still a number of implementation details you'll need to be aware of.
Many of these implementation details are, no surprise, implementation specific, varying from one database (or one version) to another. (Sybase, in particular, departs from many other databases with a number of quirks.) Things like how indices are physically represented, what null really means in your database, the subtle difference between a null that means that a column's value is not known and a null that means a row (as in outer joins) does not exist, how flexible views are (if the database supports views at all, you should use them, as they're one of the few ways to abstract your interface from your implementation in a database), the difference (if any) between a view and a user defined function, how auto-increments are generated and passed around, etc., etc., etc.
On a more general level, you'll find that really designing a database makes you sound like, Pontius Pilate talking to Jesus Christ: you'll be spending a lot of time asking "what is truth".
No, really, I'm being serious. A database is an attempt to model reality at some level of granularity. One of the big question is how granular a view you need to take, and how general or specific various tables need to be.
Consider a "simple" database of MP3s: is a track the same as a song, and is that the same as an opus? What about classical recording that make each movement of an opus a separate track? What about non-classical recordings that have spoken introductory tracks? One "song" or two? Is an album a CD? What about multi-CD albums, with disc one and disc two? Is an artist a attribute of an album or a track or a song? (Answer: a song.) Is a group an artist, or is it a set of artists? (Answer: judgment call, but probably the latter.) Is the composer table a sub-type of the artist table? (Answer: yes) Does your database implementation natively represent sub-typing relationships? (postgresql does, in Sybase you have to implement it yourself.) Is the song title an attribute of the track? (Better not be, if you want to represent different covers of the same song together.)
What you're doing here isn't merely telling the database that you need a bunch of tables: you're describing the "truth" that's in the world -- as you see it, and as clearly as you can see it -- and trying to represent that truth in the database.
Long before I was a professional programmer, long before I ever designed any databases, I happened to pick up a book on a bookstore's remainder table for $4.98. The book was about designing databases, and quite a bit of the text was presented as Socratic dialogues between various stock characters, arguing about "what is truth". It's been too many years for me to recall if I still agree or not with all the arguments presented in that book, but it's take-home point -- that designing databases is a search for the truth -- has stayed with me, so I suppose it was convincing.
I hope that you'll take home a point from this post: designing a database is -- or should be -- a rigorous activity that includes much testing of your hypotheses and much recourse to asking yourself what it is you're really representing -- or are able to represent. It's not something that should -- in real cases -- be easy, and having a tool usually gets in the way of really thinking about what you're designing.
Opinions on the Twiddler2 hand-held keyboard?
Back before SQL was available, mainframes had lots of data accessable via TTY terminals. It was an entirely different method that is rarely in use today. Most existing systems have had a thick client or web interface slapped on the front. When databases moved to those new fangled PCs with loads of RAM - 64k of memory - and loads of storage - 100k discs - they reflected the mainframe way of doing things.
dBase ][ and III were great apps for their time, totally tied to a character terminal, and often the stucture of the database was tied into that character terminal. If you gave a field two characters, there were two character cells on the screen devoted to it. Each screen was a record. Configuration was done with a simple interpreter. Gads - the dot commands... I can't remember a single command, but I remember the periods. Everything else was a field.
Basically, you made a UI. The UI *was* the database, and each time you filled it out, that was a record (keyed by a field in the form? It's been too many years). It's easily doable with SQL (which is why SQL is considered more powerful), but a really really simple front end, a la dBase, I haven't seen.
If you haven't done it, you're likely to not see much of a big deal. It's a shift in thinking more than anything programmatic. Kinda the way unix has "everything is a file", the dBase way might be "the form is the database". Both are gross oversimplifications of how it actually works in practice, however.
There's a more modern db (circa early 90s) that runs in DOS that is dBase like. I can't recall the name, but it was a diehard app with users persisting (probably until today).
--
Evan
"$30 for the One True Ring. $10 each additional ring!" -- JRR "Bob" Tolkien
I really don't remember much about programs like dBase, other than editing and viewing .DBF files with utilities such as PC Tools, so I could be wrong on this. My vague recollection is that dBase provides a "serverless" database -- a DBF file that can be easily moved from one machine to another without exporting (a la mysqldump), and without the requirement of a heavyweight server continuously loaded into memory. These DBF files could be easily manipulated with simple software programs, or manipulated programmatically with libraries.
It sounds like what the poster wants is a piece of software that would conceptually lie between the lightweight UNIX db/dbm/ndbm/gdbm databases and the heavyweight server-based databases like PostgreSQL and MySQL.
As a programmer, I've often wished that I've had some simple way of storing complex data without having to roll my own solution, or rely on PostgreSQL/MySQL. Also, I have a web designer friend who would love to be able to use database-aware Perl CGI scripts without having to use his web host's SQL servers. (For small applications that REALLY don't need the full power of MySQL -- like banner rotator scripts.) I figure if this hypothetical serverless mini-database could support an SQL parser and have a DBI-compliant DBD driver... presto!
I'd volunteer to whip up an implementation of this idea, but my software to-do list is already enormous. :)
I found the SQLite home address on the page you mentioned: SQLite -- An Embeddable SQL Database Engine. I downloaded it and tried the example. SQLite definitely looks like it is an answer. Thanks, that's definitely the kind of database I need. I didn't know about SQLite.
SQL 92 Features That SQLite Does Not Implement. Not many.
Very fancy, and supports every language and its sister:
Is this the answer? Are there any drawbacks? Anyone have experience with SQLite?
It's right there in the post - he doesn't want something advanced. Have you seen the way Access is used in a lot of organisations? As an undergrad I did some work for charities creating databases and forms etc. Typically they have a collection of database files with maybe a few hundred to a thousand entries each - customer names, addresses etc. All they want is a program that lets clerical staff add entries, edit existing ones and churn out labels, mail-merge letters and reports. All with some sort of simple GUI. The chances of the staff learning SQL were about up there with them learning Swahili.
From what I've seen, MS Access is used for most of this. It's horrible to use, buggy and ugly, but it's just about simple enough that a non-techy can muddle through and get work done.I think Rekall is meant to be quite good, although I know nothing beyond the dot.kde.org post on it.
I'm not the original poster, and I know a bit more about modern RDBMS, but I would still appreciate a similar front-end to what he is talking about, for Unix.
Currently, my company uses MS Access for employees to perform data-entry to our Postgres and MySQL databases. We don't plan on keeping our Windows boxes around forever, and we plan to migrate away from Windows and MS Office, so we need a replacement. We've got everything covered, sans MS Access.
I need something that any idiot can use to make forms for data-entry. Does such a beast exist for Unix/Linux/OS X?
Sticking feathers up your butt does not make you a chicken - Tyler Durden
What is wrong with you slashdot nerdlingerlingers and all these stupid analogies? Do you think it makes you look smarter?
Damn. Just tell him to not use analogies and be quiet. Why would you try to compare it to some random idiot story? Can't you speak without swearing? There is no need to make up some even dumber analogy that is supposed to point out the fallacious logic in the GPs post. You only serve to bring a bad name to all Anonymous Cowards.
If I have a monkey.
Marxist evolution is just N generations away!
If you're using PostgreSQL, Gedafe is a very nice automatic web frontend generator. Just define your tables, views, constraints, etc. for validation and such, and it takes care of the rest. Give it a try, it's really good.
- Sw Usr
they knew how to use the VC++ Resource Editor to create dialogs but didn't feel comfortable writing C++ code
And what's wrong with that? There's a perfectly viable alternative for those people: VB. They may not be CS majors, but that doesn't mean they should have to contract a programmer if they want to write a silly little program for something or other. The hard part of most userland programs is the UI, not the code.
Some people don't care about database normal forms and other shit that doesn't *really* matter when it comes to simply getting the job done.
Random and weird software I've written.
There's an excellent program called Servoy (www.servoy.com) that is a zero deployment client based Java. The form development is very similar to MS Access and uses Javascript as it's scripting language.
Since Servoy is build using Java it can run on any OS with Java support (1.3 and above).
You can download a free (limited number of connections) copy of the server and development environment.
Try it, I've been very happy with it.
An exploration of mixology, spirits and bartending.
What about Berkeley DB? Sleepycat makes a simple "database" that sounds exactly like what the poster is looking for in a database.
~~ What's stopping you?
The person asking the question just wants a simple GUI for a non-engineer to use to build a database. Like, say, FileMaker.
Yes, every database _should_ be designed by someone who really understands database design. But most databases in the real world are running in FileMaker and Access, created by non-engineers in order to keep track of relatively simple information. For example, a call log, or a list of donations to a school, or an inventory at a bookstore. These systems don't need to scale, they just need to be good enough to let people do their jobs. And since they don't _have_ an engineer to do a proper requirements documentation, normalize the design, etc., the options are either (1) a simple GUI tool, and (2) no database.
Enable 3D printed prosthetics!
I'm a big PostgreSQL fan, but when it came time to do a big project, I ended up with SQLite (and I'm very happy I did).
Basically, the problem was to take a bunch of huge text files, parse them into a set of inputs for a big simulator written in ANSI C, run the simulation, save the results, and postprocess them.
I wrote the parsing in a mixture of Python and SQL (using PySQLite), had the simulator write the results back out the the SQLite database (which was amazingly easy and bug-free), and then did postprocessing again in Python and SQL.
It was WAY easier than my previous attempts to do similar things using embedded Python and/or PostgreSQL. I still love PostgreSQL, but not for this project.