Best practice for SQL relationships? #13831
Replies: 1 comment
-
We have been making sure our SQL DB's have been properly setup with relationships within SQL, it also allows you to visualise your DB diagrams as you can't from the Budibase relationships yet and if you ever need to integrate your DB with something else at least the relationships will already exist. We then mirror the relationships in Budibase only where it's required for some part of the UI. We also found that you should only define relationships in Budibase on table's where there is one relationship required for a specific table as the app is uni directional (is that the correct term?) and will cause significant slowdowns if a table has more than one relationship off of it due to how Budibase loads data. We are now using SQL queries for a lot of the Budibase to DB interaction rather than just using SQL tables. It's not specifically a bad thing, just a different way to build the apps. It's good that the product allows us to adapt like that. |
Beta Was this translation helpful? Give feedback.
-
Hi all!
Given that Budibase doesn't acknowledge relationships in an SQL DB, is it best not to setup those relationships in the DB and just feed the tables into Budibase and set them up from there?
Also, where does Budibase store the information about relationships? In the internal DB? I guess I'm only looking for ways to avoid redundant PK's, FK's and columns, in the database which is going to be used with Budibase only.
Beta Was this translation helpful? Give feedback.
All reactions