Donnerstag, 24. April 2008

Blackfish SQL ....

Why should a developer choose Blackfish SQL instead of other databases for a Client/Server-Project with Rad-Studio 2007??

I made yesterday on the Delphi CodeCamp in Frankfurt, Germany a training about Blackfish SQL and thought that I’ll blog about one of my favourite database. Every developer with RAD Studio 2007 has the Blackfish SQL – server on the machine and the service is normaly active… but many don’t know details about BF….

Blackfish SQL for the .net-Framework and for the Java platform was introduced with the latest version of Delphi ehm Rad Studio 2007. The developer can think now, well, this is a complete new database with release number 1.0 …

This is wrong because Blackfish SQL is the successor of the well-known database JDataStore in the Java-area from Borland/CodeGear. The latest number of JDataStore was 7 and with increment we’re on Version 8 with Blackfish SQL for the Java platform. For the .net framework we’re IMO on the Version 8, too. The explanation is that the kernel of BF is the same like for Java because the guys at CodeGear had translated the Java code into C #code and not write the database from scratch with a “Java to C# translator” http://blogs.codegear.com/steveshaughnessy/2007/09/06/38776

This is important to know because everyone has normally problems to use any application or database with the version number 1.0.

Before we go into more details of BF it’s important to define the position in the database-area. We have normally four areas in the database-market:

  • Enterprise
  • Standard
  • Desktop
  • Embedded

And here I see one of the advantages of BF: You can use it in Standard, Desktop and Embedded.

My biggest BF - database in a production environment is in the meantime (running since last summer) 1,2 GB big, there are a lot of NDR-Files in VarBinary-fields stored (NDR-files are created by Nevrona Rave Reports and they included the complete generated report and from this NDR-file you can render to PDF, HTML and printing to printer). My other project isn't finished but use the BF-database to store and read Flash-movies (more about this exciting project in some weeks here!).

The Enterprise-area isn’t so important because we have only 3 players and it would be very naïve to fight in the market against the real big players like Oracle, IBM, Sybase or Teradata. I haven’t made for myself the decision if MS-SQL is ready for the Enterprise-market…but with version 2005 the opened the door of this area.


Back to Blackfish SQL…


With BF you can use one database on all three areas and that is a great advantage because you haven’t any limitations’ of the database. BF supports all the three areas. Normally a database have one or two areas and the other areas perhaps are supported but with reservation. With Blackfish there are no reservations and you using the full power of every area!


The database is fully SQL-92 compliant with supporting all four isolation levels specified by the ANSI/ISO SQL (SQL/92) standards.


OS

Support the .net-framework and the Java platform. The datafiles of BF are binary-compatible and with this information it’s clear that you can copy (e.g. with FTP) the database between the two frameworks…


Programming


This is IMO the one of the biggest advantage: You can write all your database-objects like Trigger and StoreProcedures with your IDE, meaning with Delphi.net or other IDE’s in the .net-Framework and JBuilder or other IDE for the Java platform. You must only create a .net-Package and this assembly is to register in the Blackfish-database with “create method”. And now you can extend your SQL with Pascal. And compared with the UDF in InterBase it’s more “secure” that on an error not the server-process or the OS will crash…

In one of my next blog's I'll show you some examples of SP and Trigger, created with Delphi.net and running on Blackfish SQL server.


You can connect with ADO.net2 and dbx4 to the database, meaning from every application in your RAD Studio (Win32, VCL.net, IntraWeb, ASP.net,…).


And on the end of my blog the best … With RAD Studio you’ll get not only a developer edition of the database, like InterBase. You get a Blackfish SQL Studio Pro Edition for deployment in any production environment without any runtime-costs…


With the Enterprise / Architect Version of RAD Studio 2007 you have the following restrictions:


5 User / 20 connections

2 GB database-size

1 CPU (with unlimited cores)


With Pro Edition

1 local user / 4 connections

512 MB database-size

1 CPU (with unlimited cores)


The RAD-Pro developer can now update all the paradox-application to Blackfish SQL and the RAD-Enterprise-developer can create C/S-application on a server with 5 user-connection and 2 GB database-size. If this are limits a problem, you can buy unlimited versions, look on the codegear-page for price-info.

