1. Vladimir Esipov
  2. Valentina Server
  3. Пятница, Декабрь 01 2023, 07:20 PM
  4.  Подписаться через email
The WIKI for the release of VDB 12 announced a new feature - a connection between two databases.
Can you explain in more detail - what do you mean?

MySQL/MariaDB allows you to execute a query like:


SELECT T1.fld1, T2.fld2
FROM DB1.tbl1 as T1, DB2.tbl2 as T2
WHERE T1.fld1 = T2.fld2
LIMIT 10;


A similar query in VDB results in an error


SELECT RecID FROM DB1.tbl1;


Kernel Error: 0xa000. "Full name "DB1.tbl1" is not supported in this context." is not supported.

Is it possible in VDB to perform cross-database queries on databases registered on the same server?
Комментарий
There are no comments made yet.
Ivan Smahin Ответ принят
The "full table names" like db1.t1 are allowed in some special cases like joins.

For example:


select a.f1, b.f1 from Db_Join_1.t1 a, Db_Join_2.t1 b WHERE a.id = b.ptr
Комментарий
There are no comments made yet.
Ivan Smahin Ответ принят
Joins, unions allow fully qualified table names from different db, but it works with some restrictions. The only traditional relations (by value) is possible to build a join result. So, neither ObjectPtr nor binary links can be used in such context.

Sure, both dbs must be registered and opened.
Комментарий
There are no comments made yet.
Vladimir Esipov Ответ принят
Hi Ivan, thanks for the tip. I see that you have added explanations to the UNION, INTERSECT and EXCEPT
page on the WIKI.

There is also no NOTIFY CHANNEL, [UN]SUBSCRIBE commands in the SQL section.
Your team is working to expand the capabilities of the VDB engine, but it will be difficult for a new user to find them, if they are not described in the appropriate sections of WIKI.
Not everyone will study announcements of all releases to find out all VDB feautures.
Комментарий
There are no comments made yet.
Ivan Smahin Ответ принят
Hi Vladimir,

Thank you for that - fixed.

(Un)Subscribe

Notify
Комментарий
There are no comments made yet.
Vladimir Esipov Ответ принят
OK, tx
Комментарий
There are no comments made yet.
  • Страница :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Categories

Announcements & News
  1. 0 subcategories
Valentina Studio
  1. 2 subcategories
Valentina Server
  1. 4 subcategories
Valentina Database ADK
  1. 0 subcategories
Valentina Reports ADK
  1. 0 subcategories
Other Discussions
  1. 2 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories