Relationships between tables

Relationships between tables


Hi Everyone,

I'm having some problems with the relationships of the tables.

I want to connect the field "Cod" of the table TabRegTrad with the field "CodRegTrad" of the 2two tables: "TabCAE" and "TABCATD". (connection in yellow).
So what i did, was in those two tables, i defined this two fields as "TabRegTrad identifier". I Don't know it this is correct or not, but was what i did, because has you can see the connection doesn't seem to be "pointing" to the righ field.

Now i want to the connections in red: connect the field "NumOrdReg"  of the table "TabRegTrad" to the field "NumOrd" in the two tables "TabCATD" and "TabCAE".

Can anyone help me?



Hi Nuno.

Welcome back.

Without really understanding the full complexity of the system you are trying to create, it is very risky for us to actually give you a recommendation regarding a correct data architecture. To me it seems that your data model could - and should - be simplified a lot more.

I am sorry that I don't really know any good online literature for that by heart, but I would suggest you read something like and understand a bit more how to do what you want in a more effective way.

To answer your question, since I don't think you want any more keys in those entities, I would say that you'll have to make them the same data type, and have them have the same value in the end --- for instance, make them both integers, and when querying the database, search for a condition "AND TabRegTrad.NumOrdReg = TabCATD.NumOrd AND TabRegTrad.NumOrdReg = TabCAE.NumOrd". This, however, seems very ineffective in terms of data model and performance...

On a closing note, I thoroughly recommend you take some of the Agile Platform tutorials, and at least get the first developer certification level, because otherwise you may come to see in the near future that you'll regret many of the design options you are making right now, and that those will harm your whole system's performance and architecture.

Best regards, and good luck.

Paulo Tavares

Hi Paulo,

Let me just start by thanking you for the quick reply... again :)

About my problem, i know this isn't a good arquitechture, but i was asked to "re-make" an existing Access apliccation, but now using Outsystem application.

The existing application has all this connections, that's why i was just "copying" what exists.

Well, i already have the yellow connections, so the red ones, i'll problably use what you said.

Thanks again Paulo.