Delphi Handbooks Collection


Delphi XE Handbook


Delphi 2010 Handbook


May 21, 2008

Delphi IDE DataBase Tools

Recent versions of the Delphi IDE brought us the Data Explorer, but so a few features of the early days are still unparalleled.

Recent versions of the Delphi IDE brought us the Data Explorer, but a few features of the early days are still unparalleled. One of them, which was good mostly for demos, was the database form wizard. A couple of years ago I almost finished porting my own version of it (one that I wrote ages ago with the help of Bob Swart) to dbExpress and the new Open Tools API. But, again, this is something you'd rarely use for real development.

The old-time database oriented tool I really miss from time to time is the Data Dictionary. For those of you who never used it, this was a collection of extended metadata, including information like integer value ranges, input masks, constraints, display masks, choice of visual component that you could associate to each table of your database. These rules would apply when a field of the table was extracted using a query. By dragging fields from the fields editor to a form, not only would you have the proper display and input rules automatically tied to the field, but Delphi could even place a component of the type you selected in the Data Dictionary, like a DBComboBox or a DBListBox instead of a classic edit box. If you are interested in understanding how this tool worked, I can look for a detailed description in one of my old Delphi books and post it here.

Now the funny thing is I discussed this specific feature with a couple of members of the Delphi R&D team while I was in Scotts Valley last month, even without knowing of the acquisition plans. Now having Delphi as an Embarcadero tool, and with the option of including more database-management features in the product, I think it would be extremely relevant to resume (or recreate, as this was a BDE-based tool) the Data Dictionary in a more modern form, but with that kind of easy-to-use, pragmatic-oriented, fully-IDE-integrated approach that I liked a lot.

If any of you used the Data Dictionary in the early days of Delphi, I'd love to know if you liked it and what was your overall impression...

I don't want Delphi to become a sort of database-CASE tool (that would be a total nonsense) but embedding some of those ideas, and also database-application synchronization features would be very valuable. For example, can we have a TDataSet that lets us have a few persistent fields and dynamically adds the extra fields of a resulting dynamic query? But I'm digressing...





 

13 Comments

Delphi IDE DataBase Tools 

Unfortunately, I found the data dictionary to be 
badly implemented, poorly documented and nearly 
impossible to use - better to just avoid it.  That 
doesn't mean it was a bad idea, just a bad 
implementation, perhaps we will see a better 
incarnation in the future (with the need for it work 
across so many different db technologies, color me 
skeptical).

As for the DB UI stuff -

 While I have found the persistant database fields to 
be convenient in past, particularilly in the BDE 
days, I have since come to a different conclusion.

I now find the static binding to be hindersome, and 
even somewhat of a dead end.  Perhaps it is just the 
way that it is implemented, as I have found it quite 
handing to import database metadata into true class 
structures (such as Linq would require in C#, but for 
Delphi) - updating things is also easy - just re-
export the database and do a diff, or just compile 
your app to see if anything breaks.  No need to run 
every last form to see if a run time linkage needs to 
be massaged. 

It seems that maximum flexibility and control 
definitely comes from avoiding the automatic UI based 
DB management that goes on under Delphi's covers. 

I think that a merger of the two could be succesful 
if win32 Delphi followed the dotNet's world's ability 
to make any object a data source - then you could 
have the best of both worlds.

Comment by Xepol on May 21, 11:31

Delphi IDE DataBase Tools 

 A DB Dictionary that can store info to your 
