How is the relations' performance in 4D v17?

Hello everyone, me again.

well, now we have an important discussion about how we can use relations in 4D for reports and forms, we had some very bad experiences using relations on 4D v11 that pushed us to change how we should use it, the immediate solution was putting extra fields in our tables storing all IDs of tables that we need related for reports, but personally i think that this is a very bad practice, because you lose your database normalization.

I know that ORDA improves greatly the use of relations, but we don’t have enough experience using relations with 4D 17 and it’s possible mistakes

I appreciate if any of you could tell us your experiences using cascade relations for your reports and use in forms and stuff like this

I hope I have been clear and you can understand my concern

Thanks a lot for your help


some words in generally.
The performance of ORDA is very good. Specially relations.
My advice: use ORDA for new development. For me, i am rewrite everything i am touching and i have to refactoring some methods.

Because of ORDA, you will have much better readable code and much smaller methods. And you will have no side-effects anymore. And the locking is much better.




Yes, with ORDA the use of relations is easy and powerful.

To start, on this page -->

you’ll see that relations implemented with foreign keys and many to one / one to many links become attributes of the dataClass itself.

A many to one relation gives an attribute which is an entity.
A one to many relation gives an attribute which is an entity selection.

Then you can use them as a dataClass’s attribute in your code to navigate on your data model.

For example, in this blogpost and attached HDI -->

you’ll see how to take advantage of a recursive link to easily query your database.

I advise you to check those two blogposts and database examples which are very useful to run relations in ORDA:

Do not hesitate to contact me if you have questions.