[unperson] Someone suggested at one point that, like PHP, we should all chose a single database to go with TCL/TK.I am shopping around for a database to go with the natural language translator I am working on.I'd like to be able to enter data in the various databases from within an editor (written in TCL/TK) and also I'd like to work with small databases instead of giant ones.Any suggestions for this sort of database?
MG This is, I think, an extremely misleading statement. PHP itself does not contain a database server and, although it's most commonly known as being used with a MySQL database, PHP bindings are included for a large range of different database servers (much as they are available for Tcl). It basically comes down to which database server you know how to use and what will be available on the systems you plan to deploy on. SQLite is one option. For connecting to MySQL databases on Windows, I've often used FBSQL, as well as TclODBC for connecting to Microsoft Access databases. There are a lot of different options depending on the end result you want to achieve; I'd recommend browsing the Category Database references and seeing what fits the bill for your program.RLH: I would use SQLite and if I needed something a liitle bigger I would use MySQL. Another question I would ask is which has the best interface for Tcl. I am not a fan of ODBC, meaning I like to have an interface that is db specific (i.e. something like Oratcl).MG My understanding of SQLite (which, I should add, I have never used and only looked at briefly) is that it's effectively a database server and client rolled into one, so it's a good solution for, say, a standalone app to store it's own internal database in. But if you want your program to access an external database, you'd need to use a package which provides client libraries for that database server. (All the apps I've written using databases are ones which access databases from other applications in some way, usually to keep two dbs which have to be separate synched, or something along those lines.)
fr: consider metakit, this wiki´s database and test its impressive performance in local mode Wikit in local mode.
[unperson] Is there an app already written in tcl/tk, a sort of app like Excel to enter data in MYSQL or SQL Lite or Metakit or whatever, or will I have to reinvent the wheel, make a new app and lose yet more hair over it?MG I would, once again, recommend browsing the Category Database references. In just the first few entries there are pages which, at a glance, seem to have GUIs/forms for entering into into various different databases (though I should note that, despite the fact that many people (unfortunately) use it as such, Excel is very much not a database program, but a spreadsheet). However, you will have to reinvent the wheel to some extent - many of these are basic example scripts, which would obviously have to be edited, in some cases heavily, for any use other than the examples/specific databases they were written for.[unperson] Indeed! Excel is a spreadsheet. I meant Access. Sorry! Is there anything available written in TCL/TK to work with a SQL database, something similar to Access with similar functions?Sarnold There is pgaccess [1] that was available with my Mandrake 9.0. I guess it is not as feature-rich than MSAccess, but it is free. It requires a PostgresQL installation.LB I am having great success with little effort using PostgreSQL with Tcl/Tk front ends. Tcl/Tk would also be ideal for data base middleware using Postgres, were my applications complex enough to justify the abstraction. Along with pgaccess, there are many tools that assist in data base construction in general (I use SpecTcl for screen generation).I have no idea what the needs of natural language translators might be. As others have mentioned, I suspect that you should feel free to use any of the major OSS data bases based on their appropriateness (in features) to your task. Tcl/Tk has interface libraries with all of them, I'm sure. The Pgtcl library is quite wonderful to work with.[unperson] Thanks Lan. I read on your homepage that you were a Postgres with TCL/TK front-ends expert.The needs of natural language translators -- well at least my translator which is interactive (assisted as some say) are the following: the user enters a sentence.The program takes a word at a time and matches it with the word in the database. Say the first word is love. It finds love in the database and it reads the four fields that go with this word. It copies the info and puts it in a array (is that the technical term?). One of the fields might be a reference to another database. It opens the other database and again stores the info in an array.That is basically it. Databases are simply here to store the info read by the program. The 6 databases are not interrelated, relational.I was told a few years back on a French programming site that I should not bother with 6 small databases and I should simply use one or two Postgres or MYSQL databases.AET 19feb07 For simple data storage as you describe, you could consider not using a RDBMS at all. Simply use a text file (as a tcl script to source, or maybe as XML). With such a plain text file, you have to manage integrity yourself.A RDBMS is desirable for the extra functions that are built in, such as triggers, rollback, verification etc. Yes, I'm sure that you should use one RDBMS to manage all the data in your app.MetaKit has some helpful functions. SQLite has more, plus the benefit of being industry-standard SQL based. SQLite files can be managed by a number of free apps; tkSQlite, SQLiteAdmin, Kexi, to name just some of many. Kexi ( http://www.kexi-project.org/ ) is one to watch; the stated aim is to become a cross platform (Linux & Win) successor to MS Access. It has a way to go yet, but if the developers can maintain their enthusiasm, will be very useful. Interestingly, When I double-click on a sqlite file in Konqueror (on Mepis), Kexi is the default app. to display the file.
LV How is progress on coming up with a meta-extension for database access? That is, right now, if one has to write code for oracle vs sybase vs postgres vs mysql vs sqlist, the code one has to write is pretty different. This becomes frustrating in an environment where some database projects seem to go into hibernation for spells.Has there been any work on developing, and including some sort of higher level interface into ActiveTcl, with some sort of plugin capability for the various commercial and free databases available?SRIV I've been using Oracle lately, but I have used SQLite & Postgresql in several projects, and I tend to find little difference in how I code. I'm usually just executing a sql statement and parsing the returned rows. Its a similar process for all 3 dbs, similar enough that It doesnt even phase me. Sure, each interface hase some unique features, but for the basic operations, theres very little difference.MS Access is a database which includes a forms builder for front ends, a report writer, a spreadsheet like grid viewer, and a visual query builder. Pick your database, use Tcl/Tk to build your forms, reports and data views. If that seems too challenging, then you should use MS Access :) Actually, I used to use Access to build apps for industrial customers. Every app failed/corrupted/crashed/blue screened etc, so I got out of that business. Now I just use TclTk and everything works and my customers are very happy.schlenk I still really like tcldb for cross database portability, it also has an form builder, schema editor and various other nice things included, but it is written in itcl, which might be unwelcome for some. It even tries to help a bit with SQL portability, not only with pure connection management, but as always with that kind of stuff, you don't get very close to the powerful features of all databases.
