Forum > Databases

design advice number of tables per form


Hi all-

Is it better design to keep the number of tables and complex relationships for each form smaller? For example, if you have a master detail and a couple of lookups on one form, not to keep adding more stuff to the same form.

I am using data modules.


Actually, each form should have a separated datamodule / unit. For this advantage you can create a whole new form without interacting other forms with data.

So yes, your right.

Only my rule is: lookuptables on one datamodule. It's readonly and shows only data.

Actually, unless there is a logical reason to do otherwise we use normally one data module per application. Only when there are several independent groups of related databases/tables do we use more than one datamodule. In fact, it all depends quite a lot on how your data is organized and used.

The rule, though, is to use datamodules to keep the data and presentation layers separate in datamodules (data) and forms (presentation).


[0] Message Index

Go to full version