Look into the Developers Guide of Blackfish SQL (it’s on your RAD Studio DVD) and in the Codegear Developer Network. You’ll find some interesting articles like the following:

http://dn.codegear.com/article/36955

http://blogs.codegear.com/steveshaughnessy/2007/09/06/38776

Montag, 14. April 2008

Source beautifier for SQL statements

A lot of developers uses source code beautifier tools for their source code, e.g. our ObjectPascal. But I found a nice online-tool for SQL-statements. You can not only format the SQL-command for the Database-server (Oracle, MSSQL and other) like the following result:
SELECT HHJ,
CUSTOMER,
ORDER_ID
FROM TABLE

On the right side you have some options for formatting.

You can format this SQL-Statement for Delphi .....

var1 := 'SELECT HHJ,' ;
var1 := var1 + ' CUSTOMER,' ;
var1 := var1 + ' ORDER_ID' ;
var1 := var1 + ' FROM TABLE' ;

And other languages... e.g. for C# you can choose between
String var1 = "SELECT HHJ," ;
var1 = var1 + " CUSTOMER," ;
var1 = var1 + " ORDER_ID" ;
var1 = var1 + " FROM TABLE" ;
and
StringBuilder var1 = new StringBuilder("SELECT HHJ,");
var1.Append(" CUSTOMER,");
var1.Append(" ORDER_ID");
var1.Append(" FROM TABLE");


I found this very usefull for formatting my SQL-statement to read it sometimes later better..

Here you'll find the Online SQL and PL/SQL Formatter

Sonntag, 13. April 2008

Rave BE and Windows Vista

I received last week an email about problems with Rave BE and Windows Vista. I installed a version of Vista in VMWare and then Delphi with Rave BE.

Rave Version 8 (it should be available in the next few days!) works with Vista, of course.
Rave BE and BEX < 8 works with Vista, too

If you have problems try the following:

Rave BE is installed in the same directory structure as the version of Delphi was. In general, this will be the "c:\Programme" here in Germany or "c:\Program Files" in english. To attempt to resolve the Windows Vista security restrictions, you need to make sure that your "Group" or "User Name" has the "Full Control" permissions set to "Allow".

  1. Go to Program Files directory where you install the CodeGear / Borland product Program File\CodeGear\RAD Studio\5.0
  2. Highlight RaveReports
  3. Right Click on RaveReports and Open properties
  4. Click the Security Tab
  5. Select your own user name from the list displayed
  6. Click the Edit button
  7. Select your own uses name again
  8. Go to the "Permissions for Users" dialogue box
  9. Click the 'Full Control' Allow box
  10. Click Apply
  11. accept all the prompts
In my next post I'll explain the steps for Rave Reports BEX (Borland Edition eXtended) versions 7 or earlier.

Freitag, 11. April 2008

Thomas Pfister: A huge thank you to Bruno Fierens and TMS Software!

Due to recent blog postings about TMS Software and their Ribbon Toolbar Component set I do feel the need to state a few things about a fellow CodeGear Technology Partner.

I know Bruno for a long time, I've visited trainings from Bruno (IIRC in Frankfurt) and know some products from TMS. Everybody has realized in the last few months that the Delphi-area is not prospering like 12 years ago and the number of 3rd-party tools companies is significantly lower than 10 years ago. TMS - Software is one of THE software-companies which support Delphi. Well, this is not enough for a blog, but TMS is one of the few companies which supports not only Delphi Win32. They do support VCL.NET, ASP.NET and the VCL for the Web (better known as "IntraWeb"). This is IMO not very often the case in the Delphi-area.
Beside the support of all these plattforms, TMS creates new components and, if it makes sense, buy other components to integrate them in the TMS-products like the TNT Unicode-components from Troy.

I've noticed all the blogging and, please, Cool down!!
Don't forget: we're a small, active, friendly and healthy community and this should be the case in the future. It makes no sense to build to split up into different groups! Everybody here is a developer and no developer has made bugless-software and it is always a process of optimizing a first product and make it more "complete".