favourite DB's comments and other metatdata fields 
would be great. I am using PostgresDAC which is a 
really great product (BDE syntax compatible) - If 
only I could have a dictionary integrated into the 
IDE via some mechanism...
Comment by johan [http://www.fsr.co.za] on May 21, 11:57

Delphi IDE DataBase Tools 

I think that data dictionary was as a great tool and 
today i dont understand why codegear dont work in 
this tool to improve it. 
Comment by VICENTE on May 21, 12:01

Delphi IDE DataBase Tools 

I miss the SQL Explorer, it was an handy tool to 
browse a database and test some SQL, but it didn't 
work well as soon the BDE didn't support new database 
features. The current Data Explorer is a joke.

I would also look into integrating the IDE with 
database development. For example, VS can debug SQL 
Server and Oracle stored procedures (the latter using 
Oracle Developer Tools - free). It would be great 
to "step into" a stored procedure when needed.

The data dictionary was an interesting tool, but a 
bit complex to setup, and keep aligned with a 
database being developed too.
Comment by Luigi D. Sandon on May 21, 12:22

Delphi IDE DataBase Tools 

I prefer to use specific tools, like IBExpert, to do 
my data modeling and DB administration work. CG could 
remove any DB tool from the IDE and I would not miss 
it. The IDE DB "tools" will never be so complete, so 
I see no reason to have it in the IDE, if from time 
to time I will end up having to open external DB tool 
to do some work that the IDE tool can't do.
Comment by Carlos H. Cantu [http://www.firebirdnews.org] on May 21, 16:04

Delphi IDE DataBase Tools 

i still use sql explorer for browsing informix db.
There are some similar products for informix, but they
suck or cost too much. 
For mysql i use heidisql because it's superior (but
it's only for mysql, it's written in delphi and is
open source). 
New db explorer is a joke, not really easy to use and
it also crashes sometimes.
PS: old sql explorer is still in delphi bin directory,
but it hasn't been improved since 2001.
Comment by mart on May 21, 16:08

Delphi IDE DataBase Tools 

I used to use DBExpress and Borland DB technologies 
but today it is suicide on Microsoft platform. 
People! Where do you live? Microsoft .NET Entity 
Framework (with LINQ to Entites) and ADO.NET Data 
Services (Astoria) are the next generation of the 
enterprise distributed applications. Moreover, Delphi 
has also ORM tools, such as ECO. OK, there are 
problems with Beta 1, for example: 
http://forums.microsoft.com/MSDN/ShowPost.aspx?
PostID=3338412&SiteID=1, but it is the future on 
Microsoft platform. Sorry, but it is the truth. 
Instead of tables and fields there are objects with 
own meta data.
Comment by on May 21, 19:00

Delphi IDE DataBase Tools 

I wrote a paper introducing Delphi data dictionary
techniques and presented it as BorCon 1999 (the yearly
Borland conference) in Philadelphia.  It doesn't
appear to be online anymore, but I can email it to
anyone that wants it, assuming I can dig out my
conference CD.  It included sample code to handle
basic data dictionary data like "English" field names
(with automatic label captions at runtime), default
values, display widths, character case, user group
rights (insert/delete/edit), separation of
stored/displayed values, etc.  It also covered some
more complex ideas like scripted custom validation
constraints and the idea of an event dictionary, that
allowed multiple instances of a dataset component to
share runtime event handlers, in a similar way OR
mapping tools can enforce validation and provide
shared code attached to a dataset.
Comment by Erik Berry [http://www.gexperts.org/] on May 21, 21:16

Delphi IDE DataBase Tools 

 I didn't have the chance to use the DB Dictionary,
but i've read about, and it sounds really cool,
actually i'm in need of such a tool, Why?, well, I'm
developing with Datasnap and after defining my DB I
use dbexpress and later ClientDatasets, but for each
table I have to assign in my TSQLQuery component
various properties like DisplayText, DisplayMask, etc.
If I change my DB schema   then I need to change again
my TSQLQuery and so on, with a DB Dictionary Delphi
could retrieve this data from the database, speeding
my change time cycle. I have MD5, 6 and 7 books and
the late 2007 Handbook, could you tell me where do you
talk about the DB dictionary?, since I've discovered
dbexpress I skip any BDE related chapters.
Comment by Felipe Piña [] on May 22, 00:47

Delphi IDE DataBase Tools 

@Xepol,

Would you mind sharing your code that does 
the "import database metadata into true class 
structures". I would love to take a look at it.

Thanks, Stefan.
Comment by Stefan van As [http://www.dutchdelphidude.com] on May 22, 09:30

Delphi IDE DataBase Tools 

Combine CastSQLBuilder (tm) IDE, Delphi(tm) IDE and 
PowerDesigner (tm) functionality tools is very well 
idea. 
Comment by Delphi fun [] on May 22, 10:02

Delphi IDE DataBase Tools 

 Erik Berry.. could you please send me your paper? 
I've developed myself something similar to a data 
dictionary (plus more other things) working with 
dbexpress and I'm always open to find more 
inspiration about how to improve my "toy".. :-)
My email is roberto underscore icardi at hotmail dot 
com. Thank you so much!
Comment by Roberto Icardi on May 22, 13:50

Delphi IDE DataBase Tools 

Erik Berry.. could you please send me your paper 
too?  I'm very interested in it's contents.  I've 
created an ORM like component set based on Ray 
Konopka's Database Objects paper and am researching 
ways to bring it to the IDE.  Randy dot Sill at 
gmail dot com
Thanks in advance!

 
Comment by Randy Sill [http://randysill.com] on May 23, 17:18


Post Your Comment

Click here for posting your feedback to this blog.

There are currently 0 pending (unapproved) messages.