Couple of Movies about Diagrams and Links

Here we show couple of few-seconds movies that demonstrate how you can establish links between tables using new diagrams of Valentina Studio Pro.

For Valentina database you can establish Foreign Key, ObjectPtr and Binary Link. For SQLite and Postgre only Foreign Key.

  1. Establish Link
  2. Shows how you get access to “Add Link” button and then to panel, which allows you to choose link type for the left and right table.

  3. Establish MM link
  4. Shows how you can establish by few mouse clicks MM link between two tables, and how this automatically creates third MM table and FK fields in original table(s).

[Imp] LINK/UNLINK commands now have optional suffix to suppress errors

Thorsten have point us that for his task it is not comfortable when command

LINK RECORD (1) OF T1 TO RECORDS(3, 7, 9) OF T2

throws error and stops, if link 1-7 already exists.

We have agree and improve these commands adding suffix

LINK … [IF NOT EXISTS]
UNLINK … [IF EXISTS]

This suffix is similar to CREATE/DROP commands. If it is specified, then error is not fired and command continue work for other pairs of links.

[Imp] CREATE BINARY LINK now does not accept SET NULL, SET DEFAULT by grammar. NO CASCADE added

Thorsten have point us that WIKI page about this command looks strange, because uses

Referential_action
: NO ACTION  (alias to RESTRICT)
| RESTRICT
| SET NULL
| SET DEFAULT
| CASCADE

Now SQL grammar have one more rule vext_referential_action_for_link without “SET NULL”, “SET DEFAULT” and added “NO CADCADE” for Binary Links.

Continue reading [Imp] CREATE BINARY LINK now does not accept SET NULL, SET DEFAULT by grammar. NO CASCADE added

[IMP] Recursive query now can use RDB-link defined on the fly

While Valentina have very cool syntax for recursive queries, one Valentina developer have point us that it cannot be used in his task, because he do not have predefined link with name. Taking this into account, for v5.0 we have extend syntax of recursive query

from    USING link_name
to        USING (link_name | search_condtiion)

Continue reading [IMP] Recursive query now can use RDB-link defined on the fly

Choosing appropriate database’s segment size

Each Valentina’s volume consists of set of segments, even internal service-data placed in such segments.

Database storage is implemented similar to some file system. There are volumes (.vdb, .dat, .blb, .ind, .tmp) and there are some embedded files on that volumes (all the data like field-data, indexes and so on go to that files). Each volume operates with own segment map – so we can find (and allocate new) segments for particular embedded file easy and fast.

Continue reading Choosing appropriate database’s segment size

VREPORT.DLL now links to static Postgre client

We have start check installers to prepare 5.0 beta builds, and have note that on Windows, report.dll depends on pq.dll, which it its turns requires yet 8 dlls to be added into vcomponents folder.

We have decide that this is not good of course, and spent few days to resolve this. It was not simple, because of openSSL. Now we have resolve all that, so VREPORT.DLL on all 3 platforms, now contains SQLite, Postgre and mySQL clients linked directly into DLL.

Perfect 🙂

[NEW] ORDER BY in aggregative functions First()/Last()

SQL Standard allows to SELECT only fields mentioned in the GROUP BY and expressions based on aggregative functions. You cannot SELECT a normal field. But sometimes you may very want to do this. Question is what to do in this case.

In this new Valentina Wiki article, we have describe in detail this problem and gave THREE solutions. The third solution is new for v5.0 and it works x400/ x50 times faster of the first two correspondently in tests on the database of our customer.

The third solution, uses idea from ORACLE database actually: FIRST()/LAST() functions with own ORDER BY to be used inside of each group. It seems mySQL and PostgreSQL do not have any way to resolve this task in such effective way.

[NEW] Valentina Reports 5.0 Support mySQL Datasource

We are glad to inform you, that we already have working Valentina Reports engine with datasource from mySQL.

We have use one of BSD clients compatible with mySQL Server. This resolve any issues related with GPL-license of mySQL native drivers.

Please note, that this mySQL datasource for now works only for Valentina Reports ADK, but not in Valentina Studio – Report Editor. To prepare reports in the GUI Editor you need to use Valentina or Postgre or SQLite database with the same tables. But do not worry, in about 1.5-2 months we will introduce 5.x version of Valentina Studio, with full-featured mySQL plugin also.

Right now, you can make dump of schema of mySQL database, and load that dump into local Valentina DB, then use it as test-db to design report(s). Later, from ADK application, just specify mySQL datasource against this report(s). For mySQL you should use connection string of kind

theReport = my_project.MakeNewReport(
        "report_1",
        "mysql://host=192.168.2.33, user=admin, passw=admin",
        "SELECT fldName, fldPhone FROM tblPerson" )

[NEW] VClient now allows to control timeout using VConnection.ResponseTimeout

In 4.x version we did have VDatabase.ResponseTimeout for all ADKs, which in fact was not working. Now we have resolve this issue in the VClient.dll and move this property into VConnection class.

Problem was, that if VClient was in the state Read or Write  some command into socket, then on sudden loose of network connection VClient app did hang forever. We have redesign work with sockets for VClient.dll in the same way as it was in Valentina Server.